langsmith 0.10.7 → 0.10.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 (101) hide show
  1. package/dist/_openapi_client/client.cjs +26 -2
  2. package/dist/_openapi_client/client.d.ts +15 -6
  3. package/dist/_openapi_client/client.js +27 -3
  4. package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
  5. package/dist/_openapi_client/internal/detect-platform.js +1 -1
  6. package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
  7. package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
  8. package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
  9. package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
  10. package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
  11. package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
  12. package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
  13. package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
  14. package/dist/_openapi_client/resources/datasets/examples.js +22 -0
  15. package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
  16. package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
  17. package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
  18. package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
  19. package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
  20. package/dist/_openapi_client/resources/fleet/threads.js +14 -0
  21. package/dist/_openapi_client/resources/index.cjs +8 -2
  22. package/dist/_openapi_client/resources/index.d.ts +6 -3
  23. package/dist/_openapi_client/resources/index.js +5 -2
  24. package/dist/_openapi_client/resources/info.d.ts +6 -0
  25. package/dist/_openapi_client/resources/issues.cjs +2 -2
  26. package/dist/_openapi_client/resources/issues.d.ts +188 -4
  27. package/dist/_openapi_client/resources/issues.js +2 -2
  28. package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
  29. package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
  30. package/dist/_openapi_client/resources/online-evaluators.js +7 -4
  31. package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
  32. package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
  33. package/dist/_openapi_client/resources/product-feedback.js +29 -0
  34. package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
  35. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
  36. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
  37. package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
  38. package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
  39. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
  40. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
  41. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
  42. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
  43. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
  44. package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
  45. package/dist/_openapi_client/resources/sessions.cjs +23 -0
  46. package/dist/_openapi_client/resources/sessions.d.ts +732 -0
  47. package/dist/_openapi_client/resources/sessions.js +19 -0
  48. package/dist/_openapi_client/resources/threads/index.cjs +9 -0
  49. package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
  50. package/dist/_openapi_client/resources/threads/index.js +4 -0
  51. package/dist/_openapi_client/resources/threads/share.cjs +61 -0
  52. package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
  53. package/dist/_openapi_client/resources/threads/share.js +57 -0
  54. package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
  55. package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
  56. package/dist/_openapi_client/resources/threads/threads.js +106 -0
  57. package/dist/_openapi_client/resources/threads.cjs +15 -67
  58. package/dist/_openapi_client/resources/threads.d.ts +1 -709
  59. package/dist/_openapi_client/resources/threads.js +1 -65
  60. package/dist/_openapi_client/resources/traces.d.ts +7 -1
  61. package/dist/_openapi_client/version.cjs +1 -1
  62. package/dist/_openapi_client/version.js +1 -1
  63. package/dist/address.cjs +176 -99
  64. package/dist/address.d.ts +63 -8
  65. package/dist/address.js +170 -90
  66. package/dist/anonymizer/index.cjs +1 -1
  67. package/dist/anonymizer/index.js +1 -1
  68. package/dist/client.cjs +39 -19
  69. package/dist/client.d.ts +20 -4
  70. package/dist/client.js +34 -14
  71. package/dist/experimental/otel/exporter.cjs +21 -4
  72. package/dist/experimental/otel/exporter.d.ts +4 -2
  73. package/dist/experimental/otel/exporter.js +21 -4
  74. package/dist/index.cjs +5 -2
  75. package/dist/index.d.ts +2 -2
  76. package/dist/index.js +2 -2
  77. package/dist/run_trees.cjs +26 -43
  78. package/dist/run_trees.d.ts +4 -4
  79. package/dist/run_trees.js +23 -40
  80. package/dist/sandbox/client.cjs +33 -4
  81. package/dist/sandbox/client.d.ts +4 -0
  82. package/dist/sandbox/client.js +34 -5
  83. package/dist/sandbox/command_handle.cjs +8 -0
  84. package/dist/sandbox/command_handle.js +8 -0
  85. package/dist/sandbox/sandbox.cjs +7 -0
  86. package/dist/sandbox/sandbox.js +7 -0
  87. package/dist/sandbox/service_url.cjs +9 -1
  88. package/dist/sandbox/service_url.d.ts +2 -1
  89. package/dist/sandbox/service_url.js +9 -1
  90. package/dist/sandbox/tracing.cjs +13 -0
  91. package/dist/sandbox/tracing.d.ts +1 -0
  92. package/dist/sandbox/tracing.js +10 -0
  93. package/dist/schemas.d.ts +3 -3
  94. package/dist/traceable.cjs +5 -4
  95. package/dist/traceable.js +4 -3
  96. package/dist/utils/{agent_addressing.cjs → addressing.cjs} +22 -23
  97. package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +5 -8
  98. package/dist/utils/{agent_addressing.js → addressing.js} +23 -23
  99. package/dist/utils/env.cjs +6 -4
  100. package/dist/utils/env.js +6 -4
  101. package/package.json +1 -1
@@ -0,0 +1,77 @@
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 ProductFeedback extends APIResource {
5
+ /**
6
+ * **Alpha:** This endpoint is in active development and may change without notice.
7
+ *
8
+ * Submits concise product feedback with optional non-sensitive client details.
9
+ */
10
+ create(params: ProductFeedbackCreateParams, options?: RequestOptions): APIPromise<ProductFeedbackCreateResponse>;
11
+ /**
12
+ * **Alpha:** This endpoint is in active development and may change without notice.
13
+ */
14
+ retrieve(id: string, options?: RequestOptions): APIPromise<ProductFeedbackRetrieveResponse>;
15
+ }
16
+ export interface ProductFeedbackCreateResponse {
17
+ id: string;
18
+ category: 'BUG' | 'FEATURE_REQUEST' | 'USABILITY' | 'DOCUMENTATION' | 'OTHER';
19
+ created_at: string;
20
+ message: string;
21
+ source: 'LANGSMITH_CLI';
22
+ client?: ProductFeedbackCreateResponse.Client;
23
+ }
24
+ export declare namespace ProductFeedbackCreateResponse {
25
+ interface Client {
26
+ architecture?: string;
27
+ os?: string;
28
+ version?: string;
29
+ }
30
+ }
31
+ export interface ProductFeedbackRetrieveResponse {
32
+ id: string;
33
+ category: 'BUG' | 'FEATURE_REQUEST' | 'USABILITY' | 'DOCUMENTATION' | 'OTHER';
34
+ created_at: string;
35
+ message: string;
36
+ source: 'LANGSMITH_CLI';
37
+ client?: ProductFeedbackRetrieveResponse.Client;
38
+ }
39
+ export declare namespace ProductFeedbackRetrieveResponse {
40
+ interface Client {
41
+ architecture?: string;
42
+ os?: string;
43
+ version?: string;
44
+ }
45
+ }
46
+ export interface ProductFeedbackCreateParams {
47
+ /**
48
+ * Body param
49
+ */
50
+ category: 'BUG' | 'FEATURE_REQUEST' | 'USABILITY' | 'DOCUMENTATION' | 'OTHER';
51
+ /**
52
+ * Body param
53
+ */
54
+ message: string;
55
+ /**
56
+ * Body param
57
+ */
58
+ source: 'LANGSMITH_CLI';
59
+ /**
60
+ * Body param
61
+ */
62
+ client?: ProductFeedbackCreateParams.Client;
63
+ /**
64
+ * Header param: Idempotency key
65
+ */
66
+ 'Idempotency-Key'?: string;
67
+ }
68
+ export declare namespace ProductFeedbackCreateParams {
69
+ interface Client {
70
+ architecture?: string;
71
+ os?: string;
72
+ version?: string;
73
+ }
74
+ }
75
+ export declare namespace ProductFeedback {
76
+ export { type ProductFeedbackCreateResponse as ProductFeedbackCreateResponse, type ProductFeedbackRetrieveResponse as ProductFeedbackRetrieveResponse, type ProductFeedbackCreateParams as ProductFeedbackCreateParams, };
77
+ }
@@ -0,0 +1,29 @@
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 ProductFeedback extends APIResource {
7
+ /**
8
+ * **Alpha:** This endpoint is in active development and may change without notice.
9
+ *
10
+ * Submits concise product feedback with optional non-sensitive client details.
11
+ */
12
+ create(params, options) {
13
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
14
+ return this._client.post('/api/v1/platform/product-feedbacks', {
15
+ body,
16
+ ...options,
17
+ headers: buildHeaders([
18
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
19
+ options?.headers,
20
+ ]),
21
+ });
22
+ }
23
+ /**
24
+ * **Alpha:** This endpoint is in active development and may change without notice.
25
+ */
26
+ retrieve(id, options) {
27
+ return this._client.get(path `/api/v1/platform/product-feedbacks/${id}`, options);
28
+ }
29
+ }
@@ -1,4 +1,5 @@
1
1
  import { APIResource } from '../../core/resource.js';
2
+ import * as SessionsAPI from '../sessions.js';
2
3
  import * as ShareAPI from './share.js';
3
4
  import { Share, ShareCreateParams, ShareCreateResponse, ShareDeleteParams } from './share.js';
4
5
  import { APIPromise } from '../../core/api-promise.js';
@@ -164,6 +165,12 @@ export interface Run {
164
165
  * `latency_seconds` is wall-clock duration from start to end in seconds.
165
166
  */
166
167
  latency_seconds?: number;
168
+ /**
169
+ * `ls_user_id` identifies the LangSmith user whose credential traced the run. It
170
+ * is absent for runs traced with a service-account API key, which has no
171
+ * associated user.
172
+ */
173
+ ls_user_id?: string;
167
174
  /**
168
175
  * `manifest` is the serialized configuration of the traced component (for example
169
176
  * the model parameters, prompt template, or pipeline definition), when recorded.
@@ -226,6 +233,12 @@ export interface Run {
226
233
  * `prompt_tokens` is the prompt-side token count.
227
234
  */
228
235
  prompt_tokens?: number;
236
+ /**
237
+ * `query_metadata` describes this query result, including `sem_filter_score` when
238
+ * a semantic filter is used. Returned automatically by run queries, or null when
239
+ * unavailable.
240
+ */
241
+ query_metadata?: unknown | null;
229
242
  /**
230
243
  * `reference_dataset_id` is the dataset UUID for the reference example, if any.
231
244
  */
@@ -427,6 +440,13 @@ export declare namespace Run {
427
440
  }
428
441
  export interface RunIngest {
429
442
  id?: string;
443
+ /**
444
+ * Beta. Addresses the run to an Agent environment in place of session_id or
445
+ * session_name, as lrn:agents/{id}/environments/{environment}. The environment is
446
+ * case-insensitive. Only workspaces enabled for Agent addressing accept it; others
447
+ * get a 403.
448
+ */
449
+ address?: string;
430
450
  dotted_order?: string;
431
451
  end_time?: string;
432
452
  error?: string;
@@ -555,7 +575,7 @@ export interface RunSchema {
555
575
  trace_upgrade?: boolean;
556
576
  ttl_seconds?: number | null;
557
577
  }
558
- export type RunSelectField = 'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS';
578
+ export type RunSelectField = 'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS' | 'LS_USER_ID';
559
579
  /**
560
580
  * Query params for run stats.
561
581
  */
@@ -573,7 +593,7 @@ export interface RunStatsQueryParams {
573
593
  /**
574
594
  * Group by param for run stats.
575
595
  */
576
- group_by?: RunStatsQueryParams.GroupBy | null;
596
+ group_by?: SessionsAPI.RunStatsGroupBy | null;
577
597
  groups?: Array<string | null> | null;
578
598
  include_details?: boolean;
579
599
  is_root?: boolean | null;
@@ -598,16 +618,6 @@ export interface RunStatsQueryParams {
598
618
  tree_filter?: string | null;
599
619
  use_experimental_search?: boolean;
600
620
  }
601
- export declare namespace RunStatsQueryParams {
602
- /**
603
- * Group by param for run stats.
604
- */
605
- interface GroupBy {
606
- attribute: 'name' | 'run_type' | 'tag' | 'metadata';
607
- max_groups?: number;
608
- path?: string | null;
609
- }
610
- }
611
621
  export type RunType = 'TOOL' | 'CHAIN' | 'LLM' | 'RETRIEVER' | 'EMBEDDING' | 'PROMPT' | 'PARSER';
612
622
  /**
613
623
  * Enum for run types.
@@ -721,7 +731,7 @@ export interface RunQueryV2Params extends ItemsCursorPostPaginationParams {
721
731
  */
722
732
  tree_filter?: string;
723
733
  /**
724
- * Header param: application/json
734
+ * Header param: application/json or text/event-stream
725
735
  */
726
736
  Accept?: string;
727
737
  }
@@ -735,7 +745,7 @@ export interface RunRetrieveV2Params {
735
745
  * (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
736
746
  * omitted, only `id` is returned.
737
747
  */
738
- selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
748
+ selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS' | 'LS_USER_ID'>;
739
749
  /**
740
750
  * Query param: `start_time` is the run's `start_time` (RFC3339 date-time).
741
751
  * Providing it speeds up retrieval.
@@ -756,7 +766,7 @@ export interface RunRetrieveParams {
756
766
  * (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
757
767
  * omitted, only `id` is returned.
758
768
  */
759
- selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
769
+ selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS' | 'LS_USER_ID'>;
760
770
  /**
761
771
  * Query param: `start_time` is the run's `start_time` (RFC3339 date-time).
762
772
  * Providing it speeds up retrieval.
@@ -854,7 +864,7 @@ export interface RunQueryParams extends ItemsCursorPostPaginationParams {
854
864
  */
855
865
  tree_filter?: string;
856
866
  /**
857
- * Header param: application/json
867
+ * Header param: application/json or text/event-stream
858
868
  */
859
869
  Accept?: string;
860
870
  }
@@ -58,13 +58,41 @@ class Boxes extends resource_js_1.APIResource {
58
58
  createSnapshot(name, body, options) {
59
59
  return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
60
60
  }
61
+ /**
62
+ * Removes the sharing grant for one port, or for every port when port is omitted.
63
+ * A LangSmith login URL stops working immediately. A previously minted service
64
+ * token is not revoked and stays valid until it expires, but no new one can be
65
+ * issued from the removed grant.
66
+ */
67
+ deleteServiceURL(name, params = {}, options) {
68
+ const { port } = params ?? {};
69
+ return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/service-urls`, {
70
+ query: { port },
71
+ ...options,
72
+ headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
73
+ });
74
+ }
61
75
  /**
62
76
  * Generate a tokenized link that downloads a single file from a sandbox with no
63
77
  * further authentication. This mints a token rather than creating an addressable
64
78
  * resource, so it returns 200 with no Location header. The token pins the sandbox,
65
- * the file path, and the response content type and disposition, so a link cannot
66
- * be repointed at another file. Links never expire unless expires_in_seconds is
67
- * set. The link is served from the sandbox service domain, not the API host.
79
+ * the file path, the response content type and disposition, and the sandbox flags,
80
+ * so a link cannot be repointed at another file or served under a weaker policy.
81
+ * The file is always served with a Content-Security-Policy: a sandbox directive,
82
+ * plus a default-src holding every fetch to the file's own download host and a set
83
+ * of pre-approved third-party origins. csp_sandbox_flags may loosen the sandbox
84
+ * with allow-downloads, allow-forms, allow-modals, allow-orientation-lock,
85
+ * allow-pointer-lock, allow-popups, allow-presentation, allow-same-origin,
86
+ * allow-scripts, or allow-top-navigation-by-user-activation. Every file is served
87
+ * from its own host, derived from the sandbox and the path, so allow-same-origin
88
+ * gives a page localStorage and IndexedDB that no other file can read, and
89
+ * re-minting a link for the same file keeps them. csp_sandbox set to false drops
90
+ * the sandbox directive altogether, and csp_sandbox_flags must then be omitted.
91
+ * csp_source_bundles selects the third-party origins: cdnjs, google-fonts,
92
+ * jsdelivr, and unpkg are all allowed when the field is omitted, 'none' holds the
93
+ * file to its own host, and 'any' sends no default-src at all. Links never expire
94
+ * unless expires_in_seconds is set. The link is served from the sandbox service
95
+ * domain, not the API host.
68
96
  */
69
97
  generateDownloadURL(name, body, options) {
70
98
  return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/download-url`, { body, ...options });
@@ -73,7 +101,10 @@ class Boxes extends resource_js_1.APIResource {
73
101
  * Create a short-lived JWT for accessing an HTTP service running on a specific
74
102
  * port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
75
103
  * service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
76
- * token, and its expiry.
104
+ * token, and its expiry. Set access=restricted|workspace to instead enable durable
105
+ * LangSmith login (no token; users authenticate with their normal LangSmith
106
+ * session), or access=off to disable it. LangSmith login and token access are
107
+ * mutually exclusive per service URL.
77
108
  */
78
109
  generateServiceURL(name, body, options) {
79
110
  return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
@@ -84,6 +115,15 @@ class Boxes extends resource_js_1.APIResource {
84
115
  getStatus(name, options) {
85
116
  return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/status`, options);
86
117
  }
118
+ /**
119
+ * Returns one entry per port the sandbox is currently reachable on, so a caller
120
+ * can see what is shared before turning it off. Expired token grants are omitted.
121
+ * Cursors are opaque and only valid on this endpoint; do not parse or construct
122
+ * one.
123
+ */
124
+ listServiceURLs(name, query = {}, options) {
125
+ return this._client.getAPIList((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/service-urls`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
126
+ }
87
127
  /**
88
128
  * Start a stopped or failed sandbox. This endpoint is not idempotent.
89
129
  */