langsmith 0.7.8 → 0.7.9

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.
Files changed (228) hide show
  1. package/README.md +161 -15
  2. package/dist/_openapi_client/client.cjs +814 -0
  3. package/dist/_openapi_client/client.d.ts +247 -0
  4. package/dist/_openapi_client/client.js +777 -0
  5. package/dist/_openapi_client/core/api-promise.cjs +100 -0
  6. package/dist/_openapi_client/core/api-promise.d.ts +45 -0
  7. package/dist/_openapi_client/core/api-promise.js +96 -0
  8. package/dist/_openapi_client/core/error.cjs +134 -0
  9. package/dist/_openapi_client/core/error.d.ts +45 -0
  10. package/dist/_openapi_client/core/error.js +118 -0
  11. package/dist/_openapi_client/core/pagination.cjs +374 -0
  12. package/dist/_openapi_client/core/pagination.d.ts +157 -0
  13. package/dist/_openapi_client/core/pagination.js +361 -0
  14. package/dist/_openapi_client/core/resource.cjs +17 -0
  15. package/dist/_openapi_client/core/resource.d.ts +5 -0
  16. package/dist/_openapi_client/core/resource.js +13 -0
  17. package/dist/_openapi_client/core/uploads.cjs +5 -0
  18. package/dist/_openapi_client/core/uploads.d.ts +2 -0
  19. package/dist/_openapi_client/core/uploads.js +1 -0
  20. package/dist/_openapi_client/index.cjs +29 -0
  21. package/dist/_openapi_client/index.d.ts +6 -0
  22. package/dist/_openapi_client/index.js +8 -0
  23. package/dist/_openapi_client/internal/builtin-types.cjs +4 -0
  24. package/dist/_openapi_client/internal/builtin-types.d.ts +72 -0
  25. package/dist/_openapi_client/internal/builtin-types.js +3 -0
  26. package/dist/_openapi_client/internal/detect-platform.cjs +162 -0
  27. package/dist/_openapi_client/internal/detect-platform.d.ts +14 -0
  28. package/dist/_openapi_client/internal/detect-platform.js +157 -0
  29. package/dist/_openapi_client/internal/errors.cjs +41 -0
  30. package/dist/_openapi_client/internal/errors.d.ts +2 -0
  31. package/dist/_openapi_client/internal/errors.js +36 -0
  32. package/dist/_openapi_client/internal/headers.cjs +79 -0
  33. package/dist/_openapi_client/internal/headers.d.ts +5 -0
  34. package/dist/_openapi_client/internal/headers.js +74 -0
  35. package/dist/_openapi_client/internal/parse.cjs +40 -0
  36. package/dist/_openapi_client/internal/parse.d.ts +11 -0
  37. package/dist/_openapi_client/internal/parse.js +37 -0
  38. package/dist/_openapi_client/internal/qs/formats.cjs +12 -0
  39. package/dist/_openapi_client/internal/qs/formats.d.ts +6 -0
  40. package/dist/_openapi_client/internal/qs/formats.js +8 -0
  41. package/dist/_openapi_client/internal/qs/stringify.cjs +277 -0
  42. package/dist/_openapi_client/internal/qs/stringify.d.ts +2 -0
  43. package/dist/_openapi_client/internal/qs/stringify.js +274 -0
  44. package/dist/_openapi_client/internal/qs/types.cjs +2 -0
  45. package/dist/_openapi_client/internal/qs/types.d.ts +56 -0
  46. package/dist/_openapi_client/internal/qs/types.js +1 -0
  47. package/dist/_openapi_client/internal/qs/utils.cjs +230 -0
  48. package/dist/_openapi_client/internal/qs/utils.d.ts +14 -0
  49. package/dist/_openapi_client/internal/qs/utils.js +217 -0
  50. package/dist/_openapi_client/internal/request-options.cjs +14 -0
  51. package/dist/_openapi_client/internal/request-options.d.ts +74 -0
  52. package/dist/_openapi_client/internal/request-options.js +10 -0
  53. package/dist/_openapi_client/internal/shim-types.cjs +4 -0
  54. package/dist/_openapi_client/internal/shim-types.d.ts +16 -0
  55. package/dist/_openapi_client/internal/shim-types.js +3 -0
  56. package/dist/_openapi_client/internal/shims.cjs +92 -0
  57. package/dist/_openapi_client/internal/shims.d.ts +25 -0
  58. package/dist/_openapi_client/internal/shims.js +85 -0
  59. package/dist/_openapi_client/internal/to-file.cjs +91 -0
  60. package/dist/_openapi_client/internal/to-file.d.ts +44 -0
  61. package/dist/_openapi_client/internal/to-file.js +88 -0
  62. package/dist/_openapi_client/internal/types.cjs +4 -0
  63. package/dist/_openapi_client/internal/types.d.ts +62 -0
  64. package/dist/_openapi_client/internal/types.js +3 -0
  65. package/dist/_openapi_client/internal/uploads.cjs +140 -0
  66. package/dist/_openapi_client/internal/uploads.d.ts +41 -0
  67. package/dist/_openapi_client/internal/uploads.js +130 -0
  68. package/dist/_openapi_client/internal/utils/env.cjs +22 -0
  69. package/dist/_openapi_client/internal/utils/env.d.ts +8 -0
  70. package/dist/_openapi_client/internal/utils/env.js +18 -0
  71. package/dist/_openapi_client/internal/utils/log.cjs +88 -0
  72. package/dist/_openapi_client/internal/utils/log.d.ts +36 -0
  73. package/dist/_openapi_client/internal/utils/log.js +82 -0
  74. package/dist/_openapi_client/internal/utils/path.cjs +79 -0
  75. package/dist/_openapi_client/internal/utils/path.d.ts +14 -0
  76. package/dist/_openapi_client/internal/utils/path.js +74 -0
  77. package/dist/_openapi_client/internal/utils/query.cjs +42 -0
  78. package/dist/_openapi_client/internal/utils/query.d.ts +1 -0
  79. package/dist/_openapi_client/internal/utils/query.js +6 -0
  80. package/dist/_openapi_client/internal/utils/sleep.cjs +7 -0
  81. package/dist/_openapi_client/internal/utils/sleep.d.ts +1 -0
  82. package/dist/_openapi_client/internal/utils/sleep.js +3 -0
  83. package/dist/_openapi_client/internal/utils/uuid.cjs +19 -0
  84. package/dist/_openapi_client/internal/utils/uuid.d.ts +4 -0
  85. package/dist/_openapi_client/internal/utils/uuid.js +15 -0
  86. package/dist/_openapi_client/internal/utils/values.cjs +112 -0
  87. package/dist/_openapi_client/internal/utils/values.d.ts +17 -0
  88. package/dist/_openapi_client/internal/utils/values.js +94 -0
  89. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +138 -0
  90. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +367 -0
  91. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +101 -0
  92. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +46 -0
  93. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +128 -0
  94. package/dist/_openapi_client/resources/annotation-queues/runs.js +42 -0
  95. package/dist/_openapi_client/resources/commits.cjs +44 -0
  96. package/dist/_openapi_client/resources/commits.d.ts +204 -0
  97. package/dist/_openapi_client/resources/commits.js +40 -0
  98. package/dist/_openapi_client/resources/datasets/comparative.cjs +22 -0
  99. package/dist/_openapi_client/resources/datasets/comparative.d.ts +55 -0
  100. package/dist/_openapi_client/resources/datasets/comparative.js +18 -0
  101. package/dist/_openapi_client/resources/datasets/datasets.cjs +193 -0
  102. package/dist/_openapi_client/resources/datasets/datasets.d.ts +374 -0
  103. package/dist/_openapi_client/resources/datasets/datasets.js +156 -0
  104. package/dist/_openapi_client/resources/datasets/experiments.cjs +16 -0
  105. package/dist/_openapi_client/resources/datasets/experiments.d.ts +23 -0
  106. package/dist/_openapi_client/resources/datasets/experiments.js +12 -0
  107. package/dist/_openapi_client/resources/datasets/group.cjs +17 -0
  108. package/dist/_openapi_client/resources/datasets/group.d.ts +160 -0
  109. package/dist/_openapi_client/resources/datasets/group.js +13 -0
  110. package/dist/_openapi_client/resources/datasets/runs.cjs +29 -0
  111. package/dist/_openapi_client/resources/datasets/runs.d.ts +216 -0
  112. package/dist/_openapi_client/resources/datasets/runs.js +25 -0
  113. package/dist/_openapi_client/resources/datasets/share.cjs +32 -0
  114. package/dist/_openapi_client/resources/datasets/share.d.ts +28 -0
  115. package/dist/_openapi_client/resources/datasets/share.js +28 -0
  116. package/dist/_openapi_client/resources/datasets/splits.cjs +22 -0
  117. package/dist/_openapi_client/resources/datasets/splits.d.ts +30 -0
  118. package/dist/_openapi_client/resources/datasets/splits.js +18 -0
  119. package/dist/_openapi_client/resources/datasets/versions.cjs +23 -0
  120. package/dist/_openapi_client/resources/datasets/versions.d.ts +36 -0
  121. package/dist/_openapi_client/resources/datasets/versions.js +19 -0
  122. package/dist/_openapi_client/resources/evaluators.cjs +15 -0
  123. package/dist/_openapi_client/resources/evaluators.d.ts +125 -0
  124. package/dist/_openapi_client/resources/evaluators.js +11 -0
  125. package/dist/_openapi_client/resources/examples/bulk.cjs +24 -0
  126. package/dist/_openapi_client/resources/examples/bulk.d.ts +78 -0
  127. package/dist/_openapi_client/resources/examples/bulk.js +20 -0
  128. package/dist/_openapi_client/resources/examples/examples.cjs +124 -0
  129. package/dist/_openapi_client/resources/examples/examples.d.ts +182 -0
  130. package/dist/_openapi_client/resources/examples/examples.js +87 -0
  131. package/dist/_openapi_client/resources/examples/validate.cjs +21 -0
  132. package/dist/_openapi_client/resources/examples/validate.d.ts +38 -0
  133. package/dist/_openapi_client/resources/examples/validate.js +17 -0
  134. package/dist/_openapi_client/resources/feedback/configs.cjs +24 -0
  135. package/dist/_openapi_client/resources/feedback/configs.d.ts +18 -0
  136. package/dist/_openapi_client/resources/feedback/configs.js +20 -0
  137. package/dist/_openapi_client/resources/feedback/feedback.cjs +98 -0
  138. package/dist/_openapi_client/resources/feedback/feedback.d.ts +275 -0
  139. package/dist/_openapi_client/resources/feedback/feedback.js +61 -0
  140. package/dist/_openapi_client/resources/feedback/tokens.cjs +35 -0
  141. package/dist/_openapi_client/resources/feedback/tokens.d.ts +130 -0
  142. package/dist/_openapi_client/resources/feedback/tokens.js +31 -0
  143. package/dist/_openapi_client/resources/index.cjs +35 -0
  144. package/dist/_openapi_client/resources/index.d.ts +15 -0
  145. package/dist/_openapi_client/resources/index.js +17 -0
  146. package/dist/_openapi_client/resources/info.cjs +15 -0
  147. package/dist/_openapi_client/resources/info.d.ts +51 -0
  148. package/dist/_openapi_client/resources/info.js +11 -0
  149. package/dist/_openapi_client/resources/online-evaluators.cjs +70 -0
  150. package/dist/_openapi_client/resources/online-evaluators.d.ts +284 -0
  151. package/dist/_openapi_client/resources/online-evaluators.js +66 -0
  152. package/dist/_openapi_client/resources/public/datasets.cjs +47 -0
  153. package/dist/_openapi_client/resources/public/datasets.d.ts +152 -0
  154. package/dist/_openapi_client/resources/public/datasets.js +43 -0
  155. package/dist/_openapi_client/resources/public/public.cjs +62 -0
  156. package/dist/_openapi_client/resources/public/public.d.ts +32 -0
  157. package/dist/_openapi_client/resources/public/public.js +25 -0
  158. package/dist/_openapi_client/resources/repos/directories.cjs +40 -0
  159. package/dist/_openapi_client/resources/repos/directories.d.ts +72 -0
  160. package/dist/_openapi_client/resources/repos/directories.js +36 -0
  161. package/dist/_openapi_client/resources/repos/repos.cjs +93 -0
  162. package/dist/_openapi_client/resources/repos/repos.d.ts +188 -0
  163. package/dist/_openapi_client/resources/repos/repos.js +56 -0
  164. package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
  165. package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
  166. package/dist/_openapi_client/resources/runs/rules.js +5 -0
  167. package/dist/_openapi_client/resources/runs/runs.cjs +102 -0
  168. package/dist/_openapi_client/resources/runs/runs.d.ts +542 -0
  169. package/dist/_openapi_client/resources/runs/runs.js +65 -0
  170. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
  171. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +1121 -0
  172. package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
  173. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +63 -0
  174. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +13 -0
  175. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +26 -0
  176. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
  177. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +130 -0
  178. package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
  179. package/dist/_openapi_client/resources/sessions/insights.cjs +54 -0
  180. package/dist/_openapi_client/resources/sessions/insights.d.ts +246 -0
  181. package/dist/_openapi_client/resources/sessions/insights.js +50 -0
  182. package/dist/_openapi_client/resources/sessions/sessions.cjs +109 -0
  183. package/dist/_openapi_client/resources/sessions/sessions.d.ts +674 -0
  184. package/dist/_openapi_client/resources/sessions/sessions.js +72 -0
  185. package/dist/_openapi_client/resources/settings.cjs +15 -0
  186. package/dist/_openapi_client/resources/settings.d.ts +18 -0
  187. package/dist/_openapi_client/resources/settings.js +11 -0
  188. package/dist/_openapi_client/resources/workspaces.cjs +35 -0
  189. package/dist/_openapi_client/resources/workspaces.d.ts +84 -0
  190. package/dist/_openapi_client/resources/workspaces.js +31 -0
  191. package/dist/_openapi_client/version.cjs +5 -0
  192. package/dist/_openapi_client/version.d.ts +1 -0
  193. package/dist/_openapi_client/version.js +2 -0
  194. package/dist/client.cjs +48 -19
  195. package/dist/client.d.ts +5 -0
  196. package/dist/client.js +29 -0
  197. package/dist/env.cjs +3 -3
  198. package/dist/env.d.ts +1 -1
  199. package/dist/env.js +1 -1
  200. package/dist/experimental/otel/exporter.cjs +1 -1
  201. package/dist/experimental/otel/exporter.js +2 -2
  202. package/dist/experimental/vercel/telemetry.cjs +1 -1
  203. package/dist/experimental/vercel/telemetry.js +2 -2
  204. package/dist/index.cjs +4 -2
  205. package/dist/index.d.ts +2 -1
  206. package/dist/index.js +2 -1
  207. package/dist/run_trees.cjs +1 -1
  208. package/dist/run_trees.js +2 -2
  209. package/dist/sandbox/client.cjs +11 -3
  210. package/dist/sandbox/client.js +11 -3
  211. package/dist/sandbox/index.cjs +8 -2
  212. package/dist/sandbox/index.d.ts +3 -2
  213. package/dist/sandbox/index.js +2 -1
  214. package/dist/sandbox/mounts.cjs +114 -0
  215. package/dist/sandbox/mounts.d.ts +24 -0
  216. package/dist/sandbox/mounts.js +109 -0
  217. package/dist/sandbox/proxy_config.cjs +90 -5
  218. package/dist/sandbox/proxy_config.d.ts +19 -4
  219. package/dist/sandbox/proxy_config.js +86 -4
  220. package/dist/sandbox/types.d.ts +92 -3
  221. package/dist/traceable.cjs +1 -1
  222. package/dist/traceable.js +2 -2
  223. package/dist/utils/guard.cjs +13 -0
  224. package/dist/utils/guard.d.ts +6 -0
  225. package/dist/utils/guard.js +10 -0
  226. package/dist/utils/jestlike/globals.cjs +1 -1
  227. package/dist/utils/jestlike/globals.js +2 -2
  228. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import * as FeedbackAPI from '../feedback/feedback.js';
3
+ import { FeedbackSchemasOffsetPaginationTopLevelArray } from '../feedback/feedback.js';
4
+ import * as DatasetsAPI from './datasets.js';
5
+ import { DatasetListComparativeParams, DatasetListComparativeResponse, DatasetListComparativeResponsesOffsetPaginationTopLevelArray, DatasetListFeedbackParams, DatasetListParams, DatasetListResponse, DatasetListSessionsParams, DatasetRetrieveSessionsBulkParams, DatasetRetrieveSessionsBulkResponse, Datasets } from './datasets.js';
6
+ import { type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
7
+ import { RequestOptions } from '../../internal/request-options.js';
8
+ export declare class Public extends APIResource {
9
+ datasets: DatasetsAPI.Datasets;
10
+ /**
11
+ * Read Shared Feedbacks
12
+ */
13
+ retrieveFeedbacks(shareToken: string, query?: PublicRetrieveFeedbacksParams | null | undefined, options?: RequestOptions): PagePromise<FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackAPI.FeedbackSchema>;
14
+ }
15
+ export interface PublicRetrieveFeedbacksParams extends OffsetPaginationTopLevelArrayParams {
16
+ has_comment?: boolean | null;
17
+ has_score?: boolean | null;
18
+ key?: Array<string> | null;
19
+ /**
20
+ * Enum for feedback levels.
21
+ */
22
+ level?: FeedbackAPI.FeedbackLevel | null;
23
+ run?: Array<string> | null;
24
+ session?: Array<string> | null;
25
+ source?: Array<FeedbackAPI.SourceType> | null;
26
+ user?: Array<string> | null;
27
+ }
28
+ export declare namespace Public {
29
+ export { type PublicRetrieveFeedbacksParams as PublicRetrieveFeedbacksParams };
30
+ export { Datasets as Datasets, type DatasetListResponse as DatasetListResponse, type DatasetListComparativeResponse as DatasetListComparativeResponse, type DatasetRetrieveSessionsBulkResponse as DatasetRetrieveSessionsBulkResponse, type DatasetListComparativeResponsesOffsetPaginationTopLevelArray as DatasetListComparativeResponsesOffsetPaginationTopLevelArray, type DatasetListParams as DatasetListParams, type DatasetListComparativeParams as DatasetListComparativeParams, type DatasetListFeedbackParams as DatasetListFeedbackParams, type DatasetListSessionsParams as DatasetListSessionsParams, type DatasetRetrieveSessionsBulkParams as DatasetRetrieveSessionsBulkParams, };
31
+ }
32
+ export { type FeedbackSchemasOffsetPaginationTopLevelArray };
@@ -0,0 +1,25 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ import * as DatasetsAPI from './datasets.js';
5
+ import { Datasets, } from './datasets.js';
6
+ import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
7
+ import { path } from '../../internal/utils/path.js';
8
+ export class Public extends APIResource {
9
+ constructor() {
10
+ super(...arguments);
11
+ Object.defineProperty(this, "datasets", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: new DatasetsAPI.Datasets(this._client)
16
+ });
17
+ }
18
+ /**
19
+ * Read Shared Feedbacks
20
+ */
21
+ retrieveFeedbacks(shareToken, query = {}, options) {
22
+ return this._client.getAPIList(path `/api/v1/public/${shareToken}/feedbacks`, (OffsetPaginationTopLevelArray), { query, ...options });
23
+ }
24
+ }
25
+ Public.Datasets = Datasets;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Directories = void 0;
6
+ const resource_js_1 = require("../../core/resource.cjs");
7
+ const headers_js_1 = require("../../internal/headers.cjs");
8
+ const path_js_1 = require("../../internal/utils/path.cjs");
9
+ class Directories extends resource_js_1.APIResource {
10
+ /**
11
+ * Resolves the flattened file tree for an agent or skill repository at a specific
12
+ * commit, tag, or latest.
13
+ */
14
+ list(repo, params, options) {
15
+ const { owner, ...query } = params;
16
+ return this._client.get((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories`, { query, ...options });
17
+ }
18
+ /**
19
+ * Deletes an agent or skill repository and its owned child file repositories.
20
+ */
21
+ delete(repo, params, options) {
22
+ const { owner } = params;
23
+ return this._client.delete((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories`, {
24
+ ...options,
25
+ headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
26
+ });
27
+ }
28
+ /**
29
+ * Creates a new directory commit for an agent or skill repository by applying
30
+ * file/link create, update, and delete operations.
31
+ */
32
+ commit(repo, params, options) {
33
+ const { owner, ...body } = params;
34
+ return this._client.post((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories/commits`, {
35
+ body,
36
+ ...options,
37
+ });
38
+ }
39
+ }
40
+ exports.Directories = Directories;
@@ -0,0 +1,72 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import { APIPromise } from '../../core/api-promise.js';
3
+ import { RequestOptions } from '../../internal/request-options.js';
4
+ export declare class Directories extends APIResource {
5
+ /**
6
+ * Resolves the flattened file tree for an agent or skill repository at a specific
7
+ * commit, tag, or latest.
8
+ */
9
+ list(repo: string, params: DirectoryListParams, options?: RequestOptions): APIPromise<DirectoryListResponse>;
10
+ /**
11
+ * Deletes an agent or skill repository and its owned child file repositories.
12
+ */
13
+ delete(repo: string, params: DirectoryDeleteParams, options?: RequestOptions): APIPromise<void>;
14
+ /**
15
+ * Creates a new directory commit for an agent or skill repository by applying
16
+ * file/link create, update, and delete operations.
17
+ */
18
+ commit(repo: string, params: DirectoryCommitParams, options?: RequestOptions): APIPromise<DirectoryCommitResponse>;
19
+ }
20
+ export interface DirectoryListResponse {
21
+ commit_hash?: string;
22
+ commit_id?: string;
23
+ files?: {
24
+ [key: string]: unknown;
25
+ };
26
+ }
27
+ export interface DirectoryCommitResponse {
28
+ commit?: DirectoryCommitResponse.Commit;
29
+ }
30
+ export declare namespace DirectoryCommitResponse {
31
+ interface Commit {
32
+ id?: string;
33
+ commit_hash?: string;
34
+ created_at?: string;
35
+ }
36
+ }
37
+ export interface DirectoryListParams {
38
+ /**
39
+ * Path param: Repository owner handle or '-' for current tenant
40
+ */
41
+ owner: string;
42
+ /**
43
+ * Query param: Commit hash/tag to resolve (defaults to latest)
44
+ */
45
+ commit?: string;
46
+ }
47
+ export interface DirectoryDeleteParams {
48
+ /**
49
+ * Repository owner handle or '-' for current tenant
50
+ */
51
+ owner: string;
52
+ }
53
+ export interface DirectoryCommitParams {
54
+ /**
55
+ * Path param: Repository owner handle or '-' for current tenant
56
+ */
57
+ owner: string;
58
+ /**
59
+ * Body param: Files maps path to an Entry (object = create/update/link, null =
60
+ * delete/unlink).
61
+ */
62
+ files?: {
63
+ [key: string]: unknown;
64
+ };
65
+ /**
66
+ * Body param
67
+ */
68
+ parent_commit?: string;
69
+ }
70
+ export declare namespace Directories {
71
+ export { type DirectoryListResponse as DirectoryListResponse, type DirectoryCommitResponse as DirectoryCommitResponse, type DirectoryListParams as DirectoryListParams, type DirectoryDeleteParams as DirectoryDeleteParams, type DirectoryCommitParams as DirectoryCommitParams, };
72
+ }
@@ -0,0 +1,36 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ import { buildHeaders } from '../../internal/headers.js';
5
+ import { path } from '../../internal/utils/path.js';
6
+ export class Directories extends APIResource {
7
+ /**
8
+ * Resolves the flattened file tree for an agent or skill repository at a specific
9
+ * commit, tag, or latest.
10
+ */
11
+ list(repo, params, options) {
12
+ const { owner, ...query } = params;
13
+ return this._client.get(path `/v1/platform/hub/repos/${owner}/${repo}/directories`, { query, ...options });
14
+ }
15
+ /**
16
+ * Deletes an agent or skill repository and its owned child file repositories.
17
+ */
18
+ delete(repo, params, options) {
19
+ const { owner } = params;
20
+ return this._client.delete(path `/v1/platform/hub/repos/${owner}/${repo}/directories`, {
21
+ ...options,
22
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
23
+ });
24
+ }
25
+ /**
26
+ * Creates a new directory commit for an agent or skill repository by applying
27
+ * file/link create, update, and delete operations.
28
+ */
29
+ commit(repo, params, options) {
30
+ const { owner, ...body } = params;
31
+ return this._client.post(path `/v1/platform/hub/repos/${owner}/${repo}/directories/commits`, {
32
+ body,
33
+ ...options,
34
+ });
35
+ }
36
+ }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.Repos = void 0;
39
+ const resource_js_1 = require("../../core/resource.cjs");
40
+ const DirectoriesAPI = __importStar(require("./directories.cjs"));
41
+ const directories_js_1 = require("./directories.cjs");
42
+ const pagination_js_1 = require("../../core/pagination.cjs");
43
+ const path_js_1 = require("../../internal/utils/path.cjs");
44
+ class Repos extends resource_js_1.APIResource {
45
+ constructor() {
46
+ super(...arguments);
47
+ Object.defineProperty(this, "directories", {
48
+ enumerable: true,
49
+ configurable: true,
50
+ writable: true,
51
+ value: new DirectoriesAPI.Directories(this._client)
52
+ });
53
+ }
54
+ /**
55
+ * Create a repo.
56
+ */
57
+ create(body, options) {
58
+ return this._client.post('/api/v1/repos', { body, ...options });
59
+ }
60
+ /**
61
+ * Get a repo.
62
+ */
63
+ retrieve(repo, params, options) {
64
+ const { owner } = params;
65
+ return this._client.get((0, path_js_1.path) `/api/v1/repos/${owner}/${repo}`, options);
66
+ }
67
+ /**
68
+ * Update a repo.
69
+ */
70
+ update(repo, params, options) {
71
+ const { owner, ...body } = params;
72
+ return this._client.patch((0, path_js_1.path) `/api/v1/repos/${owner}/${repo}`, { body, ...options });
73
+ }
74
+ /**
75
+ * Get all repos.
76
+ */
77
+ list(params = {}, options) {
78
+ const { single_repo_type, ...query } = params ?? {};
79
+ return this._client.getAPIList('/api/v1/repos', (pagination_js_1.OffsetPaginationRepos), {
80
+ query: { repo_type: single_repo_type, ...query },
81
+ ...options,
82
+ });
83
+ }
84
+ /**
85
+ * Delete a repo.
86
+ */
87
+ delete(repo, params, options) {
88
+ const { owner } = params;
89
+ return this._client.delete((0, path_js_1.path) `/api/v1/repos/${owner}/${repo}`, options);
90
+ }
91
+ }
92
+ exports.Repos = Repos;
93
+ Repos.Directories = directories_js_1.Directories;
@@ -0,0 +1,188 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import * as CommitsAPI from '../commits.js';
3
+ import * as DirectoriesAPI from './directories.js';
4
+ import { Directories, DirectoryCommitParams, DirectoryCommitResponse, DirectoryDeleteParams, DirectoryListParams, DirectoryListResponse } from './directories.js';
5
+ import { APIPromise } from '../../core/api-promise.js';
6
+ import { OffsetPaginationRepos, type OffsetPaginationReposParams, PagePromise } from '../../core/pagination.js';
7
+ import { RequestOptions } from '../../internal/request-options.js';
8
+ export declare class Repos extends APIResource {
9
+ directories: DirectoriesAPI.Directories;
10
+ /**
11
+ * Create a repo.
12
+ */
13
+ create(body: RepoCreateParams, options?: RequestOptions): APIPromise<CreateRepoResponse>;
14
+ /**
15
+ * Get a repo.
16
+ */
17
+ retrieve(repo: string, params: RepoRetrieveParams, options?: RequestOptions): APIPromise<GetRepoResponse>;
18
+ /**
19
+ * Update a repo.
20
+ */
21
+ update(repo: string, params: RepoUpdateParams, options?: RequestOptions): APIPromise<CreateRepoResponse>;
22
+ /**
23
+ * Get all repos.
24
+ */
25
+ list(params?: RepoListParams | null | undefined, options?: RequestOptions): PagePromise<RepoWithLookupsOffsetPaginationRepos, RepoWithLookups>;
26
+ /**
27
+ * Delete a repo.
28
+ */
29
+ delete(repo: string, params: RepoDeleteParams, options?: RequestOptions): APIPromise<unknown>;
30
+ }
31
+ export type RepoWithLookupsOffsetPaginationRepos = OffsetPaginationRepos<RepoWithLookups>;
32
+ export interface CreateRepoResponse {
33
+ /**
34
+ * All database fields for repos, plus helpful computed fields.
35
+ */
36
+ repo: RepoWithLookups;
37
+ }
38
+ export interface DemoConfig {
39
+ examples: Array<{
40
+ [key: string]: unknown;
41
+ }>;
42
+ message_index: number;
43
+ metaprompt: {
44
+ [key: string]: unknown;
45
+ };
46
+ overall_feedback: string | null;
47
+ }
48
+ export type EPromptOptimizationAlgorithm = 'promptim' | 'demo';
49
+ export interface GetRepoResponse {
50
+ /**
51
+ * All database fields for repos, plus helpful computed fields.
52
+ */
53
+ repo: RepoWithLookups;
54
+ }
55
+ export interface PromptimConfig {
56
+ auto_commit: boolean;
57
+ dataset_name: string;
58
+ dev_split: string | null;
59
+ evaluators: Array<string>;
60
+ message_index: number;
61
+ num_epochs: number;
62
+ task_description: string;
63
+ test_split: string | null;
64
+ train_split: string | null;
65
+ }
66
+ /**
67
+ * All database fields for repos, plus helpful computed fields.
68
+ */
69
+ export interface RepoWithLookups {
70
+ id: string;
71
+ created_at: string;
72
+ full_name: string;
73
+ is_archived: boolean;
74
+ is_public: boolean;
75
+ num_commits: number;
76
+ num_downloads: number;
77
+ num_likes: number;
78
+ num_views: number;
79
+ owner: string | null;
80
+ repo_handle: string;
81
+ repo_type: 'prompt' | 'file' | 'agent' | 'skill';
82
+ tags: Array<string>;
83
+ tenant_id: string;
84
+ updated_at: string;
85
+ commit_tags?: Array<string>;
86
+ created_by?: string | null;
87
+ description?: string | null;
88
+ last_commit_hash?: string | null;
89
+ /**
90
+ * Response model for get_commit_manifest.
91
+ */
92
+ latest_commit_manifest?: CommitsAPI.CommitManifestResponse | null;
93
+ liked_by_auth_user?: boolean | null;
94
+ original_repo_full_name?: string | null;
95
+ original_repo_id?: string | null;
96
+ owners?: Array<RepoWithLookups.Owner> | null;
97
+ readme?: string | null;
98
+ restricted_mode?: boolean;
99
+ source?: 'internal' | 'external' | null;
100
+ upstream_repo_full_name?: string | null;
101
+ upstream_repo_id?: string | null;
102
+ }
103
+ export declare namespace RepoWithLookups {
104
+ /**
105
+ * A repo owner with user details.
106
+ *
107
+ * Note: identity_id and email may be None when returned to users outside the
108
+ * repo's tenant (PII protection).
109
+ */
110
+ interface Owner {
111
+ created_at: string;
112
+ email: string | null;
113
+ full_name: string | null;
114
+ identity_id: string | null;
115
+ ls_user_id: string;
116
+ }
117
+ }
118
+ export type RepoDeleteResponse = unknown;
119
+ export interface RepoCreateParams {
120
+ is_public: boolean;
121
+ repo_handle: string;
122
+ description?: string | null;
123
+ readme?: string | null;
124
+ repo_type?: 'prompt' | 'file' | 'agent' | 'skill';
125
+ restricted_mode?: boolean | null;
126
+ source?: 'internal' | 'external' | null;
127
+ tag_value_ids?: Array<string> | null;
128
+ tags?: Array<string> | null;
129
+ }
130
+ export interface RepoRetrieveParams {
131
+ owner: string;
132
+ }
133
+ export interface RepoUpdateParams {
134
+ /**
135
+ * Path param
136
+ */
137
+ owner: string;
138
+ /**
139
+ * Body param
140
+ */
141
+ description?: string | null;
142
+ /**
143
+ * Body param
144
+ */
145
+ is_archived?: boolean | null;
146
+ /**
147
+ * Body param
148
+ */
149
+ is_public?: boolean | null;
150
+ /**
151
+ * Body param
152
+ */
153
+ readme?: string | null;
154
+ /**
155
+ * Body param
156
+ */
157
+ restricted_mode?: boolean | null;
158
+ /**
159
+ * Body param
160
+ */
161
+ tags?: Array<string> | null;
162
+ }
163
+ export interface RepoListParams extends OffsetPaginationReposParams {
164
+ has_commits?: boolean | null;
165
+ include_owners?: boolean;
166
+ is_archived?: 'true' | 'allow' | 'false' | null;
167
+ is_public?: 'true' | 'false' | null;
168
+ query?: string | null;
169
+ single_repo_type?: 'prompt' | 'file' | 'agent' | 'skill' | null;
170
+ repo_types?: Array<'prompt' | 'file' | 'agent' | 'skill'> | null;
171
+ sort_direction?: 'asc' | 'desc' | null;
172
+ sort_field?: 'num_likes' | 'num_downloads' | 'num_views' | 'updated_at' | 'relevance' | null;
173
+ source?: 'internal' | 'external' | null;
174
+ tag_value_id?: Array<string> | null;
175
+ tags?: Array<string> | null;
176
+ tenant_handle?: string | null;
177
+ tenant_id?: string | null;
178
+ upstream_repo_handle?: string | null;
179
+ upstream_repo_owner?: string | null;
180
+ with_latest_manifest?: boolean;
181
+ }
182
+ export interface RepoDeleteParams {
183
+ owner: string;
184
+ }
185
+ export declare namespace Repos {
186
+ export { type CreateRepoResponse as CreateRepoResponse, type DemoConfig as DemoConfig, type EPromptOptimizationAlgorithm as EPromptOptimizationAlgorithm, type GetRepoResponse as GetRepoResponse, type PromptimConfig as PromptimConfig, type RepoWithLookups as RepoWithLookups, type RepoDeleteResponse as RepoDeleteResponse, type RepoWithLookupsOffsetPaginationRepos as RepoWithLookupsOffsetPaginationRepos, type RepoCreateParams as RepoCreateParams, type RepoRetrieveParams as RepoRetrieveParams, type RepoUpdateParams as RepoUpdateParams, type RepoListParams as RepoListParams, type RepoDeleteParams as RepoDeleteParams, };
187
+ export { Directories as Directories, type DirectoryListResponse as DirectoryListResponse, type DirectoryCommitResponse as DirectoryCommitResponse, type DirectoryListParams as DirectoryListParams, type DirectoryDeleteParams as DirectoryDeleteParams, type DirectoryCommitParams as DirectoryCommitParams, };
188
+ }
@@ -0,0 +1,56 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ import * as DirectoriesAPI from './directories.js';
5
+ import { Directories, } from './directories.js';
6
+ import { OffsetPaginationRepos } from '../../core/pagination.js';
7
+ import { path } from '../../internal/utils/path.js';
8
+ export class Repos extends APIResource {
9
+ constructor() {
10
+ super(...arguments);
11
+ Object.defineProperty(this, "directories", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: new DirectoriesAPI.Directories(this._client)
16
+ });
17
+ }
18
+ /**
19
+ * Create a repo.
20
+ */
21
+ create(body, options) {
22
+ return this._client.post('/api/v1/repos', { body, ...options });
23
+ }
24
+ /**
25
+ * Get a repo.
26
+ */
27
+ retrieve(repo, params, options) {
28
+ const { owner } = params;
29
+ return this._client.get(path `/api/v1/repos/${owner}/${repo}`, options);
30
+ }
31
+ /**
32
+ * Update a repo.
33
+ */
34
+ update(repo, params, options) {
35
+ const { owner, ...body } = params;
36
+ return this._client.patch(path `/api/v1/repos/${owner}/${repo}`, { body, ...options });
37
+ }
38
+ /**
39
+ * Get all repos.
40
+ */
41
+ list(params = {}, options) {
42
+ const { single_repo_type, ...query } = params ?? {};
43
+ return this._client.getAPIList('/api/v1/repos', (OffsetPaginationRepos), {
44
+ query: { repo_type: single_repo_type, ...query },
45
+ ...options,
46
+ });
47
+ }
48
+ /**
49
+ * Delete a repo.
50
+ */
51
+ delete(repo, params, options) {
52
+ const { owner } = params;
53
+ return this._client.delete(path `/api/v1/repos/${owner}/${repo}`, options);
54
+ }
55
+ }
56
+ Repos.Directories = Directories;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Rules = void 0;
6
+ const resource_js_1 = require("../../core/resource.cjs");
7
+ class Rules extends resource_js_1.APIResource {
8
+ }
9
+ exports.Rules = Rules;
@@ -0,0 +1,3 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ export declare class Rules extends APIResource {
3
+ }
@@ -0,0 +1,5 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ export class Rules extends APIResource {
5
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.Runs = void 0;
39
+ const resource_js_1 = require("../../core/resource.cjs");
40
+ const RulesAPI = __importStar(require("./rules.cjs"));
41
+ const rules_js_1 = require("./rules.cjs");
42
+ const path_js_1 = require("../../internal/utils/path.cjs");
43
+ class Runs extends resource_js_1.APIResource {
44
+ constructor() {
45
+ super(...arguments);
46
+ Object.defineProperty(this, "rules", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: new RulesAPI.Rules(this._client)
51
+ });
52
+ }
53
+ /**
54
+ * Queues a single run for ingestion. The request body must be a JSON-encoded run
55
+ * object that follows the Run schema.
56
+ */
57
+ create(body, options) {
58
+ return this._client.post('/runs', { body, ...options });
59
+ }
60
+ /**
61
+ * Get a specific run.
62
+ */
63
+ retrieve(runID, query = {}, options) {
64
+ return this._client.get((0, path_js_1.path) `/api/v1/runs/${runID}`, { query, ...options });
65
+ }
66
+ /**
67
+ * Updates a run identified by its ID. The body should contain only the fields to
68
+ * be changed; unknown fields are ignored.
69
+ */
70
+ update(runID, body, options) {
71
+ return this._client.patch((0, path_js_1.path) `/runs/${runID}`, { body, ...options });
72
+ }
73
+ /**
74
+ * Ingests a batch of runs in a single JSON payload. The payload must have `post`
75
+ * and/or `patch` arrays containing run objects. Prefer this endpoint over
76
+ * single‑run ingestion when submitting hundreds of runs, but `/runs/multipart`
77
+ * offers better handling for very large fields and attachments.
78
+ */
79
+ ingestBatch(body, options) {
80
+ return this._client.post('/runs/batch', { body, ...options });
81
+ }
82
+ /**
83
+ * Query Runs
84
+ */
85
+ query(body, options) {
86
+ return this._client.post('/api/v1/runs/query', { body, ...options });
87
+ }
88
+ /**
89
+ * Get all runs by query in body payload.
90
+ */
91
+ stats(body, options) {
92
+ return this._client.post('/api/v1/runs/stats', { body, ...options });
93
+ }
94
+ /**
95
+ * Update a run.
96
+ */
97
+ update2(runID, options) {
98
+ return this._client.patch((0, path_js_1.path) `/api/v1/runs/${runID}`, options);
99
+ }
100
+ }
101
+ exports.Runs = Runs;
102
+ Runs.Rules = rules_js_1.Rules;