feat: Complete zCode CLI X with Telegram bot integration

- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation

🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
This commit is contained in:
admin
2026-05-05 09:01:26 +00:00
Unverified
parent 4a7035dd92
commit 875c7f9b91
24688 changed files with 3224957 additions and 221 deletions

View File

@@ -0,0 +1,3 @@
export { Skills, type SkillCreateResponse, type SkillRetrieveResponse, type SkillListResponse, type SkillDeleteResponse, type SkillCreateParams, type SkillRetrieveParams, type SkillListParams, type SkillDeleteParams, type SkillListResponsesPageCursor, } from "./skills.mjs";
export { Versions, type VersionCreateResponse, type VersionRetrieveResponse, type VersionListResponse, type VersionDeleteResponse, type VersionCreateParams, type VersionRetrieveParams, type VersionListParams, type VersionDeleteParams, type VersionListResponsesPageCursor, } from "./versions.mjs";
//# sourceMappingURL=index.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/skills/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,GAClC;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,GACpC"}

View File

@@ -0,0 +1,3 @@
export { Skills, type SkillCreateResponse, type SkillRetrieveResponse, type SkillListResponse, type SkillDeleteResponse, type SkillCreateParams, type SkillRetrieveParams, type SkillListParams, type SkillDeleteParams, type SkillListResponsesPageCursor, } from "./skills.js";
export { Versions, type VersionCreateResponse, type VersionRetrieveResponse, type VersionListResponse, type VersionDeleteResponse, type VersionCreateParams, type VersionRetrieveParams, type VersionListParams, type VersionDeleteParams, type VersionListResponsesPageCursor, } from "./versions.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/skills/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,GAClC;OACM,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,GACpC"}

View File

@@ -0,0 +1,9 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Versions = exports.Skills = void 0;
var skills_1 = require("./skills.js");
Object.defineProperty(exports, "Skills", { enumerable: true, get: function () { return skills_1.Skills; } });
var versions_1 = require("./versions.js");
Object.defineProperty(exports, "Versions", { enumerable: true, get: function () { return versions_1.Versions; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/skills/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAWkB;AAVhB,gGAAA,MAAM,OAAA;AAWR,0CAWoB;AAVlB,oGAAA,QAAQ,OAAA"}

View File

@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Skills, } from "./skills.mjs";
export { Versions, } from "./versions.mjs";
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/skills/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAUP;OACM,EACL,QAAQ,GAUT"}

View File

@@ -0,0 +1,249 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import * as VersionsAPI from "./versions.mjs";
import { VersionCreateParams, VersionCreateResponse, VersionDeleteParams, VersionDeleteResponse, VersionListParams, VersionListResponse, VersionListResponsesPageCursor, VersionRetrieveParams, VersionRetrieveResponse, Versions } from "./versions.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { type Uploadable } from "../../../core/uploads.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Skills extends APIResource {
versions: VersionsAPI.Versions;
/**
* Create Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.create();
* ```
*/
create(params?: SkillCreateParams | null | undefined, options?: RequestOptions): APIPromise<SkillCreateResponse>;
/**
* Get Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.retrieve('skill_id');
* ```
*/
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<SkillRetrieveResponse>;
/**
* List Skills
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const skillListResponse of client.beta.skills.list()) {
* // ...
* }
* ```
*/
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<SkillListResponsesPageCursor, SkillListResponse>;
/**
* Delete Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.delete('skill_id');
* ```
*/
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SkillDeleteResponse>;
}
export type SkillListResponsesPageCursor = PageCursor<SkillListResponse>;
export interface SkillCreateResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillRetrieveResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillListResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillDeleteResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* Deleted object type.
*
* For Skills, this is always `"skill_deleted"`.
*/
type: string;
}
export interface SkillCreateParams {
/**
* Body param: Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title?: string | null;
/**
* Body param: Files to upload for the skill.
*
* All files must be in the same top-level directory and must include a SKILL.md
* file at the root of that directory.
*/
files?: Array<Uploadable> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillListParams extends PageCursorParams {
/**
* Query param: Filter skills by source.
*
* If provided, only skills from the specified source will be returned:
*
* - `"custom"`: only return user-created skills
* - `"anthropic"`: only return Anthropic-created skills
*/
source?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Skills {
export { type SkillCreateResponse as SkillCreateResponse, type SkillRetrieveResponse as SkillRetrieveResponse, type SkillListResponse as SkillListResponse, type SkillDeleteResponse as SkillDeleteResponse, type SkillListResponsesPageCursor as SkillListResponsesPageCursor, type SkillCreateParams as SkillCreateParams, type SkillRetrieveParams as SkillRetrieveParams, type SkillListParams as SkillListParams, type SkillDeleteParams as SkillDeleteParams, };
export { Versions as Versions, type VersionCreateResponse as VersionCreateResponse, type VersionRetrieveResponse as VersionRetrieveResponse, type VersionListResponse as VersionListResponse, type VersionDeleteResponse as VersionDeleteResponse, type VersionListResponsesPageCursor as VersionListResponsesPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
}
//# sourceMappingURL=skills.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,QAAQ,EACT;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;OAOG;IACH,MAAM,CACJ,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAmBlC;;;;;;;OAOG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAWpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;IAY/D;;;;;;;OAOG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAA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AAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}

View File

@@ -0,0 +1,249 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import * as VersionsAPI from "./versions.js";
import { VersionCreateParams, VersionCreateResponse, VersionDeleteParams, VersionDeleteResponse, VersionListParams, VersionListResponse, VersionListResponsesPageCursor, VersionRetrieveParams, VersionRetrieveResponse, Versions } from "./versions.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { type Uploadable } from "../../../core/uploads.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Skills extends APIResource {
versions: VersionsAPI.Versions;
/**
* Create Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.create();
* ```
*/
create(params?: SkillCreateParams | null | undefined, options?: RequestOptions): APIPromise<SkillCreateResponse>;
/**
* Get Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.retrieve('skill_id');
* ```
*/
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<SkillRetrieveResponse>;
/**
* List Skills
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const skillListResponse of client.beta.skills.list()) {
* // ...
* }
* ```
*/
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<SkillListResponsesPageCursor, SkillListResponse>;
/**
* Delete Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.delete('skill_id');
* ```
*/
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SkillDeleteResponse>;
}
export type SkillListResponsesPageCursor = PageCursor<SkillListResponse>;
export interface SkillCreateResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillRetrieveResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillListResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill was created.
*/
created_at: string;
/**
* Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title: string | null;
/**
* The latest version identifier for the skill.
*
* This represents the most recent version of the skill that has been created.
*/
latest_version: string | null;
/**
* Source of the skill.
*
* This may be one of the following values:
*
* - `"custom"`: the skill was created by a user
* - `"anthropic"`: the skill was created by Anthropic
*/
source: string;
/**
* Object type.
*
* For Skills, this is always `"skill"`.
*/
type: string;
/**
* ISO 8601 timestamp of when the skill was last updated.
*/
updated_at: string;
}
export interface SkillDeleteResponse {
/**
* Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* Deleted object type.
*
* For Skills, this is always `"skill_deleted"`.
*/
type: string;
}
export interface SkillCreateParams {
/**
* Body param: Display title for the skill.
*
* This is a human-readable label that is not included in the prompt sent to the
* model.
*/
display_title?: string | null;
/**
* Body param: Files to upload for the skill.
*
* All files must be in the same top-level directory and must include a SKILL.md
* file at the root of that directory.
*/
files?: Array<Uploadable> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillListParams extends PageCursorParams {
/**
* Query param: Filter skills by source.
*
* If provided, only skills from the specified source will be returned:
*
* - `"custom"`: only return user-created skills
* - `"anthropic"`: only return Anthropic-created skills
*/
source?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface SkillDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Skills {
export { type SkillCreateResponse as SkillCreateResponse, type SkillRetrieveResponse as SkillRetrieveResponse, type SkillListResponse as SkillListResponse, type SkillDeleteResponse as SkillDeleteResponse, type SkillListResponsesPageCursor as SkillListResponsesPageCursor, type SkillCreateParams as SkillCreateParams, type SkillRetrieveParams as SkillRetrieveParams, type SkillListParams as SkillListParams, type SkillDeleteParams as SkillDeleteParams, };
export { Versions as Versions, type VersionCreateResponse as VersionCreateResponse, type VersionRetrieveResponse as VersionRetrieveResponse, type VersionListResponse as VersionListResponse, type VersionDeleteResponse as VersionDeleteResponse, type VersionListResponsesPageCursor as VersionListResponsesPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
}
//# sourceMappingURL=skills.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,QAAQ,EACT;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;OAOG;IACH,MAAM,CACJ,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAmBlC;;;;;;;OAOG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAWpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;IAY/D;;;;;;;OAOG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,iBAAiB,GAAG,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QAAQ,EACpB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}

View File

@@ -0,0 +1,98 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Skills = void 0;
const tslib_1 = require("../../../internal/tslib.js");
const resource_1 = require("../../../core/resource.js");
const VersionsAPI = tslib_1.__importStar(require("./versions.js"));
const versions_1 = require("./versions.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const uploads_1 = require("../../../internal/uploads.js");
const path_1 = require("../../../internal/utils/path.js");
class Skills extends resource_1.APIResource {
constructor() {
super(...arguments);
this.versions = new VersionsAPI.Versions(this._client);
}
/**
* Create Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.create();
* ```
*/
create(params = {}, options) {
const { betas, ...body } = params ?? {};
return this._client.post('/v1/skills?beta=true', (0, uploads_1.multipartFormRequestOptions)({
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
}, this._client, false));
}
/**
* Get Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.retrieve('skill_id');
* ```
*/
retrieve(skillID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get((0, path_1.path) `/v1/skills/${skillID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* List Skills
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const skillListResponse of client.beta.skills.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/skills?beta=true', (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* Delete Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.delete('skill_id');
* ```
*/
delete(skillID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete((0, path_1.path) `/v1/skills/${skillID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
}
exports.Skills = Skills;
Skills.Versions = versions_1.Versions;
//# sourceMappingURL=skills.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,mEAA0C;AAC1C,4CAWoB;AAEpB,4DAA0F;AAE1F,0DAAyD;AAEzD,0DAAwE;AACxE,0DAAoD;AAEpD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuG1E,CAAC;IArGC;;;;;;;OAOG;IACH,MAAM,CACJ,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,sBAAsB,EACtB,IAAA,qCAA2B,EACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EA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AE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,YAAY,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAxGD,wBAwGC;AAmOD,MAAM,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}

View File

@@ -0,0 +1,93 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as VersionsAPI from "./versions.mjs";
import { Versions, } from "./versions.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Skills extends APIResource {
constructor() {
super(...arguments);
this.versions = new VersionsAPI.Versions(this._client);
}
/**
* Create Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.create();
* ```
*/
create(params = {}, options) {
const { betas, ...body } = params ?? {};
return this._client.post('/v1/skills?beta=true', multipartFormRequestOptions({
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
}, this._client, false));
}
/**
* Get Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.retrieve('skill_id');
* ```
*/
retrieve(skillID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get(path `/v1/skills/${skillID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* List Skills
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const skillListResponse of client.beta.skills.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/skills?beta=true', (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* Delete Skill
*
* @example
* ```ts
* const skill = await client.beta.skills.delete('skill_id');
* ```
*/
delete(skillID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete(path `/v1/skills/${skillID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
}
Skills.Versions = Versions;
//# sourceMappingURL=skills.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,WAAW;OAChB,EAUL,QAAQ,GACT;OAEM,EAAE,UAAU,EAAsC;OAElD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuG1E,CAAC;IArGC;;;;;;;OAOG;IACH,MAAM,CACJ,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,sBAAsB,EACtB,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI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AAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,OAAO,YAAY,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAmOD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC"}

View File

@@ -0,0 +1,257 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { type Uploadable } from "../../../core/uploads.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Versions extends APIResource {
/**
* Create Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.create(
* 'skill_id',
* );
* ```
*/
create(skillID: string, params?: VersionCreateParams | null | undefined, options?: RequestOptions): APIPromise<VersionCreateResponse>;
/**
* Get Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.retrieve(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<VersionRetrieveResponse>;
/**
* List Skill Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const versionListResponse of client.beta.skills.versions.list(
* 'skill_id',
* )) {
* // ...
* }
* ```
*/
list(skillID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<VersionListResponsesPageCursor, VersionListResponse>;
/**
* Delete Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.delete(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<VersionDeleteResponse>;
}
export type VersionListResponsesPageCursor = PageCursor<VersionListResponse>;
export interface VersionCreateResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionRetrieveResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionListResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionDeleteResponse {
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
id: string;
/**
* Deleted object type.
*
* For Skill Versions, this is always `"skill_version_deleted"`.
*/
type: string;
}
export interface VersionCreateParams {
/**
* Body param: Files to upload for the skill.
*
* All files must be in the same top-level directory and must include a SKILL.md
* file at the root of that directory.
*/
files?: Array<Uploadable> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionRetrieveParams {
/**
* Path param: Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
skill_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionListParams extends PageCursorParams {
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionDeleteParams {
/**
* Path param: Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
skill_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Versions {
export { type VersionCreateResponse as VersionCreateResponse, type VersionRetrieveResponse as VersionRetrieveResponse, type VersionListResponse as VersionListResponse, type VersionDeleteResponse as VersionDeleteResponse, type VersionListResponsesPageCursor as VersionListResponsesPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
}
//# sourceMappingURL=versions.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/skills/versions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;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OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}

View File

@@ -0,0 +1,257 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { type Uploadable } from "../../../core/uploads.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Versions extends APIResource {
/**
* Create Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.create(
* 'skill_id',
* );
* ```
*/
create(skillID: string, params?: VersionCreateParams | null | undefined, options?: RequestOptions): APIPromise<VersionCreateResponse>;
/**
* Get Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.retrieve(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<VersionRetrieveResponse>;
/**
* List Skill Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const versionListResponse of client.beta.skills.versions.list(
* 'skill_id',
* )) {
* // ...
* }
* ```
*/
list(skillID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<VersionListResponsesPageCursor, VersionListResponse>;
/**
* Delete Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.delete(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<VersionDeleteResponse>;
}
export type VersionListResponsesPageCursor = PageCursor<VersionListResponse>;
export interface VersionCreateResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionRetrieveResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionListResponse {
/**
* Unique identifier for the skill version.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* ISO 8601 timestamp of when the skill version was created.
*/
created_at: string;
/**
* Description of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
description: string;
/**
* Directory name of the skill version.
*
* This is the top-level directory name that was extracted from the uploaded files.
*/
directory: string;
/**
* Human-readable name of the skill version.
*
* This is extracted from the SKILL.md file in the skill upload.
*/
name: string;
/**
* Identifier for the skill that this version belongs to.
*/
skill_id: string;
/**
* Object type.
*
* For Skill Versions, this is always `"skill_version"`.
*/
type: string;
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
version: string;
}
export interface VersionDeleteResponse {
/**
* Version identifier for the skill.
*
* Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
*/
id: string;
/**
* Deleted object type.
*
* For Skill Versions, this is always `"skill_version_deleted"`.
*/
type: string;
}
export interface VersionCreateParams {
/**
* Body param: Files to upload for the skill.
*
* All files must be in the same top-level directory and must include a SKILL.md
* file at the root of that directory.
*/
files?: Array<Uploadable> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionRetrieveParams {
/**
* Path param: Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
skill_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionListParams extends PageCursorParams {
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface VersionDeleteParams {
/**
* Path param: Unique identifier for the skill.
*
* The format and length of IDs may change over time.
*/
skill_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Versions {
export { type VersionCreateResponse as VersionCreateResponse, type VersionRetrieveResponse as VersionRetrieveResponse, type VersionListResponse as VersionListResponse, type VersionDeleteResponse as VersionDeleteResponse, type VersionListResponsesPageCursor as VersionListResponsesPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
}
//# sourceMappingURL=versions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/skills/versions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAkBpC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAWtC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,mBAAmB,CAAC;IAgBnE;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;CAUrC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ED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}

View File

@@ -0,0 +1,100 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Versions = void 0;
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const uploads_1 = require("../../../internal/uploads.js");
const path_1 = require("../../../internal/utils/path.js");
class Versions extends resource_1.APIResource {
/**
* Create Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.create(
* 'skill_id',
* );
* ```
*/
create(skillID, params = {}, options) {
const { betas, ...body } = params ?? {};
return this._client.post((0, path_1.path) `/v1/skills/${skillID}/versions?beta=true`, (0, uploads_1.multipartFormRequestOptions)({
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
}, this._client));
}
/**
* Get Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.retrieve(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
retrieve(version, params, options) {
const { skill_id, betas } = params;
return this._client.get((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* List Skill Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const versionListResponse of client.beta.skills.versions.list(
* 'skill_id',
* )) {
* // ...
* }
* ```
*/
list(skillID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList((0, path_1.path) `/v1/skills/${skillID}/versions?beta=true`, (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* Delete Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.delete(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
delete(version, params, options) {
const { skill_id, betas } = params;
return this._client.delete((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
}
exports.Versions = Versions;
//# sourceMappingURL=versions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../src/resources/beta/skills/versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAA0F;AAE1F,0DAAyD;AAEzD,0DAAwE;AACxE,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;OASG;IACH,MAAM,CACJ,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,cAAc,OAAO,qBAAqB,EAC9C,IAAA,qCAA2B,EACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAe,EACf,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,YAAY,EAAE;YAClF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAe,EACf,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,uBAA+B,CAAA,EAC/B;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,YAAY,EAAE;YACrF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AArHD,4BAqHC"}

View File

@@ -0,0 +1,96 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Versions extends APIResource {
/**
* Create Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.create(
* 'skill_id',
* );
* ```
*/
create(skillID, params = {}, options) {
const { betas, ...body } = params ?? {};
return this._client.post(path `/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions({
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
}, this._client));
}
/**
* Get Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.retrieve(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
retrieve(version, params, options) {
const { skill_id, betas } = params;
return this._client.get(path `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* List Skill Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const versionListResponse of client.beta.skills.versions.list(
* 'skill_id',
* )) {
* // ...
* }
* ```
*/
list(skillID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList(path `/v1/skills/${skillID}/versions?beta=true`, (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
/**
* Delete Skill Version
*
* @example
* ```ts
* const version = await client.beta.skills.versions.delete(
* 'version',
* { skill_id: 'skill_id' },
* );
* ```
*/
delete(version, params, options) {
const { skill_id, betas } = params;
return this._client.delete(path `/v1/skills/${skill_id}/versions/${version}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'skills-2025-10-02'].toString() },
options?.headers,
]),
});
}
}
//# sourceMappingURL=versions.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../../src/resources/beta/skills/versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,MAAM,CACJ,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,cAAc,OAAO,qBAAqB,EAC9C,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAe,EACf,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,QAAQ,aAAa,OAAO,YAAY,EAAE;YAClF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,C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