langsmith 0.7.10 → 0.7.12

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 (103) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -80
  3. package/dist/_openapi_client/client.d.ts +2 -32
  4. package/dist/_openapi_client/client.js +0 -80
  5. package/dist/_openapi_client/core/pagination.cjs +2 -2
  6. package/dist/_openapi_client/core/pagination.js +2 -2
  7. package/dist/_openapi_client/internal/utils/query.cjs +1 -1
  8. package/dist/_openapi_client/internal/utils/query.js +1 -1
  9. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  10. package/dist/_openapi_client/resources/index.cjs +1 -21
  11. package/dist/_openapi_client/resources/index.d.ts +1 -11
  12. package/dist/_openapi_client/resources/index.js +0 -10
  13. package/dist/_openapi_client/resources/runs/index.cjs +9 -0
  14. package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
  15. package/dist/_openapi_client/resources/runs/index.js +4 -0
  16. package/dist/_openapi_client/resources/runs/runs.cjs +54 -41
  17. package/dist/_openapi_client/resources/runs/runs.d.ts +571 -313
  18. package/dist/_openapi_client/resources/runs/runs.js +54 -41
  19. package/dist/_openapi_client/resources/runs.cjs +19 -0
  20. package/dist/_openapi_client/resources/runs.d.ts +1 -0
  21. package/dist/_openapi_client/resources/runs.js +3 -0
  22. package/dist/anonymizer/index.cjs +142 -0
  23. package/dist/anonymizer/index.d.ts +45 -0
  24. package/dist/anonymizer/index.js +140 -0
  25. package/dist/client.cjs +29 -1
  26. package/dist/client.d.ts +6 -1
  27. package/dist/client.js +28 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/sandbox/client.cjs +5 -8
  32. package/dist/sandbox/client.js +5 -8
  33. package/dist/sandbox/index.cjs +2 -1
  34. package/dist/sandbox/index.d.ts +2 -2
  35. package/dist/sandbox/index.js +1 -1
  36. package/dist/sandbox/mounts.cjs +157 -18
  37. package/dist/sandbox/mounts.d.ts +10 -2
  38. package/dist/sandbox/mounts.js +155 -18
  39. package/dist/sandbox/proxy_config.cjs +19 -44
  40. package/dist/sandbox/proxy_config.d.ts +2 -4
  41. package/dist/sandbox/proxy_config.js +19 -43
  42. package/dist/sandbox/types.d.ts +56 -15
  43. package/dist/utils/constants.cjs +4 -0
  44. package/dist/utils/constants.d.ts +1 -0
  45. package/dist/utils/constants.js +1 -0
  46. package/package.json +5 -5
  47. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  48. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  49. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  50. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  51. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  52. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  53. package/dist/_openapi_client/resources/commits.cjs +0 -44
  54. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  55. package/dist/_openapi_client/resources/commits.js +0 -40
  56. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  57. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  58. package/dist/_openapi_client/resources/evaluators.js +0 -11
  59. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  60. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  61. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  62. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  63. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  64. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  65. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  66. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  67. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  68. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  69. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  70. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  71. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  72. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  73. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  74. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  75. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  76. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  77. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  78. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  79. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  80. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  81. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  82. package/dist/_openapi_client/resources/public/public.js +0 -25
  83. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  84. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  85. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  86. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  87. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  88. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  89. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  90. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  91. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  92. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  93. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  94. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  95. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  96. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  97. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  98. package/dist/_openapi_client/resources/settings.cjs +0 -15
  99. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  100. package/dist/_openapi_client/resources/settings.js +0 -11
  101. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  102. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  103. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -1,188 +0,0 @@
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
- }
@@ -1,56 +0,0 @@
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;
@@ -1,86 +0,0 @@
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.Boxes = 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 Boxes extends resource_js_1.APIResource {
10
- /**
11
- * Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
12
- * `snapshot_name`; if neither is provided, the server uses the default static
13
- * blueprint.
14
- */
15
- create(body, options) {
16
- return this._client.post('/v2/sandboxes/boxes', { body, ...options });
17
- }
18
- /**
19
- * Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
20
- */
21
- retrieve(name, options) {
22
- return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, options);
23
- }
24
- /**
25
- * Update a sandbox's display name. The name must be unique within the tenant.
26
- */
27
- update(name, body, options) {
28
- return this._client.patch((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, { body, ...options });
29
- }
30
- /**
31
- * List sandboxes for the authenticated tenant, with optional filtering, sorting,
32
- * and pagination.
33
- */
34
- list(query = {}, options) {
35
- return this._client.get('/v2/sandboxes/boxes', { query, ...options });
36
- }
37
- /**
38
- * Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
39
- * DB record.
40
- */
41
- delete(name, options) {
42
- return this._client.delete((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, {
43
- ...options,
44
- headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
45
- });
46
- }
47
- /**
48
- * Create a snapshot by capturing the current state of a sandbox or promoting an
49
- * existing checkpoint.
50
- */
51
- createSnapshot(name, body, options) {
52
- return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
53
- }
54
- /**
55
- * Create a short-lived JWT for accessing an HTTP service running on a specific
56
- * port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
57
- * service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
58
- * token, and its expiry.
59
- */
60
- generateServiceURL(name, body, options) {
61
- return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
62
- }
63
- /**
64
- * Retrieve the lightweight status of a sandbox for polling.
65
- */
66
- getStatus(name, options) {
67
- return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/status`, options);
68
- }
69
- /**
70
- * Start a stopped or failed sandbox. This endpoint is not idempotent.
71
- */
72
- start(name, options) {
73
- return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/start`, options);
74
- }
75
- /**
76
- * Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
77
- * preserved for later restart.
78
- */
79
- stop(name, options) {
80
- return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/stop`, {
81
- ...options,
82
- headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
83
- });
84
- }
85
- }
86
- exports.Boxes = Boxes;