langwatch 1.15.0 → 1.16.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 (32) 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/{chunk-ZI7OXROR.js → chunk-6SSJPQAW.js} +2 -2
  6. package/dist/{chunk-ZI7OXROR.js.map → chunk-6SSJPQAW.js.map} +1 -1
  7. package/dist/{chunk-Y6NVAU6Z.js → chunk-FUDF46YW.js} +12 -12
  8. package/dist/{chunk-Y6NVAU6Z.js.map → chunk-FUDF46YW.js.map} +1 -1
  9. package/dist/{chunk-ZKNCPK33.mjs → chunk-NZP72HTX.mjs} +2 -2
  10. package/dist/{chunk-ZKNCPK33.mjs.map → chunk-NZP72HTX.mjs.map} +1 -1
  11. package/dist/{chunk-GWMU6OA4.mjs → chunk-XC6AXWVR.mjs} +2 -2
  12. package/dist/cli/bundle.js +327 -294
  13. package/dist/{implementation-BioGaCjm.d.mts → implementation-BvHTdJLg.d.mts} +1 -1
  14. package/dist/{implementation-BYM7X0I8.d.ts → implementation-Dlxw5hlM.d.ts} +1 -1
  15. package/dist/index.d.mts +116 -7
  16. package/dist/index.d.ts +116 -7
  17. package/dist/index.js +205 -40
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +174 -9
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/observability-sdk/index.d.mts +3 -3
  22. package/dist/observability-sdk/index.d.ts +3 -3
  23. package/dist/observability-sdk/index.js +2 -2
  24. package/dist/observability-sdk/index.mjs +1 -1
  25. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  26. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  27. package/dist/observability-sdk/setup/node/index.js +3 -3
  28. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  29. package/dist/{types-BJwkO7NN.d.ts → types-CzElA_6o.d.ts} +1421 -247
  30. package/dist/{types-eq6Fz5Oj.d.mts → types-Dd2d9hCy.d.mts} +1421 -247
  31. package/package.json +1 -1
  32. /package/dist/{chunk-GWMU6OA4.mjs.map → chunk-XC6AXWVR.mjs.map} +0 -0
@@ -4,7 +4,7 @@ import { ExportResult } from '@opentelemetry/core';
4
4
  import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
5
5
  import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-VOZv9LYO.mjs';
6
6
  import { TracerProvider } from '@opentelemetry/api';
7
- import { j as LangWatchTracer } from './types-eq6Fz5Oj.mjs';
7
+ import { j as LangWatchTracer } from './types-Dd2d9hCy.mjs';
8
8
 
9
9
  /**
10
10
  * Filterable Batch Span Exporter for OpenTelemetry
@@ -4,7 +4,7 @@ import { ExportResult } from '@opentelemetry/core';
4
4
  import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
5
5
  import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-VOZv9LYO.js';
6
6
  import { TracerProvider } from '@opentelemetry/api';
7
- import { j as LangWatchTracer } from './types-BJwkO7NN.js';
7
+ import { j as LangWatchTracer } from './types-CzElA_6o.js';
8
8
 
9
9
  /**
10
10
  * Filterable Batch Span Exporter for OpenTelemetry
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
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-BioGaCjm.mjs';
2
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-BvHTdJLg.mjs';
3
3
  import { z } from 'zod';
4
- 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-eq6Fz5Oj.mjs';
4
+ 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-Dd2d9hCy.mjs';
5
5
  import openApiCreateClient from 'openapi-fetch';
6
6
  export { l as attributes } from './types-VOZv9LYO.mjs';
7
7
  import { CliHandledErrorReason, CliHandledError } from '@langwatch/langy/cards/handled-error';
@@ -2060,6 +2060,72 @@ declare class RunPlansApiService {
2060
2060
  }>;
2061
2061
  }
2062
2062
 
2063
+ /** One Instant Eval run, exactly as the REST surface answers it. */
2064
+ type InstantEvalRun = paths["/api/v1/instant-evals/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
2065
+ /** The body that starts a run, and the same body that prices one. */
2066
+ type InstantEvalRunBody = NonNullable<paths["/api/v1/instant-evals"]["post"]["requestBody"]>["content"]["application/json"];
2067
+ /** What a run would read and what judging it would cost. */
2068
+ type InstantEvalEstimate = paths["/api/v1/instant-evals/estimate"]["post"]["responses"]["200"]["content"]["application/json"];
2069
+ /** One page of a run's judgements, and where the next one starts. */
2070
+ type InstantEvalResultsPage = paths["/api/v1/instant-evals/{id}/results"]["get"]["responses"]["200"]["content"]["application/json"];
2071
+ /** One judgement the run recorded. */
2072
+ type InstantEvalJudgment = InstantEvalResultsPage["judgments"][number];
2073
+ /** A few of a run's rows, with the judged text beside the verdict. */
2074
+ type InstantEvalSample = paths["/api/v1/instant-evals/{id}/sample"]["get"]["responses"]["200"]["content"]["application/json"];
2075
+ /**
2076
+ * Typed client for the Instant Evals family (`/api/v1/instant-evals`).
2077
+ *
2078
+ * A run judges one LangWatchQL statement across the project's history. The
2079
+ * statement is the same one the query door runs, so a working query is a
2080
+ * working run once it projects `TraceId` and at least one eval function
2081
+ * column. Starting one answers the queued run, and its progress is polled.
2082
+ *
2083
+ * The project comes from the credential, so no method takes a project id.
2084
+ *
2085
+ * @see specs/instant-evals/instant-eval-api.feature
2086
+ */
2087
+ declare class InstantEvalsApiService {
2088
+ private readonly apiClient;
2089
+ constructor(config?: Pick<InternalConfig, "langwatchApiClient">);
2090
+ private handleApiError;
2091
+ /**
2092
+ * The body of a successful answer. A failed response can arrive with no body
2093
+ * at all (a proxy answering 502 while the platform restarts), which leaves
2094
+ * `error` empty, so the response status decides and not the error alone.
2095
+ */
2096
+ private unwrap;
2097
+ /** Starts a run. The judging happens on the queue. */
2098
+ create(body: InstantEvalRunBody): Promise<InstantEvalRun>;
2099
+ /** Prices a run without starting it. Nothing is judged and nothing is charged. */
2100
+ estimate(body: InstantEvalRunBody): Promise<InstantEvalEstimate>;
2101
+ /** The project's runs, newest first. */
2102
+ list(options?: {
2103
+ limit?: number;
2104
+ before?: string;
2105
+ beforeId?: string;
2106
+ }): Promise<InstantEvalRun[]>;
2107
+ get(id: string): Promise<InstantEvalRun>;
2108
+ /** Asks a run to stop. It stops before its next page. */
2109
+ cancel(id: string): Promise<InstantEvalRun>;
2110
+ /**
2111
+ * One page of a run's judgements.
2112
+ *
2113
+ * Pass the `nextCursor` a page answers with to read the page after it. The
2114
+ * last page carries none.
2115
+ */
2116
+ results(id: string, options?: {
2117
+ questionId?: string;
2118
+ isMatched?: boolean;
2119
+ status?: InstantEvalJudgment["status"];
2120
+ limit?: number;
2121
+ cursor?: string;
2122
+ }): Promise<InstantEvalResultsPage>;
2123
+ /** A few of the run's rows, with the judged text beside the verdict. */
2124
+ sample(id: string, options?: {
2125
+ n?: number;
2126
+ }): Promise<InstantEvalSample>;
2127
+ }
2128
+
2063
2129
  /** One test suite as the list answers it: a name and the scenarios filed in it. */
2064
2130
  type TestSuite = NonNullable<paths["/api/v1/test-suites"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
2065
2131
  /** One test suite read on its own, with its scenarios named. */
@@ -2335,6 +2401,15 @@ declare class AnalyticsApiService {
2335
2401
  type QueryRunResult = paths["/api/v1/query"]["post"]["responses"]["200"]["content"]["application/json"];
2336
2402
  /** The queryable dataset/column catalog `GET /api/v1/query/schema` answers with. */
2337
2403
  type QuerySchemaResult = paths["/api/v1/query/schema"]["get"]["responses"]["200"]["content"]["application/json"];
2404
+ /**
2405
+ * Both query languages, as `GET /api/v1/query/reference` describes them.
2406
+ *
2407
+ * A superset of {@link QuerySchemaResult} in one direction only: it embeds the
2408
+ * schema and adds the trace filter language, worked examples and the decision
2409
+ * table. Nothing here is tenant data — the values a field holds come from
2410
+ * `GET /api/traces/facets`.
2411
+ */
2412
+ type QueryReferenceResult = paths["/api/v1/query/reference"]["get"]["responses"]["200"]["content"]["application/json"];
2338
2413
  /**
2339
2414
  * The body a query request sends.
2340
2415
  *
@@ -2343,8 +2418,9 @@ type QuerySchemaResult = paths["/api/v1/query/schema"]["get"]["responses"]["200"
2343
2418
  */
2344
2419
  type QueryRunParams = NonNullable<paths["/api/v1/query"]["post"]["requestBody"]>["content"]["application/json"];
2345
2420
  /**
2346
- * Typed client for the LangWatchQL query doors (`POST /api/v1/query` and
2347
- * `GET /api/v1/query/schema`) — the same governed query surface the workbench
2421
+ * Typed client for the query doors (`POST /api/v1/query`,
2422
+ * `GET /api/v1/query/schema` and `GET /api/v1/query/reference`) — the same
2423
+ * governed query surface the workbench
2348
2424
  * and saved charts run through, exposed directly rather than only via a saved
2349
2425
  * chart's statement.
2350
2426
  *
@@ -2368,18 +2444,25 @@ declare class QueryApiService {
2368
2444
  constructor(config?: Pick<InternalConfig, "langwatchApiClient">);
2369
2445
  private handleApiError;
2370
2446
  /**
2371
- * Runs one read-only LangWatchQL `SELECT` over the analytics datasets and
2447
+ * Runs one read-only LangWatchQL `SELECT` over the analytics views and
2372
2448
  * returns typed columns, rows, execution statistics, truncation state and
2373
2449
  * diagnostics, scoped to the caller's project.
2374
2450
  */
2375
2451
  query(params: QueryRunParams): Promise<QueryRunResult>;
2376
2452
  /**
2377
- * Lists the LangWatchQL analytics datasets this key may query, with each
2453
+ * Lists the LangWatchQL analytics views this key may query, with each
2378
2454
  * column's type, description, the permissions that unlock it, and whether
2379
2455
  * this caller holds them — plus each dataset's grain, join keys,
2380
2456
  * partition-pruning time column, freshness and a runnable example query.
2381
2457
  */
2382
2458
  schema(): Promise<QuerySchemaResult>;
2459
+ /**
2460
+ * Describes both query languages in one payload: the LangWatchQL schema,
2461
+ * limits and endpoints, the trace filter's syntax and fields, worked examples
2462
+ * validated in both, and which language answers which kind of
2463
+ * question.
2464
+ */
2465
+ reference(): Promise<QueryReferenceResult>;
2383
2466
  }
2384
2467
 
2385
2468
  type TriggerResponse = NonNullable<paths["/api/triggers"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
@@ -2668,6 +2751,13 @@ interface CreateVirtualKeyInput {
2668
2751
  * `{}` clears it.
2669
2752
  */
2670
2753
  metadata?: Record<string, string>;
2754
+ /**
2755
+ * Withhold the secret from the response and get a one-time reveal id
2756
+ * instead. The secret is parked for 24 hours and served once, to the
2757
+ * person the key is for, through the LangWatch app; the caller never
2758
+ * holds it.
2759
+ */
2760
+ reveal_once?: boolean;
2671
2761
  }
2672
2762
  interface UpdateVirtualKeyInput {
2673
2763
  name?: string;
@@ -2702,6 +2792,13 @@ interface VirtualKeyWithSecret {
2702
2792
  virtual_key: VirtualKey;
2703
2793
  secret: string;
2704
2794
  }
2795
+ /** What a create with `reveal_once` answers: the id that reads the secret once. */
2796
+ interface VirtualKeyWithReveal {
2797
+ virtual_key: VirtualKey;
2798
+ reveal_id: string;
2799
+ /** The display prefix, safe to show in place of the secret. */
2800
+ preview: string;
2801
+ }
2705
2802
  /** One page of the virtual-key listing, exactly as the wire serves it. */
2706
2803
  interface VirtualKeyPage {
2707
2804
  data: VirtualKey[];
@@ -2799,8 +2896,12 @@ declare class VirtualKeysApiService {
2799
2896
  /**
2800
2897
  * Mint a key. The response carries the secret ONCE; nothing ever serves it
2801
2898
  * again, so a create that times out is recovered with `idempotencyKey`
2802
- * rather than by listing.
2899
+ * rather than by listing. With `reveal_once` the response carries a reveal
2900
+ * id in place of the secret.
2803
2901
  */
2902
+ create(input: CreateVirtualKeyInput & {
2903
+ reveal_once: true;
2904
+ }, options?: IdempotentCreateOptions): Promise<VirtualKeyWithReveal>;
2804
2905
  create(input: CreateVirtualKeyInput, options?: IdempotentCreateOptions): Promise<VirtualKeyWithSecret>;
2805
2906
  update(id: string, input: UpdateVirtualKeyInput, options?: MutationOptions): Promise<VirtualKey>;
2806
2907
  rotate(id: string, options?: MutationOptions): Promise<VirtualKeyWithSecret>;
@@ -3822,6 +3923,12 @@ declare class ProjectsApiService {
3822
3923
  limit?: number;
3823
3924
  }): Promise<PaginatedProjects>;
3824
3925
  get(id: string): Promise<Project>;
3926
+ /**
3927
+ * The project's ingest key. The platform hands it out only to a credential
3928
+ * with `project:update` on the project, so a 403 here is the answer "this
3929
+ * login may not", not a transport failure.
3930
+ */
3931
+ getApiKey(id: string): Promise<string>;
3825
3932
  create(input: CreateProjectInput): Promise<ProjectWithServiceKey>;
3826
3933
  update(id: string, input: UpdateProjectInput): Promise<Project>;
3827
3934
  archive(id: string): Promise<ArchivedProject>;
@@ -3891,6 +3998,8 @@ declare class LangWatch {
3891
3998
  */
3892
3999
  readonly suites: SuitesApiService;
3893
4000
  readonly runPlans: RunPlansApiService;
4001
+ /** Judge one LangWatchQL statement across the project's history as a job. */
4002
+ readonly instantEvals: InstantEvalsApiService;
3894
4003
  readonly testSuites: TestSuitesApiService;
3895
4004
  readonly workflows: WorkflowsApiService;
3896
4005
  readonly agents: AgentsApiService;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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-BYM7X0I8.js';
2
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-Dlxw5hlM.js';
3
3
  import { z } from 'zod';
4
- 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-BJwkO7NN.js';
4
+ 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-CzElA_6o.js';
5
5
  import openApiCreateClient from 'openapi-fetch';
6
6
  export { l as attributes } from './types-VOZv9LYO.js';
7
7
  import { CliHandledErrorReason, CliHandledError } from '@langwatch/langy/cards/handled-error';
@@ -2060,6 +2060,72 @@ declare class RunPlansApiService {
2060
2060
  }>;
2061
2061
  }
2062
2062
 
2063
+ /** One Instant Eval run, exactly as the REST surface answers it. */
2064
+ type InstantEvalRun = paths["/api/v1/instant-evals/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
2065
+ /** The body that starts a run, and the same body that prices one. */
2066
+ type InstantEvalRunBody = NonNullable<paths["/api/v1/instant-evals"]["post"]["requestBody"]>["content"]["application/json"];
2067
+ /** What a run would read and what judging it would cost. */
2068
+ type InstantEvalEstimate = paths["/api/v1/instant-evals/estimate"]["post"]["responses"]["200"]["content"]["application/json"];
2069
+ /** One page of a run's judgements, and where the next one starts. */
2070
+ type InstantEvalResultsPage = paths["/api/v1/instant-evals/{id}/results"]["get"]["responses"]["200"]["content"]["application/json"];
2071
+ /** One judgement the run recorded. */
2072
+ type InstantEvalJudgment = InstantEvalResultsPage["judgments"][number];
2073
+ /** A few of a run's rows, with the judged text beside the verdict. */
2074
+ type InstantEvalSample = paths["/api/v1/instant-evals/{id}/sample"]["get"]["responses"]["200"]["content"]["application/json"];
2075
+ /**
2076
+ * Typed client for the Instant Evals family (`/api/v1/instant-evals`).
2077
+ *
2078
+ * A run judges one LangWatchQL statement across the project's history. The
2079
+ * statement is the same one the query door runs, so a working query is a
2080
+ * working run once it projects `TraceId` and at least one eval function
2081
+ * column. Starting one answers the queued run, and its progress is polled.
2082
+ *
2083
+ * The project comes from the credential, so no method takes a project id.
2084
+ *
2085
+ * @see specs/instant-evals/instant-eval-api.feature
2086
+ */
2087
+ declare class InstantEvalsApiService {
2088
+ private readonly apiClient;
2089
+ constructor(config?: Pick<InternalConfig, "langwatchApiClient">);
2090
+ private handleApiError;
2091
+ /**
2092
+ * The body of a successful answer. A failed response can arrive with no body
2093
+ * at all (a proxy answering 502 while the platform restarts), which leaves
2094
+ * `error` empty, so the response status decides and not the error alone.
2095
+ */
2096
+ private unwrap;
2097
+ /** Starts a run. The judging happens on the queue. */
2098
+ create(body: InstantEvalRunBody): Promise<InstantEvalRun>;
2099
+ /** Prices a run without starting it. Nothing is judged and nothing is charged. */
2100
+ estimate(body: InstantEvalRunBody): Promise<InstantEvalEstimate>;
2101
+ /** The project's runs, newest first. */
2102
+ list(options?: {
2103
+ limit?: number;
2104
+ before?: string;
2105
+ beforeId?: string;
2106
+ }): Promise<InstantEvalRun[]>;
2107
+ get(id: string): Promise<InstantEvalRun>;
2108
+ /** Asks a run to stop. It stops before its next page. */
2109
+ cancel(id: string): Promise<InstantEvalRun>;
2110
+ /**
2111
+ * One page of a run's judgements.
2112
+ *
2113
+ * Pass the `nextCursor` a page answers with to read the page after it. The
2114
+ * last page carries none.
2115
+ */
2116
+ results(id: string, options?: {
2117
+ questionId?: string;
2118
+ isMatched?: boolean;
2119
+ status?: InstantEvalJudgment["status"];
2120
+ limit?: number;
2121
+ cursor?: string;
2122
+ }): Promise<InstantEvalResultsPage>;
2123
+ /** A few of the run's rows, with the judged text beside the verdict. */
2124
+ sample(id: string, options?: {
2125
+ n?: number;
2126
+ }): Promise<InstantEvalSample>;
2127
+ }
2128
+
2063
2129
  /** One test suite as the list answers it: a name and the scenarios filed in it. */
2064
2130
  type TestSuite = NonNullable<paths["/api/v1/test-suites"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
2065
2131
  /** One test suite read on its own, with its scenarios named. */
@@ -2335,6 +2401,15 @@ declare class AnalyticsApiService {
2335
2401
  type QueryRunResult = paths["/api/v1/query"]["post"]["responses"]["200"]["content"]["application/json"];
2336
2402
  /** The queryable dataset/column catalog `GET /api/v1/query/schema` answers with. */
2337
2403
  type QuerySchemaResult = paths["/api/v1/query/schema"]["get"]["responses"]["200"]["content"]["application/json"];
2404
+ /**
2405
+ * Both query languages, as `GET /api/v1/query/reference` describes them.
2406
+ *
2407
+ * A superset of {@link QuerySchemaResult} in one direction only: it embeds the
2408
+ * schema and adds the trace filter language, worked examples and the decision
2409
+ * table. Nothing here is tenant data — the values a field holds come from
2410
+ * `GET /api/traces/facets`.
2411
+ */
2412
+ type QueryReferenceResult = paths["/api/v1/query/reference"]["get"]["responses"]["200"]["content"]["application/json"];
2338
2413
  /**
2339
2414
  * The body a query request sends.
2340
2415
  *
@@ -2343,8 +2418,9 @@ type QuerySchemaResult = paths["/api/v1/query/schema"]["get"]["responses"]["200"
2343
2418
  */
2344
2419
  type QueryRunParams = NonNullable<paths["/api/v1/query"]["post"]["requestBody"]>["content"]["application/json"];
2345
2420
  /**
2346
- * Typed client for the LangWatchQL query doors (`POST /api/v1/query` and
2347
- * `GET /api/v1/query/schema`) — the same governed query surface the workbench
2421
+ * Typed client for the query doors (`POST /api/v1/query`,
2422
+ * `GET /api/v1/query/schema` and `GET /api/v1/query/reference`) — the same
2423
+ * governed query surface the workbench
2348
2424
  * and saved charts run through, exposed directly rather than only via a saved
2349
2425
  * chart's statement.
2350
2426
  *
@@ -2368,18 +2444,25 @@ declare class QueryApiService {
2368
2444
  constructor(config?: Pick<InternalConfig, "langwatchApiClient">);
2369
2445
  private handleApiError;
2370
2446
  /**
2371
- * Runs one read-only LangWatchQL `SELECT` over the analytics datasets and
2447
+ * Runs one read-only LangWatchQL `SELECT` over the analytics views and
2372
2448
  * returns typed columns, rows, execution statistics, truncation state and
2373
2449
  * diagnostics, scoped to the caller's project.
2374
2450
  */
2375
2451
  query(params: QueryRunParams): Promise<QueryRunResult>;
2376
2452
  /**
2377
- * Lists the LangWatchQL analytics datasets this key may query, with each
2453
+ * Lists the LangWatchQL analytics views this key may query, with each
2378
2454
  * column's type, description, the permissions that unlock it, and whether
2379
2455
  * this caller holds them — plus each dataset's grain, join keys,
2380
2456
  * partition-pruning time column, freshness and a runnable example query.
2381
2457
  */
2382
2458
  schema(): Promise<QuerySchemaResult>;
2459
+ /**
2460
+ * Describes both query languages in one payload: the LangWatchQL schema,
2461
+ * limits and endpoints, the trace filter's syntax and fields, worked examples
2462
+ * validated in both, and which language answers which kind of
2463
+ * question.
2464
+ */
2465
+ reference(): Promise<QueryReferenceResult>;
2383
2466
  }
2384
2467
 
2385
2468
  type TriggerResponse = NonNullable<paths["/api/triggers"]["get"]["responses"]["200"]["content"]["application/json"]>[number];
@@ -2668,6 +2751,13 @@ interface CreateVirtualKeyInput {
2668
2751
  * `{}` clears it.
2669
2752
  */
2670
2753
  metadata?: Record<string, string>;
2754
+ /**
2755
+ * Withhold the secret from the response and get a one-time reveal id
2756
+ * instead. The secret is parked for 24 hours and served once, to the
2757
+ * person the key is for, through the LangWatch app; the caller never
2758
+ * holds it.
2759
+ */
2760
+ reveal_once?: boolean;
2671
2761
  }
2672
2762
  interface UpdateVirtualKeyInput {
2673
2763
  name?: string;
@@ -2702,6 +2792,13 @@ interface VirtualKeyWithSecret {
2702
2792
  virtual_key: VirtualKey;
2703
2793
  secret: string;
2704
2794
  }
2795
+ /** What a create with `reveal_once` answers: the id that reads the secret once. */
2796
+ interface VirtualKeyWithReveal {
2797
+ virtual_key: VirtualKey;
2798
+ reveal_id: string;
2799
+ /** The display prefix, safe to show in place of the secret. */
2800
+ preview: string;
2801
+ }
2705
2802
  /** One page of the virtual-key listing, exactly as the wire serves it. */
2706
2803
  interface VirtualKeyPage {
2707
2804
  data: VirtualKey[];
@@ -2799,8 +2896,12 @@ declare class VirtualKeysApiService {
2799
2896
  /**
2800
2897
  * Mint a key. The response carries the secret ONCE; nothing ever serves it
2801
2898
  * again, so a create that times out is recovered with `idempotencyKey`
2802
- * rather than by listing.
2899
+ * rather than by listing. With `reveal_once` the response carries a reveal
2900
+ * id in place of the secret.
2803
2901
  */
2902
+ create(input: CreateVirtualKeyInput & {
2903
+ reveal_once: true;
2904
+ }, options?: IdempotentCreateOptions): Promise<VirtualKeyWithReveal>;
2804
2905
  create(input: CreateVirtualKeyInput, options?: IdempotentCreateOptions): Promise<VirtualKeyWithSecret>;
2805
2906
  update(id: string, input: UpdateVirtualKeyInput, options?: MutationOptions): Promise<VirtualKey>;
2806
2907
  rotate(id: string, options?: MutationOptions): Promise<VirtualKeyWithSecret>;
@@ -3822,6 +3923,12 @@ declare class ProjectsApiService {
3822
3923
  limit?: number;
3823
3924
  }): Promise<PaginatedProjects>;
3824
3925
  get(id: string): Promise<Project>;
3926
+ /**
3927
+ * The project's ingest key. The platform hands it out only to a credential
3928
+ * with `project:update` on the project, so a 403 here is the answer "this
3929
+ * login may not", not a transport failure.
3930
+ */
3931
+ getApiKey(id: string): Promise<string>;
3825
3932
  create(input: CreateProjectInput): Promise<ProjectWithServiceKey>;
3826
3933
  update(id: string, input: UpdateProjectInput): Promise<Project>;
3827
3934
  archive(id: string): Promise<ArchivedProject>;
@@ -3891,6 +3998,8 @@ declare class LangWatch {
3891
3998
  */
3892
3999
  readonly suites: SuitesApiService;
3893
4000
  readonly runPlans: RunPlansApiService;
4001
+ /** Judge one LangWatchQL statement across the project's history as a job. */
4002
+ readonly instantEvals: InstantEvalsApiService;
3894
4003
  readonly testSuites: TestSuitesApiService;
3895
4004
  readonly workflows: WorkflowsApiService;
3896
4005
  readonly agents: AgentsApiService;