langwatch 2.1.0 → 2.3.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.
Files changed (46) hide show
  1. package/dist/agent/index.js +1 -1
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/agent/index.mjs +1 -1
  4. package/dist/agent/index.mjs.map +1 -1
  5. package/dist/{types-RkiBQZ9j.d.mts → braid-baggage-span-processor-CBNdRYKr.d.mts} +28 -1
  6. package/dist/{types-RkiBQZ9j.d.ts → braid-baggage-span-processor-CBNdRYKr.d.ts} +28 -1
  7. package/dist/{chunk-UHM5RXEW.mjs → chunk-5TNHAT3S.mjs} +101 -4
  8. package/dist/chunk-5TNHAT3S.mjs.map +1 -0
  9. package/dist/{chunk-VJK42Y3W.js → chunk-FQJHCT5Y.js} +111 -14
  10. package/dist/chunk-FQJHCT5Y.js.map +1 -0
  11. package/dist/{chunk-4HRQZXNE.js → chunk-HWKTHOMP.js} +58 -3
  12. package/dist/chunk-HWKTHOMP.js.map +1 -0
  13. package/dist/{chunk-XVXTLQGK.mjs → chunk-IMUFSW7Z.mjs} +58 -3
  14. package/dist/chunk-IMUFSW7Z.mjs.map +1 -0
  15. package/dist/{chunk-XQ4CP2JK.mjs → chunk-MCWJ3AWF.mjs} +1 -1
  16. package/dist/{chunk-WDUUAIG3.js → chunk-PDYPOYVZ.js} +1 -1
  17. package/dist/{chunk-WDUUAIG3.js.map → chunk-PDYPOYVZ.js.map} +1 -1
  18. package/dist/cli/bundle.js +1232 -458
  19. package/dist/{implementation-Atjtldz3.d.ts → implementation-BparHh-q.d.ts} +1 -1
  20. package/dist/{implementation-CNNrmXZu.d.mts → implementation-CrBgn1V6.d.mts} +1 -1
  21. package/dist/index.d.mts +112 -7
  22. package/dist/index.d.ts +112 -7
  23. package/dist/index.js +270 -46
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +240 -16
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/observability-sdk/index.d.mts +27 -6
  28. package/dist/observability-sdk/index.d.ts +27 -6
  29. package/dist/observability-sdk/index.js +13 -3
  30. package/dist/observability-sdk/index.js.map +1 -1
  31. package/dist/observability-sdk/index.mjs +12 -2
  32. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  33. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  34. package/dist/observability-sdk/setup/node/index.d.mts +39 -3
  35. package/dist/observability-sdk/setup/node/index.d.ts +39 -3
  36. package/dist/observability-sdk/setup/node/index.js +9 -3
  37. package/dist/observability-sdk/setup/node/index.js.map +1 -1
  38. package/dist/observability-sdk/setup/node/index.mjs +10 -4
  39. package/dist/{types--djDPuMb.d.ts → types-BXcB5Uov.d.ts} +809 -23
  40. package/dist/{types-GklcWLfF.d.mts → types-D_MsVA5r.d.mts} +809 -23
  41. package/package.json +1 -1
  42. package/dist/chunk-4HRQZXNE.js.map +0 -1
  43. package/dist/chunk-UHM5RXEW.mjs.map +0 -1
  44. package/dist/chunk-VJK42Y3W.js.map +0 -1
  45. package/dist/chunk-XVXTLQGK.mjs.map +0 -1
  46. /package/dist/{chunk-XQ4CP2JK.mjs.map → chunk-MCWJ3AWF.mjs.map} +0 -0
@@ -6,7 +6,7 @@ import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
6
6
  import { V as VAL_GEN_AI_SYSTEMS, a as VAL_GEN_AI_FINISH_REASONS } from './values-1yj9l0Sa.js';
7
7
  import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-CoS5PmeU.js';
8
8
  import { TracerProvider } from '@opentelemetry/api';
9
- import { j as LangWatchTracer } from './types--djDPuMb.js';
9
+ import { j as LangWatchTracer } from './types-BXcB5Uov.js';
10
10
 
11
11
  /**
12
12
  * A BatchSpanProcessor subclass that filters spans before export by
@@ -6,7 +6,7 @@ import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
6
6
  import { V as VAL_GEN_AI_SYSTEMS, a as VAL_GEN_AI_FINISH_REASONS } from './values-1yj9l0Sa.mjs';
7
7
  import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-CoS5PmeU.mjs';
8
8
  import { TracerProvider } from '@opentelemetry/api';
9
- import { j as LangWatchTracer } from './types-GklcWLfF.mjs';
9
+ import { j as LangWatchTracer } from './types-D_MsVA5r.mjs';
10
10
 
11
11
  /**
12
12
  * A BatchSpanProcessor subclass that filters spans before export by
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { L as Logger, C as ConsoleLogger, N as NoOpLogger } from './index-D7rKIGrO.mjs';
2
- export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-CNNrmXZu.mjs';
2
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-CrBgn1V6.mjs';
3
3
  import { z } from 'zod';
4
4
  import openApiCreateClient from 'openapi-fetch';
5
- import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-GklcWLfF.mjs';
5
+ import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-D_MsVA5r.mjs';
6
6
  export { l as attributes } from './types-CoS5PmeU.mjs';
7
7
  import { LangWatchHandledErrorReason, LangWatchHandledErrorShape } from '@langwatch/handled-error/langwatch-handled-error';
8
8
  export { LangWatchHandledErrorReason, LangWatchHandledErrorShape } from '@langwatch/handled-error/langwatch-handled-error';
@@ -522,6 +522,23 @@ type CreateDatasetOptions = {
522
522
  name: string;
523
523
  /** Column type definitions (defaults to empty array) */
524
524
  columnTypes?: DatasetColumnType[];
525
+ /** First rows, written with the dataset in one request. Each key must be a column. */
526
+ entries?: Record<string, unknown>[];
527
+ };
528
+ /**
529
+ * Options for upserting records by a key column.
530
+ */
531
+ type UpsertRecordsOptions = {
532
+ /** The column that identifies a row, such as "case_id". */
533
+ key: string;
534
+ };
535
+ /**
536
+ * Result of upserting records: what was created, what was updated, how many were left alone.
537
+ */
538
+ type UpsertRecordsResult = {
539
+ created: DatasetRecordResponse[];
540
+ updated: DatasetRecordResponse[];
541
+ unchanged: number;
525
542
  };
526
543
  /**
527
544
  * Options for updating a dataset.
@@ -650,6 +667,15 @@ declare class DatasetsFacade {
650
667
  * @returns The updated record
651
668
  */
652
669
  updateRecord: (slugOrId: string, recordId: string, entry: Record<string, unknown>) => Promise<DatasetRecordResponse>;
670
+ /**
671
+ * Upserts rows matched on a key column: a known key updates in place (columns left out are
672
+ * kept), a new key adds a row, and an unchanged row is not written, so a rerun writes nothing.
673
+ * @param slugOrId - The slug or ID of the dataset
674
+ * @param entries - The rows to upsert; each must hold the key column
675
+ * @param options - The key column that identifies a row, such as "case_id"
676
+ * @returns The created and updated records and the number of rows left unchanged
677
+ */
678
+ upsertRecords: (slugOrId: string, entries: Record<string, unknown>[], options: UpsertRecordsOptions) => Promise<UpsertRecordsResult>;
653
679
  /**
654
680
  * Deletes records from a dataset by IDs.
655
681
  * @param slugOrId - The slug or ID of the dataset
@@ -706,8 +732,12 @@ declare class DatasetApiError extends DatasetError {
706
732
  * Distinguished from DatasetApiError which represents server-side errors.
707
733
  */
708
734
  declare class DatasetValidationError extends DatasetError {
709
- constructor(message: string);
735
+ /** Stable code for refusals a caller may branch on; the message may change. */
736
+ readonly code?: DatasetValidationCode;
737
+ constructor(message: string, code?: DatasetValidationCode);
710
738
  }
739
+ /** Codes an upsert refusal carries. */
740
+ type DatasetValidationCode = "missing_upsert_key" | "duplicate_upsert_key" | "dataset_has_duplicate_key";
711
741
  /**
712
742
  * Thrown when a dataset operation exceeds the plan limit (403).
713
743
  * The message includes the upgrade/subscription URL from the server.
@@ -1183,6 +1213,11 @@ type RunExperimentOptions = {
1183
1213
  * Callback for progress updates
1184
1214
  */
1185
1215
  onProgress?: (progress: number, total: number) => void;
1216
+ /**
1217
+ * Version of the experiment's saved dataset to run. Overrides the version the
1218
+ * experiment pins; without either, the run saves and reads the current content.
1219
+ */
1220
+ datasetVersion?: number;
1186
1221
  };
1187
1222
  /**
1188
1223
  * Inputs that override a platform experiment or workflow run on the server.
@@ -1498,6 +1533,15 @@ type EvaluatorField = EvaluatorResponse["fields"][number];
1498
1533
  type CreateEvaluatorBody = NonNullable<paths["/api/v1/evaluators"]["post"]["requestBody"]>["content"]["application/json"];
1499
1534
  type UpdateEvaluatorBody = NonNullable<paths["/api/v1/evaluators/{id}"]["put"]["requestBody"]>["content"]["application/json"];
1500
1535
  type DeleteEvaluatorResponse = paths["/api/v1/evaluators/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
1536
+ /** Which version of an evaluator to read: a deploy label such as `production`, or a number. */
1537
+ type EvaluatorVersionSelector = {
1538
+ label?: string;
1539
+ version?: number;
1540
+ };
1541
+ /** An evaluator's versions, newest first, and where each deploy label points. */
1542
+ type EvaluatorVersionsResponse = paths["/api/v1/evaluators/{evaluatorId}/versions"]["get"]["responses"]["200"]["content"]["application/json"];
1543
+ /** A deploy label after it was moved. */
1544
+ type EvaluatorLabelResponse = paths["/api/v1/evaluators/{evaluatorId}/labels/{label}"]["put"]["responses"]["200"]["content"]["application/json"];
1501
1545
 
1502
1546
  /**
1503
1547
  * Service for retrieving evaluator resources via the LangWatch API.
@@ -1513,9 +1557,10 @@ declare class EvaluatorsApiService {
1513
1557
  */
1514
1558
  getAll(): Promise<EvaluatorResponse[]>;
1515
1559
  /**
1516
- * Fetches a single evaluator by its ID or slug.
1560
+ * Fetches a single evaluator by its ID or slug, at the latest version unless a `label` or a
1561
+ * `version` is asked for. The slug also takes a suffix: `toxicity:production` or `toxicity:2`.
1517
1562
  */
1518
- get(idOrSlug: string): Promise<EvaluatorResponse>;
1563
+ get(idOrSlug: string, selector?: EvaluatorVersionSelector): Promise<EvaluatorResponse>;
1519
1564
  /**
1520
1565
  * Creates a new evaluator.
1521
1566
  */
@@ -1528,6 +1573,15 @@ declare class EvaluatorsApiService {
1528
1573
  * Deletes (archives) an evaluator by its ID.
1529
1574
  */
1530
1575
  delete(id: string): Promise<DeleteEvaluatorResponse>;
1576
+ /** Every version of the evaluator, newest first, with the labels on each. */
1577
+ listVersions(id: string): Promise<EvaluatorVersionsResponse>;
1578
+ /** Points a deploy label, such as `production`, at one of the evaluator's versions. */
1579
+ assignLabel(id: string, label: string, version: number): Promise<EvaluatorLabelResponse>;
1580
+ /** Removes a deploy label from the evaluator. */
1581
+ removeLabel(id: string, label: string): Promise<{
1582
+ label: string;
1583
+ removed: true;
1584
+ }>;
1531
1585
  }
1532
1586
 
1533
1587
  declare class EvaluatorsApiError extends Error {
@@ -1713,6 +1767,12 @@ declare class InstantEvalsApiService {
1713
1767
 
1714
1768
  /** One test suite as the list answers it: a name and the scenarios filed in it. */
1715
1769
  type TestSuite = NonNullable<paths["/api/v1/test-suites"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
1770
+ /** One suite template as `GET /api/v1/test-suites/templates` answers it. */
1771
+ type SuiteTemplate = NonNullable<paths["/api/v1/test-suites/templates"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
1772
+ /** The body `POST /api/v1/test-suites/templates/{templateId}/apply` takes. */
1773
+ type ApplySuiteTemplateBody = NonNullable<paths["/api/v1/test-suites/templates/{templateId}/apply"]["post"]["requestBody"]>["content"]["application/json"];
1774
+ /** The suite and scenarios a template apply created. */
1775
+ type AppliedSuiteTemplate = paths["/api/v1/test-suites/templates/{templateId}/apply"]["post"]["responses"]["201"]["content"]["application/json"];
1716
1776
  /** One test suite read on its own, with its scenarios named. */
1717
1777
  type TestSuiteDetail = paths["/api/v1/test-suites/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
1718
1778
  /** The body `POST /api/v1/test-suites` takes. */
@@ -1760,6 +1820,13 @@ declare class TestSuitesApiService {
1760
1820
  * request. A note of only spaces is no note.
1761
1821
  */
1762
1822
  run(id: string, body: RunTestSuiteBody): Promise<TestSuiteRunResult>;
1823
+ /** Lists the suite templates that ship with LangWatch, scenarios included. */
1824
+ listTemplates(): Promise<SuiteTemplate[]>;
1825
+ /** Creates a test suite from a template, fitted to the agent under test. */
1826
+ applyTemplate({ templateId, body, }: {
1827
+ templateId: string;
1828
+ body: ApplySuiteTemplateBody;
1829
+ }): Promise<AppliedSuiteTemplate>;
1763
1830
  }
1764
1831
 
1765
1832
  type WorkflowResponse = NonNullable<paths["/api/v1/workflows"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
@@ -1833,7 +1900,31 @@ interface AgentResponse {
1833
1900
  /** Why the agent cannot be run with this key; null when it can. */
1834
1901
  notSelectableReason?: "owned_by_another_person" | null;
1835
1902
  parameters?: AgentParameterSpec[];
1903
+ /** The version this read shows: the latest unless a label or a version was asked for. */
1904
+ version?: number | null;
1905
+ /** The deploy labels and the version each one points at. */
1906
+ labels?: {
1907
+ label: string;
1908
+ version: number;
1909
+ }[];
1910
+ createdBy?: {
1911
+ id: string;
1912
+ name: string | null;
1913
+ } | null;
1914
+ updatedBy?: {
1915
+ id: string;
1916
+ name: string | null;
1917
+ } | null;
1836
1918
  }
1919
+ /** Which version of an agent to read: a deploy label such as `production`, or a number. */
1920
+ type AgentVersionSelector = {
1921
+ label?: string;
1922
+ version?: number;
1923
+ };
1924
+ /** An agent's versions, newest first, and where each deploy label points. */
1925
+ type AgentVersionsResponse = paths["/api/v1/agents/{agentId}/versions"]["get"]["responses"][200]["content"]["application/json"];
1926
+ /** A deploy label after it was moved. */
1927
+ type AgentLabelResponse = paths["/api/v1/agents/{agentId}/labels/{label}"]["put"]["responses"][200]["content"]["application/json"];
1837
1928
  interface AgentListResponse {
1838
1929
  data: AgentResponse[];
1839
1930
  pagination: {
@@ -1857,17 +1948,22 @@ declare class AgentsApiService {
1857
1948
  page?: number;
1858
1949
  limit?: number;
1859
1950
  }): Promise<AgentListResponse>;
1860
- get(id: string): Promise<AgentResponse>;
1951
+ /** Reads the latest version unless a `label` or a `version` is asked for. */
1952
+ get(id: string, selector?: AgentVersionSelector): Promise<AgentResponse>;
1861
1953
  create(params: {
1862
1954
  name: string;
1863
1955
  type: string;
1864
1956
  config: Record<string, unknown>;
1865
1957
  workflowId?: string;
1958
+ /** Recorded on version 1. */
1959
+ commitMessage?: string;
1866
1960
  }): Promise<AgentResponse>;
1867
1961
  update(id: string, params: {
1868
1962
  name?: string;
1869
1963
  type?: string;
1870
1964
  config?: Record<string, unknown>;
1965
+ /** Recorded on the version this update appends. */
1966
+ commitMessage?: string;
1871
1967
  }): Promise<AgentResponse>;
1872
1968
  delete(id: string): Promise<{
1873
1969
  id: string;
@@ -1884,6 +1980,15 @@ declare class AgentsApiService {
1884
1980
  * test suite, and the answer carries the run ids to follow.
1885
1981
  */
1886
1982
  test(id: string): Promise<AgentTestRunResponse>;
1983
+ /** Every version of the agent, newest first, with the labels on each. */
1984
+ listVersions(id: string): Promise<AgentVersionsResponse>;
1985
+ /** Points a deploy label, such as `production`, at one of the agent's versions. */
1986
+ assignLabel(id: string, label: string, version: number): Promise<AgentLabelResponse>;
1987
+ /** Removes a deploy label from the agent. */
1988
+ removeLabel(id: string, label: string): Promise<{
1989
+ label: string;
1990
+ removed: true;
1991
+ }>;
1887
1992
  }
1888
1993
 
1889
1994
  type AnnotationResponse = components["schemas"]["Annotation"];
@@ -3682,4 +3787,4 @@ declare const logger: {
3682
3787
  NoOpLogger: typeof NoOpLogger;
3683
3788
  };
3684
3789
 
3685
- export { type ArchivedProject, type ArchivedTeam, type BatchCreateRecordsResponse, type BudgetOnBreach, type BudgetScopeKind, type BudgetWindow, ComparisonError, type ComparisonMetric, type ComparisonOptions, type ComparisonStatus, type ComparisonVerdict, type CreateDatasetOptions, type CreateEvaluatorBody, type CreateFromUploadResponse, type CreateGatewayBudgetInput, type CreateGatewayBudgetScope, type CreateLangWatchFetchOptions, type CreateProjectInput, type CreateVirtualKeyInput, type CreateWebhookEndpointInput, type Dataset, DatasetApiError, type DatasetColumnType, type DatasetEntry, DatasetError, type DatasetListItem, type DatasetMetadata, DatasetNotFoundError, DatasetPlanLimitError, type DatasetRecordResponse, DatasetValidationError, DatasetsFacade, type DeleteRecordsResponse, type EmittedEvent, type EmittedEventsPage, type EndUserCap, type EndUserSpend, type EvaluateOptions, type EvaluationCost, EvaluationError, type EvaluationResult, type EvaluationStatus, EvaluationsApiError, EvaluationsFacade, EvaluatorCallError, EvaluatorError, type EvaluatorField, EvaluatorNotFoundError, type EvaluatorResponse, EvaluatorsApiError, EvaluatorsApiService, Experiment, ExperimentApiError, type ExperimentConcurrencyOptions, ExperimentError, type ExperimentEvaluateOptions, type ExperimentEvaluationResult, type ExperimentEvaluationStatus, ExperimentInitError, type ExperimentInitOptions, type ExperimentRowResult, type ExperimentRunWithResults, ExperimentsFacade, FetchPolicy, type GatewayBudget, type GatewayBudgetPage, GatewayBudgetsApiError, GatewayBudgetsApiService, type GetDatasetOptions, type GetPromptOptions, IDEMPOTENCY_KEY_HEADER, IDEMPOTENT_REPLAY_HEADER, type IdempotentCreateOptions, LangWatch, LangWatchApiError, type LangWatchFetch, LangWatchHandledError, LangWatchRedirectError, type ListDatasetsApiResponse, type ListDatasetsOptions, type ListRecordsApiResponse, type ListRecordsOptions, type ListTeamsResponse, type LogOptions, type MutationOptions, type PaginatedProjects, type PaginatedResponse, type Pagination, type Project, type ProjectWithServiceKey, ProjectsApiError, ProjectsApiService, type RunCallback, type RunContext, type RunOptions, type RunWithResultsOptions, type SpendEvent, type SpendEventStatus, SpendEventsApiError, SpendEventsApiService, type SpendEventsPage, type SpendFilterOptions, type SpendGroupBy, type SpendReplayResult, type SpendSummariesOptions, type SpendSummariesPage, type SpendSummaryRow, type SpendSummaryStatus, type TargetInfo, type TargetMetadata, TargetMetadataConflictError, type TargetType, type Team, type TeamMember, type TeamPagination, TeamsApiError, TeamsApiService, type UpdateDatasetOptions, type UpdateGatewayBudgetInput, type UpdateProjectInput, type UpdateVirtualKeyInput, type UpdateWebhookEndpointInput, type UploadResponse, type VerifyWebhookSignatureOptions, type VirtualKey, type VirtualKeyBudgetInput, type VirtualKeyPage, type VirtualKeyRoutingMode, type VirtualKeyScope, type VirtualKeyScopeType, type VirtualKeySpendSummary, type VirtualKeyWithSecret, VirtualKeysApiError, VirtualKeysApiService, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_SIGNATURE_DEFAULT_TOLERANCE_SECONDS, WEBHOOK_SIGNATURE_HEADER, type WebhookDeliveryPage, type WebhookDeliveryRecord, type WebhookEndpointHealth, type WebhookEndpointSummary, type WebhookEndpointWithSecret, type WebhookEventType, type WebhookSignatureFailureCode, WebhookSignatureVerificationError, type WebhookTestResult, WebhooksApiError, WebhooksApiService, createLangWatchFetch, isLangWatchHandledError, langwatchFetch, logger, verifyWebhookSignature };
3790
+ export { type ArchivedProject, type ArchivedTeam, type BatchCreateRecordsResponse, type BudgetOnBreach, type BudgetScopeKind, type BudgetWindow, ComparisonError, type ComparisonMetric, type ComparisonOptions, type ComparisonStatus, type ComparisonVerdict, type CreateDatasetOptions, type CreateEvaluatorBody, type CreateFromUploadResponse, type CreateGatewayBudgetInput, type CreateGatewayBudgetScope, type CreateLangWatchFetchOptions, type CreateProjectInput, type CreateVirtualKeyInput, type CreateWebhookEndpointInput, type Dataset, DatasetApiError, type DatasetColumnType, type DatasetEntry, DatasetError, type DatasetListItem, type DatasetMetadata, DatasetNotFoundError, DatasetPlanLimitError, type DatasetRecordResponse, type DatasetValidationCode, DatasetValidationError, DatasetsFacade, type DeleteRecordsResponse, type EmittedEvent, type EmittedEventsPage, type EndUserCap, type EndUserSpend, type EvaluateOptions, type EvaluationCost, EvaluationError, type EvaluationResult, type EvaluationStatus, EvaluationsApiError, EvaluationsFacade, EvaluatorCallError, EvaluatorError, type EvaluatorField, EvaluatorNotFoundError, type EvaluatorResponse, EvaluatorsApiError, EvaluatorsApiService, Experiment, ExperimentApiError, type ExperimentConcurrencyOptions, ExperimentError, type ExperimentEvaluateOptions, type ExperimentEvaluationResult, type ExperimentEvaluationStatus, ExperimentInitError, type ExperimentInitOptions, type ExperimentRowResult, type ExperimentRunWithResults, ExperimentsFacade, FetchPolicy, type GatewayBudget, type GatewayBudgetPage, GatewayBudgetsApiError, GatewayBudgetsApiService, type GetDatasetOptions, type GetPromptOptions, IDEMPOTENCY_KEY_HEADER, IDEMPOTENT_REPLAY_HEADER, type IdempotentCreateOptions, LangWatch, LangWatchApiError, type LangWatchFetch, LangWatchHandledError, LangWatchRedirectError, type ListDatasetsApiResponse, type ListDatasetsOptions, type ListRecordsApiResponse, type ListRecordsOptions, type ListTeamsResponse, type LogOptions, type MutationOptions, type PaginatedProjects, type PaginatedResponse, type Pagination, type Project, type ProjectWithServiceKey, ProjectsApiError, ProjectsApiService, type RunCallback, type RunContext, type RunOptions, type RunWithResultsOptions, type SpendEvent, type SpendEventStatus, SpendEventsApiError, SpendEventsApiService, type SpendEventsPage, type SpendFilterOptions, type SpendGroupBy, type SpendReplayResult, type SpendSummariesOptions, type SpendSummariesPage, type SpendSummaryRow, type SpendSummaryStatus, type TargetInfo, type TargetMetadata, TargetMetadataConflictError, type TargetType, type Team, type TeamMember, type TeamPagination, TeamsApiError, TeamsApiService, type UpdateDatasetOptions, type UpdateGatewayBudgetInput, type UpdateProjectInput, type UpdateVirtualKeyInput, type UpdateWebhookEndpointInput, type UploadResponse, type UpsertRecordsOptions, type UpsertRecordsResult, type VerifyWebhookSignatureOptions, type VirtualKey, type VirtualKeyBudgetInput, type VirtualKeyPage, type VirtualKeyRoutingMode, type VirtualKeyScope, type VirtualKeyScopeType, type VirtualKeySpendSummary, type VirtualKeyWithSecret, VirtualKeysApiError, VirtualKeysApiService, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_SIGNATURE_DEFAULT_TOLERANCE_SECONDS, WEBHOOK_SIGNATURE_HEADER, type WebhookDeliveryPage, type WebhookDeliveryRecord, type WebhookEndpointHealth, type WebhookEndpointSummary, type WebhookEndpointWithSecret, type WebhookEventType, type WebhookSignatureFailureCode, WebhookSignatureVerificationError, type WebhookTestResult, WebhooksApiError, WebhooksApiService, createLangWatchFetch, isLangWatchHandledError, langwatchFetch, logger, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { L as Logger, C as ConsoleLogger, N as NoOpLogger } from './index-D7rKIGrO.js';
2
- export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-Atjtldz3.js';
2
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-BparHh-q.js';
3
3
  import { z } from 'zod';
4
4
  import openApiCreateClient from 'openapi-fetch';
5
- import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types--djDPuMb.js';
5
+ import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-BXcB5Uov.js';
6
6
  export { l as attributes } from './types-CoS5PmeU.js';
7
7
  import { LangWatchHandledErrorReason, LangWatchHandledErrorShape } from '@langwatch/handled-error/langwatch-handled-error';
8
8
  export { LangWatchHandledErrorReason, LangWatchHandledErrorShape } from '@langwatch/handled-error/langwatch-handled-error';
@@ -522,6 +522,23 @@ type CreateDatasetOptions = {
522
522
  name: string;
523
523
  /** Column type definitions (defaults to empty array) */
524
524
  columnTypes?: DatasetColumnType[];
525
+ /** First rows, written with the dataset in one request. Each key must be a column. */
526
+ entries?: Record<string, unknown>[];
527
+ };
528
+ /**
529
+ * Options for upserting records by a key column.
530
+ */
531
+ type UpsertRecordsOptions = {
532
+ /** The column that identifies a row, such as "case_id". */
533
+ key: string;
534
+ };
535
+ /**
536
+ * Result of upserting records: what was created, what was updated, how many were left alone.
537
+ */
538
+ type UpsertRecordsResult = {
539
+ created: DatasetRecordResponse[];
540
+ updated: DatasetRecordResponse[];
541
+ unchanged: number;
525
542
  };
526
543
  /**
527
544
  * Options for updating a dataset.
@@ -650,6 +667,15 @@ declare class DatasetsFacade {
650
667
  * @returns The updated record
651
668
  */
652
669
  updateRecord: (slugOrId: string, recordId: string, entry: Record<string, unknown>) => Promise<DatasetRecordResponse>;
670
+ /**
671
+ * Upserts rows matched on a key column: a known key updates in place (columns left out are
672
+ * kept), a new key adds a row, and an unchanged row is not written, so a rerun writes nothing.
673
+ * @param slugOrId - The slug or ID of the dataset
674
+ * @param entries - The rows to upsert; each must hold the key column
675
+ * @param options - The key column that identifies a row, such as "case_id"
676
+ * @returns The created and updated records and the number of rows left unchanged
677
+ */
678
+ upsertRecords: (slugOrId: string, entries: Record<string, unknown>[], options: UpsertRecordsOptions) => Promise<UpsertRecordsResult>;
653
679
  /**
654
680
  * Deletes records from a dataset by IDs.
655
681
  * @param slugOrId - The slug or ID of the dataset
@@ -706,8 +732,12 @@ declare class DatasetApiError extends DatasetError {
706
732
  * Distinguished from DatasetApiError which represents server-side errors.
707
733
  */
708
734
  declare class DatasetValidationError extends DatasetError {
709
- constructor(message: string);
735
+ /** Stable code for refusals a caller may branch on; the message may change. */
736
+ readonly code?: DatasetValidationCode;
737
+ constructor(message: string, code?: DatasetValidationCode);
710
738
  }
739
+ /** Codes an upsert refusal carries. */
740
+ type DatasetValidationCode = "missing_upsert_key" | "duplicate_upsert_key" | "dataset_has_duplicate_key";
711
741
  /**
712
742
  * Thrown when a dataset operation exceeds the plan limit (403).
713
743
  * The message includes the upgrade/subscription URL from the server.
@@ -1183,6 +1213,11 @@ type RunExperimentOptions = {
1183
1213
  * Callback for progress updates
1184
1214
  */
1185
1215
  onProgress?: (progress: number, total: number) => void;
1216
+ /**
1217
+ * Version of the experiment's saved dataset to run. Overrides the version the
1218
+ * experiment pins; without either, the run saves and reads the current content.
1219
+ */
1220
+ datasetVersion?: number;
1186
1221
  };
1187
1222
  /**
1188
1223
  * Inputs that override a platform experiment or workflow run on the server.
@@ -1498,6 +1533,15 @@ type EvaluatorField = EvaluatorResponse["fields"][number];
1498
1533
  type CreateEvaluatorBody = NonNullable<paths["/api/v1/evaluators"]["post"]["requestBody"]>["content"]["application/json"];
1499
1534
  type UpdateEvaluatorBody = NonNullable<paths["/api/v1/evaluators/{id}"]["put"]["requestBody"]>["content"]["application/json"];
1500
1535
  type DeleteEvaluatorResponse = paths["/api/v1/evaluators/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
1536
+ /** Which version of an evaluator to read: a deploy label such as `production`, or a number. */
1537
+ type EvaluatorVersionSelector = {
1538
+ label?: string;
1539
+ version?: number;
1540
+ };
1541
+ /** An evaluator's versions, newest first, and where each deploy label points. */
1542
+ type EvaluatorVersionsResponse = paths["/api/v1/evaluators/{evaluatorId}/versions"]["get"]["responses"]["200"]["content"]["application/json"];
1543
+ /** A deploy label after it was moved. */
1544
+ type EvaluatorLabelResponse = paths["/api/v1/evaluators/{evaluatorId}/labels/{label}"]["put"]["responses"]["200"]["content"]["application/json"];
1501
1545
 
1502
1546
  /**
1503
1547
  * Service for retrieving evaluator resources via the LangWatch API.
@@ -1513,9 +1557,10 @@ declare class EvaluatorsApiService {
1513
1557
  */
1514
1558
  getAll(): Promise<EvaluatorResponse[]>;
1515
1559
  /**
1516
- * Fetches a single evaluator by its ID or slug.
1560
+ * Fetches a single evaluator by its ID or slug, at the latest version unless a `label` or a
1561
+ * `version` is asked for. The slug also takes a suffix: `toxicity:production` or `toxicity:2`.
1517
1562
  */
1518
- get(idOrSlug: string): Promise<EvaluatorResponse>;
1563
+ get(idOrSlug: string, selector?: EvaluatorVersionSelector): Promise<EvaluatorResponse>;
1519
1564
  /**
1520
1565
  * Creates a new evaluator.
1521
1566
  */
@@ -1528,6 +1573,15 @@ declare class EvaluatorsApiService {
1528
1573
  * Deletes (archives) an evaluator by its ID.
1529
1574
  */
1530
1575
  delete(id: string): Promise<DeleteEvaluatorResponse>;
1576
+ /** Every version of the evaluator, newest first, with the labels on each. */
1577
+ listVersions(id: string): Promise<EvaluatorVersionsResponse>;
1578
+ /** Points a deploy label, such as `production`, at one of the evaluator's versions. */
1579
+ assignLabel(id: string, label: string, version: number): Promise<EvaluatorLabelResponse>;
1580
+ /** Removes a deploy label from the evaluator. */
1581
+ removeLabel(id: string, label: string): Promise<{
1582
+ label: string;
1583
+ removed: true;
1584
+ }>;
1531
1585
  }
1532
1586
 
1533
1587
  declare class EvaluatorsApiError extends Error {
@@ -1713,6 +1767,12 @@ declare class InstantEvalsApiService {
1713
1767
 
1714
1768
  /** One test suite as the list answers it: a name and the scenarios filed in it. */
1715
1769
  type TestSuite = NonNullable<paths["/api/v1/test-suites"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
1770
+ /** One suite template as `GET /api/v1/test-suites/templates` answers it. */
1771
+ type SuiteTemplate = NonNullable<paths["/api/v1/test-suites/templates"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
1772
+ /** The body `POST /api/v1/test-suites/templates/{templateId}/apply` takes. */
1773
+ type ApplySuiteTemplateBody = NonNullable<paths["/api/v1/test-suites/templates/{templateId}/apply"]["post"]["requestBody"]>["content"]["application/json"];
1774
+ /** The suite and scenarios a template apply created. */
1775
+ type AppliedSuiteTemplate = paths["/api/v1/test-suites/templates/{templateId}/apply"]["post"]["responses"]["201"]["content"]["application/json"];
1716
1776
  /** One test suite read on its own, with its scenarios named. */
1717
1777
  type TestSuiteDetail = paths["/api/v1/test-suites/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
1718
1778
  /** The body `POST /api/v1/test-suites` takes. */
@@ -1760,6 +1820,13 @@ declare class TestSuitesApiService {
1760
1820
  * request. A note of only spaces is no note.
1761
1821
  */
1762
1822
  run(id: string, body: RunTestSuiteBody): Promise<TestSuiteRunResult>;
1823
+ /** Lists the suite templates that ship with LangWatch, scenarios included. */
1824
+ listTemplates(): Promise<SuiteTemplate[]>;
1825
+ /** Creates a test suite from a template, fitted to the agent under test. */
1826
+ applyTemplate({ templateId, body, }: {
1827
+ templateId: string;
1828
+ body: ApplySuiteTemplateBody;
1829
+ }): Promise<AppliedSuiteTemplate>;
1763
1830
  }
1764
1831
 
1765
1832
  type WorkflowResponse = NonNullable<paths["/api/v1/workflows"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
@@ -1833,7 +1900,31 @@ interface AgentResponse {
1833
1900
  /** Why the agent cannot be run with this key; null when it can. */
1834
1901
  notSelectableReason?: "owned_by_another_person" | null;
1835
1902
  parameters?: AgentParameterSpec[];
1903
+ /** The version this read shows: the latest unless a label or a version was asked for. */
1904
+ version?: number | null;
1905
+ /** The deploy labels and the version each one points at. */
1906
+ labels?: {
1907
+ label: string;
1908
+ version: number;
1909
+ }[];
1910
+ createdBy?: {
1911
+ id: string;
1912
+ name: string | null;
1913
+ } | null;
1914
+ updatedBy?: {
1915
+ id: string;
1916
+ name: string | null;
1917
+ } | null;
1836
1918
  }
1919
+ /** Which version of an agent to read: a deploy label such as `production`, or a number. */
1920
+ type AgentVersionSelector = {
1921
+ label?: string;
1922
+ version?: number;
1923
+ };
1924
+ /** An agent's versions, newest first, and where each deploy label points. */
1925
+ type AgentVersionsResponse = paths["/api/v1/agents/{agentId}/versions"]["get"]["responses"][200]["content"]["application/json"];
1926
+ /** A deploy label after it was moved. */
1927
+ type AgentLabelResponse = paths["/api/v1/agents/{agentId}/labels/{label}"]["put"]["responses"][200]["content"]["application/json"];
1837
1928
  interface AgentListResponse {
1838
1929
  data: AgentResponse[];
1839
1930
  pagination: {
@@ -1857,17 +1948,22 @@ declare class AgentsApiService {
1857
1948
  page?: number;
1858
1949
  limit?: number;
1859
1950
  }): Promise<AgentListResponse>;
1860
- get(id: string): Promise<AgentResponse>;
1951
+ /** Reads the latest version unless a `label` or a `version` is asked for. */
1952
+ get(id: string, selector?: AgentVersionSelector): Promise<AgentResponse>;
1861
1953
  create(params: {
1862
1954
  name: string;
1863
1955
  type: string;
1864
1956
  config: Record<string, unknown>;
1865
1957
  workflowId?: string;
1958
+ /** Recorded on version 1. */
1959
+ commitMessage?: string;
1866
1960
  }): Promise<AgentResponse>;
1867
1961
  update(id: string, params: {
1868
1962
  name?: string;
1869
1963
  type?: string;
1870
1964
  config?: Record<string, unknown>;
1965
+ /** Recorded on the version this update appends. */
1966
+ commitMessage?: string;
1871
1967
  }): Promise<AgentResponse>;
1872
1968
  delete(id: string): Promise<{
1873
1969
  id: string;
@@ -1884,6 +1980,15 @@ declare class AgentsApiService {
1884
1980
  * test suite, and the answer carries the run ids to follow.
1885
1981
  */
1886
1982
  test(id: string): Promise<AgentTestRunResponse>;
1983
+ /** Every version of the agent, newest first, with the labels on each. */
1984
+ listVersions(id: string): Promise<AgentVersionsResponse>;
1985
+ /** Points a deploy label, such as `production`, at one of the agent's versions. */
1986
+ assignLabel(id: string, label: string, version: number): Promise<AgentLabelResponse>;
1987
+ /** Removes a deploy label from the agent. */
1988
+ removeLabel(id: string, label: string): Promise<{
1989
+ label: string;
1990
+ removed: true;
1991
+ }>;
1887
1992
  }
1888
1993
 
1889
1994
  type AnnotationResponse = components["schemas"]["Annotation"];
@@ -3682,4 +3787,4 @@ declare const logger: {
3682
3787
  NoOpLogger: typeof NoOpLogger;
3683
3788
  };
3684
3789
 
3685
- export { type ArchivedProject, type ArchivedTeam, type BatchCreateRecordsResponse, type BudgetOnBreach, type BudgetScopeKind, type BudgetWindow, ComparisonError, type ComparisonMetric, type ComparisonOptions, type ComparisonStatus, type ComparisonVerdict, type CreateDatasetOptions, type CreateEvaluatorBody, type CreateFromUploadResponse, type CreateGatewayBudgetInput, type CreateGatewayBudgetScope, type CreateLangWatchFetchOptions, type CreateProjectInput, type CreateVirtualKeyInput, type CreateWebhookEndpointInput, type Dataset, DatasetApiError, type DatasetColumnType, type DatasetEntry, DatasetError, type DatasetListItem, type DatasetMetadata, DatasetNotFoundError, DatasetPlanLimitError, type DatasetRecordResponse, DatasetValidationError, DatasetsFacade, type DeleteRecordsResponse, type EmittedEvent, type EmittedEventsPage, type EndUserCap, type EndUserSpend, type EvaluateOptions, type EvaluationCost, EvaluationError, type EvaluationResult, type EvaluationStatus, EvaluationsApiError, EvaluationsFacade, EvaluatorCallError, EvaluatorError, type EvaluatorField, EvaluatorNotFoundError, type EvaluatorResponse, EvaluatorsApiError, EvaluatorsApiService, Experiment, ExperimentApiError, type ExperimentConcurrencyOptions, ExperimentError, type ExperimentEvaluateOptions, type ExperimentEvaluationResult, type ExperimentEvaluationStatus, ExperimentInitError, type ExperimentInitOptions, type ExperimentRowResult, type ExperimentRunWithResults, ExperimentsFacade, FetchPolicy, type GatewayBudget, type GatewayBudgetPage, GatewayBudgetsApiError, GatewayBudgetsApiService, type GetDatasetOptions, type GetPromptOptions, IDEMPOTENCY_KEY_HEADER, IDEMPOTENT_REPLAY_HEADER, type IdempotentCreateOptions, LangWatch, LangWatchApiError, type LangWatchFetch, LangWatchHandledError, LangWatchRedirectError, type ListDatasetsApiResponse, type ListDatasetsOptions, type ListRecordsApiResponse, type ListRecordsOptions, type ListTeamsResponse, type LogOptions, type MutationOptions, type PaginatedProjects, type PaginatedResponse, type Pagination, type Project, type ProjectWithServiceKey, ProjectsApiError, ProjectsApiService, type RunCallback, type RunContext, type RunOptions, type RunWithResultsOptions, type SpendEvent, type SpendEventStatus, SpendEventsApiError, SpendEventsApiService, type SpendEventsPage, type SpendFilterOptions, type SpendGroupBy, type SpendReplayResult, type SpendSummariesOptions, type SpendSummariesPage, type SpendSummaryRow, type SpendSummaryStatus, type TargetInfo, type TargetMetadata, TargetMetadataConflictError, type TargetType, type Team, type TeamMember, type TeamPagination, TeamsApiError, TeamsApiService, type UpdateDatasetOptions, type UpdateGatewayBudgetInput, type UpdateProjectInput, type UpdateVirtualKeyInput, type UpdateWebhookEndpointInput, type UploadResponse, type VerifyWebhookSignatureOptions, type VirtualKey, type VirtualKeyBudgetInput, type VirtualKeyPage, type VirtualKeyRoutingMode, type VirtualKeyScope, type VirtualKeyScopeType, type VirtualKeySpendSummary, type VirtualKeyWithSecret, VirtualKeysApiError, VirtualKeysApiService, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_SIGNATURE_DEFAULT_TOLERANCE_SECONDS, WEBHOOK_SIGNATURE_HEADER, type WebhookDeliveryPage, type WebhookDeliveryRecord, type WebhookEndpointHealth, type WebhookEndpointSummary, type WebhookEndpointWithSecret, type WebhookEventType, type WebhookSignatureFailureCode, WebhookSignatureVerificationError, type WebhookTestResult, WebhooksApiError, WebhooksApiService, createLangWatchFetch, isLangWatchHandledError, langwatchFetch, logger, verifyWebhookSignature };
3790
+ export { type ArchivedProject, type ArchivedTeam, type BatchCreateRecordsResponse, type BudgetOnBreach, type BudgetScopeKind, type BudgetWindow, ComparisonError, type ComparisonMetric, type ComparisonOptions, type ComparisonStatus, type ComparisonVerdict, type CreateDatasetOptions, type CreateEvaluatorBody, type CreateFromUploadResponse, type CreateGatewayBudgetInput, type CreateGatewayBudgetScope, type CreateLangWatchFetchOptions, type CreateProjectInput, type CreateVirtualKeyInput, type CreateWebhookEndpointInput, type Dataset, DatasetApiError, type DatasetColumnType, type DatasetEntry, DatasetError, type DatasetListItem, type DatasetMetadata, DatasetNotFoundError, DatasetPlanLimitError, type DatasetRecordResponse, type DatasetValidationCode, DatasetValidationError, DatasetsFacade, type DeleteRecordsResponse, type EmittedEvent, type EmittedEventsPage, type EndUserCap, type EndUserSpend, type EvaluateOptions, type EvaluationCost, EvaluationError, type EvaluationResult, type EvaluationStatus, EvaluationsApiError, EvaluationsFacade, EvaluatorCallError, EvaluatorError, type EvaluatorField, EvaluatorNotFoundError, type EvaluatorResponse, EvaluatorsApiError, EvaluatorsApiService, Experiment, ExperimentApiError, type ExperimentConcurrencyOptions, ExperimentError, type ExperimentEvaluateOptions, type ExperimentEvaluationResult, type ExperimentEvaluationStatus, ExperimentInitError, type ExperimentInitOptions, type ExperimentRowResult, type ExperimentRunWithResults, ExperimentsFacade, FetchPolicy, type GatewayBudget, type GatewayBudgetPage, GatewayBudgetsApiError, GatewayBudgetsApiService, type GetDatasetOptions, type GetPromptOptions, IDEMPOTENCY_KEY_HEADER, IDEMPOTENT_REPLAY_HEADER, type IdempotentCreateOptions, LangWatch, LangWatchApiError, type LangWatchFetch, LangWatchHandledError, LangWatchRedirectError, type ListDatasetsApiResponse, type ListDatasetsOptions, type ListRecordsApiResponse, type ListRecordsOptions, type ListTeamsResponse, type LogOptions, type MutationOptions, type PaginatedProjects, type PaginatedResponse, type Pagination, type Project, type ProjectWithServiceKey, ProjectsApiError, ProjectsApiService, type RunCallback, type RunContext, type RunOptions, type RunWithResultsOptions, type SpendEvent, type SpendEventStatus, SpendEventsApiError, SpendEventsApiService, type SpendEventsPage, type SpendFilterOptions, type SpendGroupBy, type SpendReplayResult, type SpendSummariesOptions, type SpendSummariesPage, type SpendSummaryRow, type SpendSummaryStatus, type TargetInfo, type TargetMetadata, TargetMetadataConflictError, type TargetType, type Team, type TeamMember, type TeamPagination, TeamsApiError, TeamsApiService, type UpdateDatasetOptions, type UpdateGatewayBudgetInput, type UpdateProjectInput, type UpdateVirtualKeyInput, type UpdateWebhookEndpointInput, type UploadResponse, type UpsertRecordsOptions, type UpsertRecordsResult, type VerifyWebhookSignatureOptions, type VirtualKey, type VirtualKeyBudgetInput, type VirtualKeyPage, type VirtualKeyRoutingMode, type VirtualKeyScope, type VirtualKeyScopeType, type VirtualKeySpendSummary, type VirtualKeyWithSecret, VirtualKeysApiError, VirtualKeysApiService, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_SIGNATURE_DEFAULT_TOLERANCE_SECONDS, WEBHOOK_SIGNATURE_HEADER, type WebhookDeliveryPage, type WebhookDeliveryRecord, type WebhookEndpointHealth, type WebhookEndpointSummary, type WebhookEndpointWithSecret, type WebhookEventType, type WebhookSignatureFailureCode, WebhookSignatureVerificationError, type WebhookTestResult, WebhooksApiError, WebhooksApiService, createLangWatchFetch, isLangWatchHandledError, langwatchFetch, logger, verifyWebhookSignature };