@anthropic-ai/sdk 0.118.0 → 0.120.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/helpers/beta/environments.d.mts +5 -4
- package/helpers/beta/environments.d.mts.map +1 -1
- package/helpers/beta/environments.d.ts +5 -4
- package/helpers/beta/environments.d.ts.map +1 -1
- package/helpers/beta/environments.js +5 -4
- package/helpers/beta/environments.js.map +1 -1
- package/helpers/beta/environments.mjs +5 -4
- package/helpers/beta/environments.mjs.map +1 -1
- package/internal/file-store.d.mts +136 -0
- package/internal/file-store.d.mts.map +1 -0
- package/internal/file-store.d.ts +136 -0
- package/internal/file-store.d.ts.map +1 -0
- package/internal/file-store.js +531 -0
- package/internal/file-store.js.map +1 -0
- package/internal/file-store.mjs +523 -0
- package/internal/file-store.mjs.map +1 -0
- package/lib/environments/poller.d.mts +6 -0
- package/lib/environments/poller.d.mts.map +1 -1
- package/lib/environments/poller.d.ts +6 -0
- package/lib/environments/poller.d.ts.map +1 -1
- package/lib/environments/poller.js +46 -1
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +46 -1
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.d.mts +89 -12
- package/lib/environments/worker.d.mts.map +1 -1
- package/lib/environments/worker.d.ts +89 -12
- package/lib/environments/worker.d.ts.map +1 -1
- package/lib/environments/worker.js +336 -67
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +336 -68
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaRunnableTool.d.mts +4 -1
- package/lib/tools/BetaRunnableTool.d.mts.map +1 -1
- package/lib/tools/BetaRunnableTool.d.ts +4 -1
- package/lib/tools/BetaRunnableTool.d.ts.map +1 -1
- package/lib/tools/BetaRunnableTool.js +7 -2
- package/lib/tools/BetaRunnableTool.js.map +1 -1
- package/lib/tools/BetaRunnableTool.mjs +7 -2
- package/lib/tools/BetaRunnableTool.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +3 -1
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +3 -1
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +322 -27
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +322 -27
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/index.d.mts +1 -1
- package/resources/beta/agents/index.d.mts.map +1 -1
- package/resources/beta/agents/index.d.ts +1 -1
- package/resources/beta/agents/index.d.ts.map +1 -1
- package/resources/beta/agents/index.js.map +1 -1
- package/resources/beta/agents/index.mjs.map +1 -1
- package/resources/beta/beta.d.mts +6 -6
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +6 -6
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/environments/work.d.mts +5 -1
- package/resources/beta/environments/work.d.mts.map +1 -1
- package/resources/beta/environments/work.d.ts +5 -1
- package/resources/beta/environments/work.d.ts.map +1 -1
- package/resources/beta/environments/work.js +0 -17
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +0 -17
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/files.d.mts +22 -22
- package/resources/beta/files.d.mts.map +1 -1
- package/resources/beta/files.d.ts +22 -22
- package/resources/beta/files.d.ts.map +1 -1
- package/resources/beta/files.js +4 -4
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +4 -4
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +3 -3
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +3 -3
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +1202 -5
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +1202 -5
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/files.d.mts +105 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +105 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +52 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +48 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +1267 -7
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1267 -7
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/index.d.mts +3 -0
- package/resources/skills/index.d.mts.map +1 -0
- package/resources/skills/index.d.ts +3 -0
- package/resources/skills/index.d.ts.map +1 -0
- package/resources/skills/index.js +9 -0
- package/resources/skills/index.js.map +1 -0
- package/resources/skills/index.mjs +4 -0
- package/resources/skills/index.mjs.map +1 -0
- package/resources/skills/skills.d.mts +129 -0
- package/resources/skills/skills.d.mts.map +1 -0
- package/resources/skills/skills.d.ts +129 -0
- package/resources/skills/skills.d.ts.map +1 -0
- package/resources/skills/skills.js +44 -0
- package/resources/skills/skills.js.map +1 -0
- package/resources/skills/skills.mjs +39 -0
- package/resources/skills/skills.mjs.map +1 -0
- package/resources/skills/versions.d.mts +104 -0
- package/resources/skills/versions.d.mts.map +1 -0
- package/resources/skills/versions.d.ts +104 -0
- package/resources/skills/versions.d.ts.map +1 -0
- package/resources/skills/versions.js +41 -0
- package/resources/skills/versions.js.map +1 -0
- package/resources/skills/versions.mjs +37 -0
- package/resources/skills/versions.mjs.map +1 -0
- package/resources/skills.d.mts +2 -0
- package/resources/skills.d.mts.map +1 -0
- package/resources/skills.d.ts +2 -0
- package/resources/skills.d.ts.map +1 -0
- package/resources/skills.js +6 -0
- package/resources/skills.js.map +1 -0
- package/resources/skills.mjs +3 -0
- package/resources/skills.mjs.map +1 -0
- package/src/client.ts +172 -0
- package/src/helpers/beta/environments.ts +5 -4
- package/src/internal/file-store.ts +550 -0
- package/src/lib/environments/poller.ts +47 -1
- package/src/lib/environments/worker.ts +419 -79
- package/src/lib/tools/BetaRunnableTool.ts +9 -2
- package/src/lib/tools/BetaToolRunner.ts +6 -1
- package/src/resources/beta/agents/agents.ts +435 -30
- package/src/resources/beta/agents/index.ts +17 -0
- package/src/resources/beta/beta.ts +160 -6
- package/src/resources/beta/environments/work.ts +7 -0
- package/src/resources/beta/files.ts +27 -27
- package/src/resources/beta/index.ts +80 -3
- package/src/resources/beta/messages/index.ts +60 -0
- package/src/resources/beta/messages/messages.ts +1865 -415
- package/src/resources/files.ts +163 -0
- package/src/resources/index.ts +83 -0
- package/src/resources/messages/index.ts +66 -0
- package/src/resources/messages/messages.ts +1648 -115
- package/src/resources/skills/index.ts +21 -0
- package/src/resources/skills/skills.ts +194 -0
- package/src/resources/skills/versions.ts +160 -0
- package/src/resources/skills.ts +3 -0
- package/src/tools/agent-toolset/fs-util.ts +40 -24
- package/src/tools/agent-toolset/memories.ts +1017 -0
- package/src/tools/agent-toolset/node.browser.ts +68 -0
- package/src/tools/agent-toolset/node.ts +139 -53
- package/src/tools/agent-toolset/skills.ts +29 -9
- package/src/tools/agent-toolset/sync-interval.ts +30 -0
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts +23 -10
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts +23 -10
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +40 -25
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +38 -25
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.d.mts +173 -0
- package/tools/agent-toolset/memories.d.mts.map +1 -0
- package/tools/agent-toolset/memories.d.ts +173 -0
- package/tools/agent-toolset/memories.d.ts.map +1 -0
- package/tools/agent-toolset/memories.js +902 -0
- package/tools/agent-toolset/memories.js.map +1 -0
- package/tools/agent-toolset/memories.mjs +895 -0
- package/tools/agent-toolset/memories.mjs.map +1 -0
- package/tools/agent-toolset/node.browser.d.mts +31 -0
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +31 -0
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js +59 -1
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs +54 -0
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +54 -22
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +54 -22
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +83 -44
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +77 -44
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts +16 -7
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts +16 -7
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +27 -9
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +27 -9
- package/tools/agent-toolset/skills.mjs.map +1 -1
- package/tools/agent-toolset/sync-interval.d.mts +19 -0
- package/tools/agent-toolset/sync-interval.d.mts.map +1 -0
- package/tools/agent-toolset/sync-interval.d.ts +19 -0
- package/tools/agent-toolset/sync-interval.d.ts.map +1 -0
- package/tools/agent-toolset/sync-interval.js +29 -0
- package/tools/agent-toolset/sync-interval.js.map +1 -0
- package/tools/agent-toolset/sync-interval.mjs +25 -0
- package/tools/agent-toolset/sync-interval.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as VersionsAPI from "./versions.mjs";
|
|
4
|
+
import { Versions, } from "./versions.mjs";
|
|
5
|
+
import { PageCursor } from "../../core/pagination.mjs";
|
|
6
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
7
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
8
|
+
export class Skills extends APIResource {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.versions = new VersionsAPI.Versions(this._client);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create Skill
|
|
15
|
+
*/
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this._client.post('/v1/skills', multipartFormRequestOptions({ body, ...options }, this._client, false));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get Skill
|
|
21
|
+
*/
|
|
22
|
+
retrieve(skillID, options) {
|
|
23
|
+
return this._client.get(path `/v1/skills/${skillID}`, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List Skills
|
|
27
|
+
*/
|
|
28
|
+
list(query = {}, options) {
|
|
29
|
+
return this._client.getAPIList('/v1/skills', (PageCursor), { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Delete Skill
|
|
33
|
+
*/
|
|
34
|
+
delete(skillID, options) {
|
|
35
|
+
return this._client.delete(path `/v1/skills/${skillID}`, options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
Skills.Versions = Versions;
|
|
39
|
+
//# sourceMappingURL=skills.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../../src/resources/skills/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAQL,QAAQ,GACT,uBAAmB;AAEpB,OAAO,EAAE,UAAU,EAAsC,kCAA8B;AAGvF,OAAO,EAAE,2BAA2B,EAAE,mCAA+B;AACrE,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmC1E,CAAC;IAjCC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,YAAY,EACZ,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,UAAiB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF;AAkHD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { PageCursor, type PageCursorParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
|
+
import { type Uploadable } from "../../core/uploads.mjs";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
export declare class Versions extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create Skill Version
|
|
9
|
+
*/
|
|
10
|
+
create(skillID: string, body: VersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
11
|
+
/**
|
|
12
|
+
* Get Skill Version
|
|
13
|
+
*/
|
|
14
|
+
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
15
|
+
/**
|
|
16
|
+
* List Skill Versions
|
|
17
|
+
*/
|
|
18
|
+
list(skillID: string, query?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<SkillVersionsPageCursor, SkillVersion>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete Skill Version
|
|
21
|
+
*/
|
|
22
|
+
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<DeletedSkillVersion>;
|
|
23
|
+
}
|
|
24
|
+
export type SkillVersionsPageCursor = PageCursor<SkillVersion>;
|
|
25
|
+
export interface DeletedSkillVersion {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
28
|
+
* and pins it in references.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Deleted object type.
|
|
33
|
+
*
|
|
34
|
+
* For Skill Versions, this is always `"skill_version_deleted"`.
|
|
35
|
+
*/
|
|
36
|
+
type: 'skill_version_deleted';
|
|
37
|
+
}
|
|
38
|
+
export interface SkillVersion {
|
|
39
|
+
/**
|
|
40
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
41
|
+
* and pins it in references.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* ISO 8601 timestamp of when the skill was created.
|
|
46
|
+
*/
|
|
47
|
+
created_at: string;
|
|
48
|
+
/**
|
|
49
|
+
* Description of the skill version.
|
|
50
|
+
*
|
|
51
|
+
* This is extracted from the SKILL.md file in the skill upload.
|
|
52
|
+
*/
|
|
53
|
+
description: string;
|
|
54
|
+
/**
|
|
55
|
+
* The Skill's immutable kebab-case slug, set at creation from the first upload's
|
|
56
|
+
* SKILL.md frontmatter `name` (or its enclosing directory). Every later upload
|
|
57
|
+
* must resolve to the same value. Also the top-level directory of the Skill's
|
|
58
|
+
* mounted files and the base name of a downloaded archive.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Unique identifier for the skill.
|
|
63
|
+
*
|
|
64
|
+
* The format and length of IDs may change over time.
|
|
65
|
+
*/
|
|
66
|
+
skill_id: string;
|
|
67
|
+
/**
|
|
68
|
+
* Object type.
|
|
69
|
+
*
|
|
70
|
+
* For Skill Versions, this is always `"skill_version"`.
|
|
71
|
+
*/
|
|
72
|
+
type: 'skill_version';
|
|
73
|
+
}
|
|
74
|
+
export interface VersionCreateParams {
|
|
75
|
+
/**
|
|
76
|
+
* Files to upload for the skill.
|
|
77
|
+
*
|
|
78
|
+
* All files must be in the same top-level directory and must include a SKILL.md
|
|
79
|
+
* file at the root of that directory.
|
|
80
|
+
*/
|
|
81
|
+
files: Array<Uploadable>;
|
|
82
|
+
}
|
|
83
|
+
export interface VersionRetrieveParams {
|
|
84
|
+
/**
|
|
85
|
+
* Unique identifier for the skill.
|
|
86
|
+
*
|
|
87
|
+
* The format and length of IDs may change over time.
|
|
88
|
+
*/
|
|
89
|
+
skill_id: string;
|
|
90
|
+
}
|
|
91
|
+
export interface VersionListParams extends PageCursorParams {
|
|
92
|
+
}
|
|
93
|
+
export interface VersionDeleteParams {
|
|
94
|
+
/**
|
|
95
|
+
* Unique identifier for the skill.
|
|
96
|
+
*
|
|
97
|
+
* The format and length of IDs may change over time.
|
|
98
|
+
*/
|
|
99
|
+
skill_id: string;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace Versions {
|
|
102
|
+
export { type DeletedSkillVersion as DeletedSkillVersion, type SkillVersion as SkillVersion, type SkillVersionsPageCursor as SkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=versions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,kCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAIhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAOtG;;OAEG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAK3B;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,YAAY,CAAC;IAOrD;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAInC;AAED,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;CAAG;AAE9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { PageCursor, type PageCursorParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { type Uploadable } from "../../core/uploads.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
export declare class Versions extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create Skill Version
|
|
9
|
+
*/
|
|
10
|
+
create(skillID: string, body: VersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
11
|
+
/**
|
|
12
|
+
* Get Skill Version
|
|
13
|
+
*/
|
|
14
|
+
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
15
|
+
/**
|
|
16
|
+
* List Skill Versions
|
|
17
|
+
*/
|
|
18
|
+
list(skillID: string, query?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<SkillVersionsPageCursor, SkillVersion>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete Skill Version
|
|
21
|
+
*/
|
|
22
|
+
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<DeletedSkillVersion>;
|
|
23
|
+
}
|
|
24
|
+
export type SkillVersionsPageCursor = PageCursor<SkillVersion>;
|
|
25
|
+
export interface DeletedSkillVersion {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
28
|
+
* and pins it in references.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Deleted object type.
|
|
33
|
+
*
|
|
34
|
+
* For Skill Versions, this is always `"skill_version_deleted"`.
|
|
35
|
+
*/
|
|
36
|
+
type: 'skill_version_deleted';
|
|
37
|
+
}
|
|
38
|
+
export interface SkillVersion {
|
|
39
|
+
/**
|
|
40
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
41
|
+
* and pins it in references.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* ISO 8601 timestamp of when the skill was created.
|
|
46
|
+
*/
|
|
47
|
+
created_at: string;
|
|
48
|
+
/**
|
|
49
|
+
* Description of the skill version.
|
|
50
|
+
*
|
|
51
|
+
* This is extracted from the SKILL.md file in the skill upload.
|
|
52
|
+
*/
|
|
53
|
+
description: string;
|
|
54
|
+
/**
|
|
55
|
+
* The Skill's immutable kebab-case slug, set at creation from the first upload's
|
|
56
|
+
* SKILL.md frontmatter `name` (or its enclosing directory). Every later upload
|
|
57
|
+
* must resolve to the same value. Also the top-level directory of the Skill's
|
|
58
|
+
* mounted files and the base name of a downloaded archive.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Unique identifier for the skill.
|
|
63
|
+
*
|
|
64
|
+
* The format and length of IDs may change over time.
|
|
65
|
+
*/
|
|
66
|
+
skill_id: string;
|
|
67
|
+
/**
|
|
68
|
+
* Object type.
|
|
69
|
+
*
|
|
70
|
+
* For Skill Versions, this is always `"skill_version"`.
|
|
71
|
+
*/
|
|
72
|
+
type: 'skill_version';
|
|
73
|
+
}
|
|
74
|
+
export interface VersionCreateParams {
|
|
75
|
+
/**
|
|
76
|
+
* Files to upload for the skill.
|
|
77
|
+
*
|
|
78
|
+
* All files must be in the same top-level directory and must include a SKILL.md
|
|
79
|
+
* file at the root of that directory.
|
|
80
|
+
*/
|
|
81
|
+
files: Array<Uploadable>;
|
|
82
|
+
}
|
|
83
|
+
export interface VersionRetrieveParams {
|
|
84
|
+
/**
|
|
85
|
+
* Unique identifier for the skill.
|
|
86
|
+
*
|
|
87
|
+
* The format and length of IDs may change over time.
|
|
88
|
+
*/
|
|
89
|
+
skill_id: string;
|
|
90
|
+
}
|
|
91
|
+
export interface VersionListParams extends PageCursorParams {
|
|
92
|
+
}
|
|
93
|
+
export interface VersionDeleteParams {
|
|
94
|
+
/**
|
|
95
|
+
* Unique identifier for the skill.
|
|
96
|
+
*
|
|
97
|
+
* The format and length of IDs may change over time.
|
|
98
|
+
*/
|
|
99
|
+
skill_id: string;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace Versions {
|
|
102
|
+
export { type DeletedSkillVersion as DeletedSkillVersion, type SkillVersion as SkillVersion, type SkillVersionsPageCursor as SkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,iCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAIhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAOtG;;OAEG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAK3B;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,YAAY,CAAC;IAOrD;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAInC;AAED,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;CAAG;AAE9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Versions = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const uploads_1 = require("../../internal/uploads.js");
|
|
8
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
+
class Versions extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create Skill Version
|
|
12
|
+
*/
|
|
13
|
+
create(skillID, body, options) {
|
|
14
|
+
return this._client.post((0, path_1.path) `/v1/skills/${skillID}/versions`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client, false));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get Skill Version
|
|
18
|
+
*/
|
|
19
|
+
retrieve(version, params, options) {
|
|
20
|
+
const { skill_id } = params;
|
|
21
|
+
return this._client.get((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List Skill Versions
|
|
25
|
+
*/
|
|
26
|
+
list(skillID, query = {}, options) {
|
|
27
|
+
return this._client.getAPIList((0, path_1.path) `/v1/skills/${skillID}/versions`, (pagination_1.PageCursor), {
|
|
28
|
+
query,
|
|
29
|
+
...options,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Delete Skill Version
|
|
34
|
+
*/
|
|
35
|
+
delete(version, params, options) {
|
|
36
|
+
const { skill_id } = params;
|
|
37
|
+
return this._client.delete((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`, options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Versions = Versions;
|
|
41
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAuF;AAGvF,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,IAAyB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,cAAc,OAAO,WAAW,EACpC,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,OAAe,EACf,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,WAAW,EAAE,CAAA,uBAAwB,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;CACF;AAhDD,4BAgDC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { PageCursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
export class Versions extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create Skill Version
|
|
9
|
+
*/
|
|
10
|
+
create(skillID, body, options) {
|
|
11
|
+
return this._client.post(path `/v1/skills/${skillID}/versions`, multipartFormRequestOptions({ body, ...options }, this._client, false));
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get Skill Version
|
|
15
|
+
*/
|
|
16
|
+
retrieve(version, params, options) {
|
|
17
|
+
const { skill_id } = params;
|
|
18
|
+
return this._client.get(path `/v1/skills/${skill_id}/versions/${version}`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List Skill Versions
|
|
22
|
+
*/
|
|
23
|
+
list(skillID, query = {}, options) {
|
|
24
|
+
return this._client.getAPIList(path `/v1/skills/${skillID}/versions`, (PageCursor), {
|
|
25
|
+
query,
|
|
26
|
+
...options,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete Skill Version
|
|
31
|
+
*/
|
|
32
|
+
delete(version, params, options) {
|
|
33
|
+
const { skill_id } = params;
|
|
34
|
+
return this._client.delete(path `/v1/skills/${skill_id}/versions/${version}`, options);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=versions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,UAAU,EAAsC,kCAA8B;AAGvF,OAAO,EAAE,2BAA2B,EAAE,mCAA+B;AACrE,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,IAAyB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,cAAc,OAAO,WAAW,EACpC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,OAAe,EACf,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,cAAc,OAAO,WAAW,EAAE,CAAA,UAAwB,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAEA,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAEA,kCAA+B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./skills/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,mCAA+B"}
|
package/src/client.ts
CHANGED
|
@@ -53,6 +53,14 @@ import {
|
|
|
53
53
|
CompletionCreateParamsStreaming,
|
|
54
54
|
Completions,
|
|
55
55
|
} from './resources/completions';
|
|
56
|
+
import {
|
|
57
|
+
DeletedFile,
|
|
58
|
+
FileListParams,
|
|
59
|
+
FileMetadata,
|
|
60
|
+
FileMetadataPageCursor,
|
|
61
|
+
FileUploadParams,
|
|
62
|
+
Files,
|
|
63
|
+
} from './resources/files';
|
|
56
64
|
import {
|
|
57
65
|
CapabilitySupport,
|
|
58
66
|
ContextManagementCapability,
|
|
@@ -95,6 +103,46 @@ import {
|
|
|
95
103
|
BashCodeExecutionToolResultError,
|
|
96
104
|
BashCodeExecutionToolResultErrorCode,
|
|
97
105
|
BashCodeExecutionToolResultErrorParam,
|
|
106
|
+
BrowserCloseTabConfig,
|
|
107
|
+
BrowserDoubleClickConfig,
|
|
108
|
+
BrowserFileUploadConfig,
|
|
109
|
+
BrowserFindConfig,
|
|
110
|
+
BrowserFormInputConfig,
|
|
111
|
+
BrowserGetPageTextConfig,
|
|
112
|
+
BrowserHoldKeyConfig,
|
|
113
|
+
BrowserHoverConfig,
|
|
114
|
+
BrowserJavascriptExecConfig,
|
|
115
|
+
BrowserKeyConfig,
|
|
116
|
+
BrowserLeftClickConfig,
|
|
117
|
+
BrowserLeftClickDragConfig,
|
|
118
|
+
BrowserLeftMouseDownConfig,
|
|
119
|
+
BrowserLeftMouseUpConfig,
|
|
120
|
+
BrowserListTabsConfig,
|
|
121
|
+
BrowserMiddleClickConfig,
|
|
122
|
+
BrowserMouseMoveConfig,
|
|
123
|
+
BrowserNavigateConfig,
|
|
124
|
+
BrowserNewTabConfig,
|
|
125
|
+
BrowserReadConsoleConfig,
|
|
126
|
+
BrowserReadNetworkConfig,
|
|
127
|
+
BrowserReadPageConfig,
|
|
128
|
+
BrowserRightClickConfig,
|
|
129
|
+
BrowserScreenshotConfig,
|
|
130
|
+
BrowserScrollConfig,
|
|
131
|
+
BrowserScrollToConfig,
|
|
132
|
+
BrowserStateBlockParam,
|
|
133
|
+
BrowserStateChange,
|
|
134
|
+
BrowserStateChangeDownloadCompleted,
|
|
135
|
+
BrowserStateChangeDownloadFailed,
|
|
136
|
+
BrowserStateChangeDownloadStarted,
|
|
137
|
+
BrowserStateChangeTabOpened,
|
|
138
|
+
BrowserStateTabEntry,
|
|
139
|
+
BrowserSwitchTabConfig,
|
|
140
|
+
BrowserToolset20260801,
|
|
141
|
+
BrowserToolsetConfigs,
|
|
142
|
+
BrowserTripleClickConfig,
|
|
143
|
+
BrowserTypeConfig,
|
|
144
|
+
BrowserWaitConfig,
|
|
145
|
+
BrowserZoomConfig,
|
|
98
146
|
CacheControlEphemeral,
|
|
99
147
|
CacheCreation,
|
|
100
148
|
CitationCharLocation,
|
|
@@ -125,7 +173,28 @@ import {
|
|
|
125
173
|
CodeExecutionToolResultError,
|
|
126
174
|
CodeExecutionToolResultErrorCode,
|
|
127
175
|
CodeExecutionToolResultErrorParam,
|
|
176
|
+
ComputerCursorPositionConfig,
|
|
177
|
+
ComputerDoubleClickConfig,
|
|
178
|
+
ComputerHoldKeyConfig,
|
|
179
|
+
ComputerKeyConfig,
|
|
180
|
+
ComputerLeftClickConfig,
|
|
181
|
+
ComputerLeftClickDragConfig,
|
|
182
|
+
ComputerLeftMouseDownConfig,
|
|
183
|
+
ComputerLeftMouseUpConfig,
|
|
184
|
+
ComputerMiddleClickConfig,
|
|
185
|
+
ComputerMouseMoveConfig,
|
|
186
|
+
ComputerRightClickConfig,
|
|
187
|
+
ComputerScreenshotConfig,
|
|
188
|
+
ComputerScrollConfig,
|
|
189
|
+
ComputerToolset20260801,
|
|
190
|
+
ComputerToolsetConfigs,
|
|
191
|
+
ComputerTripleClickConfig,
|
|
192
|
+
ComputerTypeConfig,
|
|
193
|
+
ComputerWaitConfig,
|
|
194
|
+
ComputerZoomConfig,
|
|
128
195
|
Container,
|
|
196
|
+
ContainerParams,
|
|
197
|
+
ContainerSkill,
|
|
129
198
|
ContainerUploadBlock,
|
|
130
199
|
ContainerUploadBlockParam,
|
|
131
200
|
ContentBlock,
|
|
@@ -140,7 +209,10 @@ import {
|
|
|
140
209
|
DocumentBlockParam,
|
|
141
210
|
EncryptedCodeExecutionResultBlock,
|
|
142
211
|
EncryptedCodeExecutionResultBlockParam,
|
|
212
|
+
FileDocumentSource,
|
|
213
|
+
FileImageSource,
|
|
143
214
|
ImageBlockParam,
|
|
215
|
+
ImageTransformationsParam,
|
|
144
216
|
InputJSONDelta,
|
|
145
217
|
JSONOutputFormat,
|
|
146
218
|
MemoryTool20250818,
|
|
@@ -149,6 +221,7 @@ import {
|
|
|
149
221
|
MessageCountTokensParams,
|
|
150
222
|
MessageCountTokensTool,
|
|
151
223
|
MessageCreateParams,
|
|
224
|
+
MessageCreateParamsContainer,
|
|
152
225
|
MessageCreateParamsNonStreaming,
|
|
153
226
|
MessageCreateParamsStreaming,
|
|
154
227
|
MessageDeltaEvent,
|
|
@@ -182,6 +255,7 @@ import {
|
|
|
182
255
|
ServerToolUseBlock,
|
|
183
256
|
ServerToolUseBlockParam,
|
|
184
257
|
SignatureDelta,
|
|
258
|
+
SkillParams,
|
|
185
259
|
StopReason,
|
|
186
260
|
TextBlock,
|
|
187
261
|
TextBlockParam,
|
|
@@ -259,6 +333,15 @@ import {
|
|
|
259
333
|
WebSearchToolResultError,
|
|
260
334
|
WebSearchToolResultErrorCode,
|
|
261
335
|
} from './resources/messages/messages';
|
|
336
|
+
import {
|
|
337
|
+
DeletedSkill,
|
|
338
|
+
Skill,
|
|
339
|
+
SkillCreateParams,
|
|
340
|
+
SkillListParams,
|
|
341
|
+
SkillSource,
|
|
342
|
+
Skills,
|
|
343
|
+
SkillsPageCursor,
|
|
344
|
+
} from './resources/skills/skills';
|
|
262
345
|
import { type Fetch } from './internal/builtin-types';
|
|
263
346
|
import { isRunningInBrowser } from './internal/detect-platform';
|
|
264
347
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
@@ -1595,12 +1678,16 @@ export class Anthropic extends BaseAnthropic {
|
|
|
1595
1678
|
completions: API.Completions = new API.Completions(this);
|
|
1596
1679
|
messages: API.Messages = new API.Messages(this);
|
|
1597
1680
|
models: API.Models = new API.Models(this);
|
|
1681
|
+
files: API.Files = new API.Files(this);
|
|
1682
|
+
skills: API.Skills = new API.Skills(this);
|
|
1598
1683
|
beta: API.Beta = new API.Beta(this);
|
|
1599
1684
|
}
|
|
1600
1685
|
|
|
1601
1686
|
Anthropic.Completions = Completions;
|
|
1602
1687
|
Anthropic.Messages = Messages;
|
|
1603
1688
|
Anthropic.Models = Models;
|
|
1689
|
+
Anthropic.Files = Files;
|
|
1690
|
+
Anthropic.Skills = Skills;
|
|
1604
1691
|
Anthropic.Beta = Beta;
|
|
1605
1692
|
|
|
1606
1693
|
export declare namespace Anthropic {
|
|
@@ -1645,6 +1732,46 @@ export declare namespace Anthropic {
|
|
|
1645
1732
|
type BashCodeExecutionToolResultError as BashCodeExecutionToolResultError,
|
|
1646
1733
|
type BashCodeExecutionToolResultErrorCode as BashCodeExecutionToolResultErrorCode,
|
|
1647
1734
|
type BashCodeExecutionToolResultErrorParam as BashCodeExecutionToolResultErrorParam,
|
|
1735
|
+
type BrowserCloseTabConfig as BrowserCloseTabConfig,
|
|
1736
|
+
type BrowserDoubleClickConfig as BrowserDoubleClickConfig,
|
|
1737
|
+
type BrowserFileUploadConfig as BrowserFileUploadConfig,
|
|
1738
|
+
type BrowserFindConfig as BrowserFindConfig,
|
|
1739
|
+
type BrowserFormInputConfig as BrowserFormInputConfig,
|
|
1740
|
+
type BrowserGetPageTextConfig as BrowserGetPageTextConfig,
|
|
1741
|
+
type BrowserHoldKeyConfig as BrowserHoldKeyConfig,
|
|
1742
|
+
type BrowserHoverConfig as BrowserHoverConfig,
|
|
1743
|
+
type BrowserJavascriptExecConfig as BrowserJavascriptExecConfig,
|
|
1744
|
+
type BrowserKeyConfig as BrowserKeyConfig,
|
|
1745
|
+
type BrowserLeftClickConfig as BrowserLeftClickConfig,
|
|
1746
|
+
type BrowserLeftClickDragConfig as BrowserLeftClickDragConfig,
|
|
1747
|
+
type BrowserLeftMouseDownConfig as BrowserLeftMouseDownConfig,
|
|
1748
|
+
type BrowserLeftMouseUpConfig as BrowserLeftMouseUpConfig,
|
|
1749
|
+
type BrowserListTabsConfig as BrowserListTabsConfig,
|
|
1750
|
+
type BrowserMiddleClickConfig as BrowserMiddleClickConfig,
|
|
1751
|
+
type BrowserMouseMoveConfig as BrowserMouseMoveConfig,
|
|
1752
|
+
type BrowserNavigateConfig as BrowserNavigateConfig,
|
|
1753
|
+
type BrowserNewTabConfig as BrowserNewTabConfig,
|
|
1754
|
+
type BrowserReadConsoleConfig as BrowserReadConsoleConfig,
|
|
1755
|
+
type BrowserReadNetworkConfig as BrowserReadNetworkConfig,
|
|
1756
|
+
type BrowserReadPageConfig as BrowserReadPageConfig,
|
|
1757
|
+
type BrowserRightClickConfig as BrowserRightClickConfig,
|
|
1758
|
+
type BrowserScreenshotConfig as BrowserScreenshotConfig,
|
|
1759
|
+
type BrowserScrollConfig as BrowserScrollConfig,
|
|
1760
|
+
type BrowserScrollToConfig as BrowserScrollToConfig,
|
|
1761
|
+
type BrowserStateBlockParam as BrowserStateBlockParam,
|
|
1762
|
+
type BrowserStateChange as BrowserStateChange,
|
|
1763
|
+
type BrowserStateChangeDownloadCompleted as BrowserStateChangeDownloadCompleted,
|
|
1764
|
+
type BrowserStateChangeDownloadFailed as BrowserStateChangeDownloadFailed,
|
|
1765
|
+
type BrowserStateChangeDownloadStarted as BrowserStateChangeDownloadStarted,
|
|
1766
|
+
type BrowserStateChangeTabOpened as BrowserStateChangeTabOpened,
|
|
1767
|
+
type BrowserStateTabEntry as BrowserStateTabEntry,
|
|
1768
|
+
type BrowserSwitchTabConfig as BrowserSwitchTabConfig,
|
|
1769
|
+
type BrowserToolset20260801 as BrowserToolset20260801,
|
|
1770
|
+
type BrowserToolsetConfigs as BrowserToolsetConfigs,
|
|
1771
|
+
type BrowserTripleClickConfig as BrowserTripleClickConfig,
|
|
1772
|
+
type BrowserTypeConfig as BrowserTypeConfig,
|
|
1773
|
+
type BrowserWaitConfig as BrowserWaitConfig,
|
|
1774
|
+
type BrowserZoomConfig as BrowserZoomConfig,
|
|
1648
1775
|
type CacheControlEphemeral as CacheControlEphemeral,
|
|
1649
1776
|
type CacheCreation as CacheCreation,
|
|
1650
1777
|
type CitationCharLocation as CitationCharLocation,
|
|
@@ -1675,7 +1802,28 @@ export declare namespace Anthropic {
|
|
|
1675
1802
|
type CodeExecutionToolResultError as CodeExecutionToolResultError,
|
|
1676
1803
|
type CodeExecutionToolResultErrorCode as CodeExecutionToolResultErrorCode,
|
|
1677
1804
|
type CodeExecutionToolResultErrorParam as CodeExecutionToolResultErrorParam,
|
|
1805
|
+
type ComputerCursorPositionConfig as ComputerCursorPositionConfig,
|
|
1806
|
+
type ComputerDoubleClickConfig as ComputerDoubleClickConfig,
|
|
1807
|
+
type ComputerHoldKeyConfig as ComputerHoldKeyConfig,
|
|
1808
|
+
type ComputerKeyConfig as ComputerKeyConfig,
|
|
1809
|
+
type ComputerLeftClickConfig as ComputerLeftClickConfig,
|
|
1810
|
+
type ComputerLeftClickDragConfig as ComputerLeftClickDragConfig,
|
|
1811
|
+
type ComputerLeftMouseDownConfig as ComputerLeftMouseDownConfig,
|
|
1812
|
+
type ComputerLeftMouseUpConfig as ComputerLeftMouseUpConfig,
|
|
1813
|
+
type ComputerMiddleClickConfig as ComputerMiddleClickConfig,
|
|
1814
|
+
type ComputerMouseMoveConfig as ComputerMouseMoveConfig,
|
|
1815
|
+
type ComputerRightClickConfig as ComputerRightClickConfig,
|
|
1816
|
+
type ComputerScreenshotConfig as ComputerScreenshotConfig,
|
|
1817
|
+
type ComputerScrollConfig as ComputerScrollConfig,
|
|
1818
|
+
type ComputerToolset20260801 as ComputerToolset20260801,
|
|
1819
|
+
type ComputerToolsetConfigs as ComputerToolsetConfigs,
|
|
1820
|
+
type ComputerTripleClickConfig as ComputerTripleClickConfig,
|
|
1821
|
+
type ComputerTypeConfig as ComputerTypeConfig,
|
|
1822
|
+
type ComputerWaitConfig as ComputerWaitConfig,
|
|
1823
|
+
type ComputerZoomConfig as ComputerZoomConfig,
|
|
1678
1824
|
type Container as Container,
|
|
1825
|
+
type ContainerParams as ContainerParams,
|
|
1826
|
+
type ContainerSkill as ContainerSkill,
|
|
1679
1827
|
type ContainerUploadBlock as ContainerUploadBlock,
|
|
1680
1828
|
type ContainerUploadBlockParam as ContainerUploadBlockParam,
|
|
1681
1829
|
type ContentBlock as ContentBlock,
|
|
@@ -1690,12 +1838,16 @@ export declare namespace Anthropic {
|
|
|
1690
1838
|
type DocumentBlockParam as DocumentBlockParam,
|
|
1691
1839
|
type EncryptedCodeExecutionResultBlock as EncryptedCodeExecutionResultBlock,
|
|
1692
1840
|
type EncryptedCodeExecutionResultBlockParam as EncryptedCodeExecutionResultBlockParam,
|
|
1841
|
+
type FileDocumentSource as FileDocumentSource,
|
|
1842
|
+
type FileImageSource as FileImageSource,
|
|
1693
1843
|
type ImageBlockParam as ImageBlockParam,
|
|
1844
|
+
type ImageTransformationsParam as ImageTransformationsParam,
|
|
1694
1845
|
type InputJSONDelta as InputJSONDelta,
|
|
1695
1846
|
type JSONOutputFormat as JSONOutputFormat,
|
|
1696
1847
|
type MemoryTool20250818 as MemoryTool20250818,
|
|
1697
1848
|
type Message as Message,
|
|
1698
1849
|
type MessageCountTokensTool as MessageCountTokensTool,
|
|
1850
|
+
type MessageCreateParamsContainer as MessageCreateParamsContainer,
|
|
1699
1851
|
type MessageDeltaEvent as MessageDeltaEvent,
|
|
1700
1852
|
type MessageDeltaUsage as MessageDeltaUsage,
|
|
1701
1853
|
type MessageParam as MessageParam,
|
|
@@ -1726,6 +1878,7 @@ export declare namespace Anthropic {
|
|
|
1726
1878
|
type ServerToolUseBlock as ServerToolUseBlock,
|
|
1727
1879
|
type ServerToolUseBlockParam as ServerToolUseBlockParam,
|
|
1728
1880
|
type SignatureDelta as SignatureDelta,
|
|
1881
|
+
type SkillParams as SkillParams,
|
|
1729
1882
|
type StopReason as StopReason,
|
|
1730
1883
|
type TextBlock as TextBlock,
|
|
1731
1884
|
type TextBlockParam as TextBlockParam,
|
|
@@ -1823,6 +1976,25 @@ export declare namespace Anthropic {
|
|
|
1823
1976
|
type ModelListParams as ModelListParams,
|
|
1824
1977
|
};
|
|
1825
1978
|
|
|
1979
|
+
export {
|
|
1980
|
+
Files as Files,
|
|
1981
|
+
type DeletedFile as DeletedFile,
|
|
1982
|
+
type FileMetadata as FileMetadata,
|
|
1983
|
+
type FileMetadataPageCursor as FileMetadataPageCursor,
|
|
1984
|
+
type FileListParams as FileListParams,
|
|
1985
|
+
type FileUploadParams as FileUploadParams,
|
|
1986
|
+
};
|
|
1987
|
+
|
|
1988
|
+
export {
|
|
1989
|
+
Skills as Skills,
|
|
1990
|
+
type DeletedSkill as DeletedSkill,
|
|
1991
|
+
type Skill as Skill,
|
|
1992
|
+
type SkillSource as SkillSource,
|
|
1993
|
+
type SkillsPageCursor as SkillsPageCursor,
|
|
1994
|
+
type SkillCreateParams as SkillCreateParams,
|
|
1995
|
+
type SkillListParams as SkillListParams,
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1826
1998
|
export {
|
|
1827
1999
|
Beta as Beta,
|
|
1828
2000
|
type AnthropicBeta as AnthropicBeta,
|