opik 2.0.62 → 2.0.64

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.
package/dist/index.d.cts CHANGED
@@ -371,6 +371,36 @@ interface GetLatestBlueprintRequest {
371
371
  maskId?: string;
372
372
  }
373
373
 
374
+ /**
375
+ * @example
376
+ * {
377
+ * body: {
378
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
379
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
380
+ * }
381
+ * }
382
+ */
383
+ interface GetSpendLaneBreakdownRequest {
384
+ body: SpendMetricRequest;
385
+ }
386
+
387
+ /**
388
+ * @example
389
+ * {
390
+ * body: {
391
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
392
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
393
+ * }
394
+ * }
395
+ */
396
+ interface GetSpendUsersRequest {
397
+ page?: number;
398
+ size?: number;
399
+ sorting?: string;
400
+ name?: string;
401
+ body: SpendMetricRequest;
402
+ }
403
+
374
404
  /**
375
405
  * @example
376
406
  * {}
@@ -455,6 +485,7 @@ interface AnnotationQueueUpdate {
455
485
  commentsEnabled?: boolean;
456
486
  feedbackDefinitionNames?: string[];
457
487
  annotatorsPerItem?: number;
488
+ lockTimeoutSeconds?: number;
458
489
  }
459
490
 
460
491
  /**
@@ -475,6 +506,18 @@ interface FindAnnotationQueuesRequest {
475
506
  */
476
507
  type GetAnnotationQueueByIdRequest = {};
477
508
 
509
+ /**
510
+ * @example
511
+ * {}
512
+ */
513
+ type GetAnnotationQueueLocksRequest = {};
514
+
515
+ /**
516
+ * @example
517
+ * {}
518
+ */
519
+ type LockAnnotationQueueItemRequest = {};
520
+
478
521
  /**
479
522
  * @example
480
523
  * {
@@ -1254,6 +1297,8 @@ interface ExperimentItemBulkUploadExperimentItemBulkWriteView {
1254
1297
  datasetName: string;
1255
1298
  /** Optional experiment ID. If provided, items will be added to the existing experiment and experimentName will be ignored. If not provided or experiment with that ID doesn't exist, a new experiment will be created with the given experimentName */
1256
1299
  experimentId?: string;
1300
+ /** Project for traces auto-created from items that provide evaluate_task_result (i.e. without an explicit trace). If null, the default project is used; relying on this fallback is deprecated, please provide project_name explicitly. */
1301
+ projectName?: string;
1257
1302
  items: ExperimentItemBulkRecordExperimentItemBulkWriteView[];
1258
1303
  }
1259
1304
 
@@ -1571,6 +1616,92 @@ declare const ProviderApiKeyWriteProvider: {
1571
1616
  };
1572
1617
  type ProviderApiKeyWriteProvider = (typeof ProviderApiKeyWriteProvider)[keyof typeof ProviderApiKeyWriteProvider];
1573
1618
 
1619
+ /**
1620
+ * @example
1621
+ * {
1622
+ * clientId: "client_id",
1623
+ * redirectUri: "redirect_uri"
1624
+ * }
1625
+ */
1626
+ interface AuthorizeRequest {
1627
+ clientId: string;
1628
+ redirectUri: string;
1629
+ responseType?: string;
1630
+ codeChallenge?: string;
1631
+ codeChallengeMethod?: string;
1632
+ resource?: string;
1633
+ state?: string;
1634
+ }
1635
+
1636
+ /**
1637
+ * @example
1638
+ * {
1639
+ * clientName: "client_name",
1640
+ * redirectUris: ["redirect_uris"]
1641
+ * }
1642
+ */
1643
+ interface ClientRegistrationRequest {
1644
+ clientName: string;
1645
+ redirectUris: string[];
1646
+ logoUri?: string;
1647
+ }
1648
+
1649
+ /**
1650
+ * @example
1651
+ * {
1652
+ * clientId: "client_id",
1653
+ * redirectUri: "redirect_uri",
1654
+ * codeChallenge: "code_challenge",
1655
+ * codeChallengeMethod: "code_challenge_method",
1656
+ * resource: "resource"
1657
+ * }
1658
+ */
1659
+ interface ConsentRequest {
1660
+ clientId: string;
1661
+ redirectUri: string;
1662
+ codeChallenge: string;
1663
+ codeChallengeMethod: string;
1664
+ resource: string;
1665
+ state?: string;
1666
+ workspaceId?: string;
1667
+ workspaceName?: string;
1668
+ csrf?: string;
1669
+ }
1670
+
1671
+ /**
1672
+ * @example
1673
+ * {
1674
+ * clientId: "client_id",
1675
+ * redirectUri: "redirect_uri"
1676
+ * }
1677
+ */
1678
+ interface GetAuthorizeContextRequest {
1679
+ clientId: string;
1680
+ redirectUri: string;
1681
+ }
1682
+
1683
+ /**
1684
+ * @example
1685
+ * {}
1686
+ */
1687
+ interface RevokeRequest {
1688
+ token?: string;
1689
+ clientId?: string;
1690
+ }
1691
+
1692
+ /**
1693
+ * @example
1694
+ * {}
1695
+ */
1696
+ interface TokenRequest {
1697
+ grantType?: string;
1698
+ code?: string;
1699
+ redirectUri?: string;
1700
+ clientId?: string;
1701
+ codeVerifier?: string;
1702
+ refreshToken?: string;
1703
+ }
1704
+
1574
1705
  /**
1575
1706
  * @example
1576
1707
  * {}
@@ -2171,6 +2302,57 @@ interface ProjectsRedirectRequest {
2171
2302
  path: string;
2172
2303
  }
2173
2304
 
2305
+ /**
2306
+ * @example
2307
+ * {}
2308
+ */
2309
+ type GenerateReportRequest = {};
2310
+
2311
+ /**
2312
+ * @example
2313
+ * {}
2314
+ */
2315
+ type GetReportPreferenceRequest = {};
2316
+
2317
+ /**
2318
+ * @example
2319
+ * {}
2320
+ */
2321
+ interface GetReportsRequest {
2322
+ page?: number;
2323
+ size?: number;
2324
+ }
2325
+
2326
+ /**
2327
+ * @example
2328
+ * {
2329
+ * status: "pending"
2330
+ * }
2331
+ */
2332
+ interface ReportCompleteRequest {
2333
+ content?: string;
2334
+ status: ReportCompleteRequestStatus;
2335
+ sessionId?: string;
2336
+ recommendedActions?: JsonNode;
2337
+ }
2338
+
2339
+ /**
2340
+ * @example
2341
+ * {
2342
+ * body: {}
2343
+ * }
2344
+ */
2345
+ interface UpdateReportPreferenceRequest {
2346
+ body: ReportPreference;
2347
+ }
2348
+
2349
+ declare const ReportCompleteRequestStatus: {
2350
+ readonly Pending: "pending";
2351
+ readonly Completed: "completed";
2352
+ readonly Failed: "failed";
2353
+ };
2354
+ type ReportCompleteRequestStatus = (typeof ReportCompleteRequestStatus)[keyof typeof ReportCompleteRequestStatus];
2355
+
2174
2356
  /**
2175
2357
  * @example
2176
2358
  * {}
@@ -3360,6 +3542,7 @@ interface AnnotationQueuePublic {
3360
3542
  commentsEnabled?: boolean;
3361
3543
  feedbackDefinitionNames?: string[];
3362
3544
  annotatorsPerItem?: number;
3545
+ lockTimeoutSeconds?: number;
3363
3546
  reviewers?: AnnotationQueueReviewerPublic[];
3364
3547
  feedbackScores?: FeedbackScoreAveragePublic[];
3365
3548
  itemsCount?: number;
@@ -3393,6 +3576,7 @@ interface AnnotationQueueWrite {
3393
3576
  commentsEnabled?: boolean;
3394
3577
  feedbackDefinitionNames?: string[];
3395
3578
  annotatorsPerItem?: number;
3579
+ lockTimeoutSeconds?: number;
3396
3580
  }
3397
3581
 
3398
3582
  declare const AnnotationQueueWriteScope: {
@@ -3493,6 +3677,25 @@ interface AudioUrlWrite {
3493
3677
 
3494
3678
  type AuthDetailsHolder = Record<string, unknown>;
3495
3679
 
3680
+ interface AuthorizationServerMetadata {
3681
+ issuer?: string;
3682
+ authorizationEndpoint?: string;
3683
+ tokenEndpoint?: string;
3684
+ revocationEndpoint?: string;
3685
+ registrationEndpoint?: string;
3686
+ responseTypesSupported?: string[];
3687
+ grantTypesSupported?: string[];
3688
+ codeChallengeMethodsSupported?: string[];
3689
+ tokenEndpointAuthMethodsSupported?: string[];
3690
+ }
3691
+
3692
+ interface AuthorizeContext {
3693
+ clientName?: string;
3694
+ clientLogoUri?: string;
3695
+ workspaces?: WorkspaceInfo[];
3696
+ csrfToken?: string;
3697
+ }
3698
+
3496
3699
  interface AutomationRuleEvaluatorLlmAsJudgePublic {
3497
3700
  filters?: TraceFilterPublic[];
3498
3701
  code?: LlmAsJudgeCodePublic;
@@ -3974,6 +4177,17 @@ declare const CheckResult: {
3974
4177
  };
3975
4178
  type CheckResult = (typeof CheckResult)[keyof typeof CheckResult];
3976
4179
 
4180
+ interface ClientRegistrationResponse {
4181
+ clientId?: string;
4182
+ clientIdIssuedAt?: number;
4183
+ clientName?: string;
4184
+ logoUri?: string;
4185
+ redirectUris?: string[];
4186
+ tokenEndpointAuthMethod?: string;
4187
+ grantTypes?: string[];
4188
+ responseTypes?: string[];
4189
+ }
4190
+
3977
4191
  interface Column {
3978
4192
  name?: string;
3979
4193
  types?: ColumnTypesItem[];
@@ -4078,6 +4292,10 @@ interface CompletionTokensDetails {
4078
4292
  reasoningTokens?: number;
4079
4293
  }
4080
4294
 
4295
+ interface ConsentResponse {
4296
+ redirectTo?: string;
4297
+ }
4298
+
4081
4299
  interface CountValueStatPublic {
4082
4300
  value?: number;
4083
4301
  }
@@ -5238,6 +5456,13 @@ interface FunctionCall {
5238
5456
  arguments?: string;
5239
5457
  }
5240
5458
 
5459
+ /**
5460
+ * Response for report generation trigger
5461
+ */
5462
+ interface GenerateReportResponse {
5463
+ reportId?: string;
5464
+ }
5465
+
5241
5466
  interface GroupContent {
5242
5467
  label?: string;
5243
5468
  }
@@ -5289,6 +5514,11 @@ declare const GuardrailWriteResult: {
5289
5514
  };
5290
5515
  type GuardrailWriteResult = (typeof GuardrailWriteResult)[keyof typeof GuardrailWriteResult];
5291
5516
 
5517
+ interface HarnessEntry {
5518
+ key?: string;
5519
+ label?: string;
5520
+ }
5521
+
5292
5522
  interface ImageUrl {
5293
5523
  url: string;
5294
5524
  detail?: string;
@@ -5304,6 +5534,28 @@ interface ImageUrlWrite {
5304
5534
  detail?: string;
5305
5535
  }
5306
5536
 
5537
+ interface Item {
5538
+ id?: string;
5539
+ title?: string;
5540
+ body?: string;
5541
+ impact?: ItemImpact;
5542
+ estimatedSavingsTokens?: number;
5543
+ docsUrl?: string;
5544
+ relatedLaneKey?: string;
5545
+ }
5546
+
5547
+ declare const ItemImpact: {
5548
+ readonly High: "high";
5549
+ readonly Medium: "medium";
5550
+ readonly Low: "low";
5551
+ };
5552
+ type ItemImpact = (typeof ItemImpact)[keyof typeof ItemImpact];
5553
+
5554
+ interface ItemLockInfo {
5555
+ activeLocks?: number;
5556
+ lockedBy?: string[];
5557
+ }
5558
+
5307
5559
  type JsonListString = Record<string, unknown> | Record<string, unknown>[] | string;
5308
5560
 
5309
5561
  type JsonListStringCompare = Record<string, unknown> | Record<string, unknown>[] | string;
@@ -5350,6 +5602,14 @@ declare const KpiMetricType: {
5350
5602
  };
5351
5603
  type KpiMetricType = (typeof KpiMetricType)[keyof typeof KpiMetricType];
5352
5604
 
5605
+ interface Lane {
5606
+ key?: string;
5607
+ label?: string;
5608
+ totalTokens?: number;
5609
+ byModel?: ModelTiers[];
5610
+ hasBreakdown?: boolean;
5611
+ }
5612
+
5353
5613
  interface LlmAsJudgeCode {
5354
5614
  model: LlmAsJudgeModelParameters;
5355
5615
  messages: LlmAsJudgeMessage[];
@@ -5592,6 +5852,17 @@ declare const LocalRunnerType: {
5592
5852
  };
5593
5853
  type LocalRunnerType = (typeof LocalRunnerType)[keyof typeof LocalRunnerType];
5594
5854
 
5855
+ interface LockResponse {
5856
+ acquired?: boolean;
5857
+ itemId?: string;
5858
+ lockedBy?: string;
5859
+ expiresAt?: Date;
5860
+ }
5861
+
5862
+ interface LocksResponse {
5863
+ locks?: Record<string, ItemLockInfo>;
5864
+ }
5865
+
5595
5866
  interface LogItem {
5596
5867
  timestamp?: Date;
5597
5868
  ruleId?: string;
@@ -5657,6 +5928,14 @@ interface Message {
5657
5928
  content: JsonNode;
5658
5929
  }
5659
5930
 
5931
+ interface ModelTiers {
5932
+ model?: string;
5933
+ inputTokens?: number;
5934
+ cacheReadTokens?: number;
5935
+ cacheCreationTokens?: number;
5936
+ outputTokens?: number;
5937
+ }
5938
+
5660
5939
  interface MultipartUploadPart {
5661
5940
  eTag: string;
5662
5941
  partNumber: number;
@@ -5729,6 +6008,31 @@ interface OllamaModel {
5729
6008
  modifiedAt?: Date;
5730
6009
  }
5731
6010
 
6011
+ interface OllieReport {
6012
+ id?: string;
6013
+ projectId?: string;
6014
+ sessionId?: string;
6015
+ content?: string;
6016
+ recommendedActions?: JsonNode;
6017
+ status?: OllieReportStatus;
6018
+ createdAt?: Date;
6019
+ lastUpdatedAt?: Date;
6020
+ }
6021
+
6022
+ interface OllieReportPage {
6023
+ page?: number;
6024
+ size?: number;
6025
+ total?: number;
6026
+ content?: OllieReport[];
6027
+ }
6028
+
6029
+ declare const OllieReportStatus: {
6030
+ readonly Pending: "pending";
6031
+ readonly Completed: "completed";
6032
+ readonly Failed: "failed";
6033
+ };
6034
+ type OllieReportStatus = (typeof OllieReportStatus)[keyof typeof OllieReportStatus];
6035
+
5732
6036
  interface OptimizationPagePublic {
5733
6037
  page?: number;
5734
6038
  size?: number;
@@ -6248,12 +6552,13 @@ interface RecentActivityItemPublic {
6248
6552
  }
6249
6553
 
6250
6554
  declare const RecentActivityItemPublicType: {
6555
+ readonly TraceDaily: "trace_daily";
6251
6556
  readonly Experiment: "experiment";
6252
6557
  readonly DatasetVersion: "dataset_version";
6253
6558
  readonly TestSuiteVersion: "test_suite_version";
6254
6559
  readonly AlertEvent: "alert_event";
6255
6560
  readonly Optimization: "optimization";
6256
- readonly AgentConfigVersion: "agent_config_version";
6561
+ readonly PromptVersion: "prompt_version";
6257
6562
  };
6258
6563
  type RecentActivityItemPublicType = (typeof RecentActivityItemPublicType)[keyof typeof RecentActivityItemPublicType];
6259
6564
 
@@ -6264,6 +6569,15 @@ interface RecentActivityPagePublic {
6264
6569
  content?: RecentActivityItemPublic[];
6265
6570
  }
6266
6571
 
6572
+ interface ReportPreference {
6573
+ projectId?: string;
6574
+ enabled?: boolean;
6575
+ scheduleTime?: string;
6576
+ customPrompt?: string;
6577
+ createdAt?: Date;
6578
+ lastUpdatedAt?: Date;
6579
+ }
6580
+
6267
6581
  interface ResponseFormat {
6268
6582
  type?: ResponseFormatType;
6269
6583
  jsonSchema?: JsonSchema;
@@ -6362,7 +6676,9 @@ interface ServiceTogglesConfig {
6362
6676
  customllmProviderEnabled: boolean;
6363
6677
  ollamaProviderEnabled: boolean;
6364
6678
  ollieEnabled: boolean;
6679
+ projectHomepageEnabled: boolean;
6365
6680
  agenticToolsEnabled: boolean;
6681
+ agentInsightsEnabled: boolean;
6366
6682
  v2WorkspaceAllowlistIds: string[];
6367
6683
  v1WorkspaceAllowlistIds: string[];
6368
6684
  forceWorkspaceVersion: string;
@@ -6371,6 +6687,11 @@ interface ServiceTogglesConfig {
6371
6687
  v1WorkspaceAllowlist?: string;
6372
6688
  }
6373
6689
 
6690
+ interface Side {
6691
+ totalTokens?: number;
6692
+ lanes?: Lane[];
6693
+ }
6694
+
6374
6695
  interface Span$1 {
6375
6696
  id?: string;
6376
6697
  /** If null, the default project is used */
@@ -6735,6 +7056,66 @@ declare const SpanWriteType: {
6735
7056
  };
6736
7057
  type SpanWriteType = (typeof SpanWriteType)[keyof typeof SpanWriteType];
6737
7058
 
7059
+ interface SpendBreakdownResponse {
7060
+ laneKey?: string;
7061
+ title?: string;
7062
+ subtitle?: string;
7063
+ totalTokens?: number;
7064
+ byModel?: ModelTiers[];
7065
+ itemCount?: number;
7066
+ itemUnit?: string;
7067
+ items?: Item[];
7068
+ }
7069
+
7070
+ interface SpendCompositionResponse {
7071
+ input?: Side;
7072
+ harness?: HarnessEntry[];
7073
+ output?: Side;
7074
+ }
7075
+
7076
+ interface SpendMetricRequest {
7077
+ projectId?: string;
7078
+ projectName?: string;
7079
+ intervalStart: Date;
7080
+ intervalEnd: Date;
7081
+ userId?: string;
7082
+ startBeforeEnd?: boolean;
7083
+ projectProvided?: boolean;
7084
+ }
7085
+
7086
+ interface SpendRecommendationsResponse {
7087
+ totalSavingsTokens?: number;
7088
+ items?: Item[];
7089
+ }
7090
+
7091
+ interface SpendSummaryResponse {
7092
+ results?: Result[];
7093
+ spendCurrent?: ModelTiers[];
7094
+ spendPrevious?: ModelTiers[];
7095
+ }
7096
+
7097
+ interface SpendUserPage {
7098
+ page?: number;
7099
+ size?: number;
7100
+ total?: number;
7101
+ content?: SpendUserRow[];
7102
+ sortableBy?: string[];
7103
+ }
7104
+
7105
+ interface SpendUserRow {
7106
+ userUuid?: string;
7107
+ userEmail?: string;
7108
+ userDisplayName?: string;
7109
+ byModel?: ModelTiers[];
7110
+ totalTokens?: number;
7111
+ requests?: number;
7112
+ skills?: number;
7113
+ mcps?: number;
7114
+ mcpCalls?: number;
7115
+ repositories?: string[];
7116
+ flags?: string[];
7117
+ }
7118
+
6738
7119
  interface StartMultipartUploadResponse {
6739
7120
  uploadId: string;
6740
7121
  preSignUrls: string[];
@@ -6800,6 +7181,15 @@ interface StudioPromptWrite {
6800
7181
  messages: StudioMessageWrite[];
6801
7182
  }
6802
7183
 
7184
+ interface TokenResponse {
7185
+ accessToken?: string;
7186
+ refreshToken?: string;
7187
+ tokenType?: string;
7188
+ expiresIn?: number;
7189
+ workspaceId?: string;
7190
+ workspaceName?: string;
7191
+ }
7192
+
6803
7193
  interface TokenUsageNames {
6804
7194
  names?: string[];
6805
7195
  }
@@ -7430,6 +7820,11 @@ interface WorkspaceConfiguration {
7430
7820
  colorMap?: Record<string, string>;
7431
7821
  }
7432
7822
 
7823
+ interface WorkspaceInfo {
7824
+ id?: string;
7825
+ name?: string;
7826
+ }
7827
+
7433
7828
  interface WorkspaceMetricResponse {
7434
7829
  results?: Result[];
7435
7830
  }
@@ -7768,6 +8163,104 @@ declare class AgentConfigsClient {
7768
8163
  private __removeConfigKeys;
7769
8164
  }
7770
8165
 
8166
+ declare namespace AiSpendClient {
8167
+ type Options = BaseClientOptions;
8168
+ interface RequestOptions extends BaseRequestOptions {
8169
+ }
8170
+ }
8171
+ /**
8172
+ * Coding-agent spend analytics
8173
+ */
8174
+ declare class AiSpendClient {
8175
+ protected readonly _options: NormalizedClientOptions<AiSpendClient.Options>;
8176
+ constructor(options?: AiSpendClient.Options);
8177
+ /**
8178
+ * Get coding-agent token-flow composition (Sankey)
8179
+ *
8180
+ * @param {OpikApi.SpendMetricRequest} request
8181
+ * @param {AiSpendClient.RequestOptions} requestOptions - Request-specific configuration.
8182
+ *
8183
+ * @throws {@link OpikApi.BadRequestError}
8184
+ *
8185
+ * @example
8186
+ * await client.aiSpend.getSpendComposition({
8187
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
8188
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
8189
+ * })
8190
+ */
8191
+ getSpendComposition(request: SpendMetricRequest, requestOptions?: AiSpendClient.RequestOptions): HttpResponsePromise<SpendCompositionResponse>;
8192
+ private __getSpendComposition;
8193
+ /**
8194
+ * Get the per-item breakdown for a composition lane
8195
+ *
8196
+ * @param {string} laneKey
8197
+ * @param {OpikApi.GetSpendLaneBreakdownRequest} request
8198
+ * @param {AiSpendClient.RequestOptions} requestOptions - Request-specific configuration.
8199
+ *
8200
+ * @throws {@link OpikApi.BadRequestError}
8201
+ *
8202
+ * @example
8203
+ * await client.aiSpend.getSpendLaneBreakdown("laneKey", {
8204
+ * body: {
8205
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
8206
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
8207
+ * }
8208
+ * })
8209
+ */
8210
+ getSpendLaneBreakdown(laneKey: string, request: GetSpendLaneBreakdownRequest, requestOptions?: AiSpendClient.RequestOptions): HttpResponsePromise<SpendBreakdownResponse>;
8211
+ private __getSpendLaneBreakdown;
8212
+ /**
8213
+ * Get coding-agent cost-saving recommendations
8214
+ *
8215
+ * @param {OpikApi.SpendMetricRequest} request
8216
+ * @param {AiSpendClient.RequestOptions} requestOptions - Request-specific configuration.
8217
+ *
8218
+ * @throws {@link OpikApi.BadRequestError}
8219
+ *
8220
+ * @example
8221
+ * await client.aiSpend.getSpendRecommendations({
8222
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
8223
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
8224
+ * })
8225
+ */
8226
+ getSpendRecommendations(request: SpendMetricRequest, requestOptions?: AiSpendClient.RequestOptions): HttpResponsePromise<SpendRecommendationsResponse>;
8227
+ private __getSpendRecommendations;
8228
+ /**
8229
+ * Get coding-agent spend KPI summary
8230
+ *
8231
+ * @param {OpikApi.SpendMetricRequest} request
8232
+ * @param {AiSpendClient.RequestOptions} requestOptions - Request-specific configuration.
8233
+ *
8234
+ * @throws {@link OpikApi.BadRequestError}
8235
+ *
8236
+ * @example
8237
+ * await client.aiSpend.getSpendSummary({
8238
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
8239
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
8240
+ * })
8241
+ */
8242
+ getSpendSummary(request: SpendMetricRequest, requestOptions?: AiSpendClient.RequestOptions): HttpResponsePromise<SpendSummaryResponse>;
8243
+ private __getSpendSummary;
8244
+ /**
8245
+ * Get coding-agent spend per user
8246
+ *
8247
+ * @param {OpikApi.GetSpendUsersRequest} request
8248
+ * @param {AiSpendClient.RequestOptions} requestOptions - Request-specific configuration.
8249
+ *
8250
+ * @throws {@link OpikApi.BadRequestError}
8251
+ *
8252
+ * @example
8253
+ * await client.aiSpend.getSpendUsers({
8254
+ * body: {
8255
+ * intervalStart: new Date("2024-01-15T09:30:00.000Z"),
8256
+ * intervalEnd: new Date("2024-01-15T09:30:00.000Z")
8257
+ * }
8258
+ * })
8259
+ */
8260
+ getSpendUsers(request: GetSpendUsersRequest, requestOptions?: AiSpendClient.RequestOptions): HttpResponsePromise<SpendUserPage>;
8261
+ private __getSpendUsers;
8262
+ }
8263
+
7771
8264
  declare namespace AlertsClient {
7772
8265
  type Options = BaseClientOptions;
7773
8266
  interface RequestOptions extends BaseRequestOptions {
@@ -8012,6 +8505,31 @@ declare class AnnotationQueuesClient {
8012
8505
  */
8013
8506
  updateAnnotationQueue(id: string, request?: AnnotationQueueUpdate, requestOptions?: AnnotationQueuesClient.RequestOptions): HttpResponsePromise<void>;
8014
8507
  private __updateAnnotationQueue;
8508
+ /**
8509
+ * Returns lock status for all actively locked items in the queue
8510
+ *
8511
+ * @param {string} queueId
8512
+ * @param {OpikApi.GetAnnotationQueueLocksRequest} request
8513
+ * @param {AnnotationQueuesClient.RequestOptions} requestOptions - Request-specific configuration.
8514
+ *
8515
+ * @example
8516
+ * await client.annotationQueues.getAnnotationQueueLocks("queueId")
8517
+ */
8518
+ getAnnotationQueueLocks(queueId: string, request?: GetAnnotationQueueLocksRequest, requestOptions?: AnnotationQueuesClient.RequestOptions): HttpResponsePromise<LocksResponse>;
8519
+ private __getAnnotationQueueLocks;
8520
+ /**
8521
+ * Claim an annotation queue item for the current user, or extend an existing lock
8522
+ *
8523
+ * @param {string} queueId
8524
+ * @param {string} itemId
8525
+ * @param {OpikApi.LockAnnotationQueueItemRequest} request
8526
+ * @param {AnnotationQueuesClient.RequestOptions} requestOptions - Request-specific configuration.
8527
+ *
8528
+ * @example
8529
+ * await client.annotationQueues.lockAnnotationQueueItem("queueId", "itemId")
8530
+ */
8531
+ lockAnnotationQueueItem(queueId: string, itemId: string, request?: LockAnnotationQueueItemRequest, requestOptions?: AnnotationQueuesClient.RequestOptions): HttpResponsePromise<LockResponse>;
8532
+ private __lockAnnotationQueueItem;
8015
8533
  /**
8016
8534
  * Remove items from annotation queue
8017
8535
  *
@@ -9731,6 +10249,114 @@ declare class ManualEvaluationClient {
9731
10249
  private __evaluateTraces;
9732
10250
  }
9733
10251
 
10252
+ declare namespace McpOAuthClient {
10253
+ type Options = BaseClientOptions;
10254
+ interface RequestOptions extends BaseRequestOptions {
10255
+ }
10256
+ }
10257
+ /**
10258
+ * MCP OAuth 2.1 Authorization Server resources
10259
+ */
10260
+ declare class McpOAuthClient {
10261
+ protected readonly _options: NormalizedClientOptions<McpOAuthClient.Options>;
10262
+ constructor(options?: McpOAuthClient.Options);
10263
+ /**
10264
+ * OAuth 2.1 authorization endpoint (RFC 6749 §3.1). Validates the client and PKCE parameters, then redirects to the login or consent page
10265
+ *
10266
+ * @param {OpikApi.AuthorizeRequest} request
10267
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10268
+ *
10269
+ * @example
10270
+ * await client.mcpOAuth.authorize({
10271
+ * clientId: "client_id",
10272
+ * redirectUri: "redirect_uri"
10273
+ * })
10274
+ */
10275
+ authorize(request: AuthorizeRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<void>;
10276
+ private __authorize;
10277
+ /**
10278
+ * Submit the user's consent, issue an authorization code, and return the client redirect target
10279
+ *
10280
+ * @param {OpikApi.ConsentRequest} request
10281
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10282
+ *
10283
+ * @example
10284
+ * await client.mcpOAuth.consent({
10285
+ * clientId: "client_id",
10286
+ * redirectUri: "redirect_uri",
10287
+ * codeChallenge: "code_challenge",
10288
+ * codeChallengeMethod: "code_challenge_method",
10289
+ * resource: "resource"
10290
+ * })
10291
+ */
10292
+ consent(request: ConsentRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<ConsentResponse>;
10293
+ private __consent;
10294
+ /**
10295
+ * Get the client details, eligible workspaces, and a CSRF token used to render the consent screen
10296
+ *
10297
+ * @param {OpikApi.GetAuthorizeContextRequest} request
10298
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10299
+ *
10300
+ * @example
10301
+ * await client.mcpOAuth.getAuthorizeContext({
10302
+ * clientId: "client_id",
10303
+ * redirectUri: "redirect_uri"
10304
+ * })
10305
+ */
10306
+ getAuthorizeContext(request: GetAuthorizeContextRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<AuthorizeContext>;
10307
+ private __getAuthorizeContext;
10308
+ /**
10309
+ * Get OAuth 2.1 Authorization Server Metadata (RFC 8414)
10310
+ *
10311
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10312
+ *
10313
+ * @example
10314
+ * await client.mcpOAuth.getOAuthAuthorizationServerMetadata()
10315
+ */
10316
+ getOAuthAuthorizationServerMetadata(requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<AuthorizationServerMetadata>;
10317
+ private __getOAuthAuthorizationServerMetadata;
10318
+ /**
10319
+ * OAuth 2.0 Dynamic Client Registration (RFC 7591). Registers a public client for the MCP OAuth flow; throttled per source IP
10320
+ *
10321
+ * @param {OpikApi.ClientRegistrationRequest} request
10322
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10323
+ *
10324
+ * @throws {@link OpikApi.TooManyRequestsError}
10325
+ *
10326
+ * @example
10327
+ * await client.mcpOAuth.registerOAuthClient({
10328
+ * clientName: "client_name",
10329
+ * redirectUris: ["redirect_uris"]
10330
+ * })
10331
+ */
10332
+ registerOAuthClient(request: ClientRegistrationRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<ClientRegistrationResponse>;
10333
+ private __registerOAuthClient;
10334
+ /**
10335
+ * OAuth 2.0 token revocation endpoint (RFC 7009). Always returns 200, whether the token was revoked, never existed, or was invalid
10336
+ *
10337
+ * @param {OpikApi.RevokeRequest} request
10338
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10339
+ *
10340
+ * @example
10341
+ * await client.mcpOAuth.revoke()
10342
+ */
10343
+ revoke(request?: RevokeRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<void>;
10344
+ private __revoke;
10345
+ /**
10346
+ * OAuth 2.1 token endpoint (RFC 6749 §4.1.3, §6). Exchanges an authorization code with PKCE or a refresh token for an access/refresh token pair
10347
+ *
10348
+ * @param {OpikApi.TokenRequest} request
10349
+ * @param {McpOAuthClient.RequestOptions} requestOptions - Request-specific configuration.
10350
+ *
10351
+ * @throws {@link OpikApi.BadRequestError}
10352
+ *
10353
+ * @example
10354
+ * await client.mcpOAuth.token()
10355
+ */
10356
+ token(request?: TokenRequest, requestOptions?: McpOAuthClient.RequestOptions): HttpResponsePromise<TokenResponse>;
10357
+ private __token;
10358
+ }
10359
+
9734
10360
  declare namespace OllamaClient {
9735
10361
  type Options = BaseClientOptions;
9736
10362
  interface RequestOptions extends BaseRequestOptions {
@@ -10658,6 +11284,89 @@ declare class RedirectClient {
10658
11284
  private __projectsRedirect;
10659
11285
  }
10660
11286
 
11287
+ declare namespace ReportsClient {
11288
+ type Options = BaseClientOptions;
11289
+ interface RequestOptions extends BaseRequestOptions {
11290
+ }
11291
+ }
11292
+ /**
11293
+ * Ollie daily report management
11294
+ */
11295
+ declare class ReportsClient {
11296
+ protected readonly _options: NormalizedClientOptions<ReportsClient.Options>;
11297
+ constructor(options?: ReportsClient.Options);
11298
+ /**
11299
+ * Callback from Ollie to update report status and content after generation.
11300
+ *
11301
+ * @param {string} projectId
11302
+ * @param {string} reportId
11303
+ * @param {OpikApi.ReportCompleteRequest} request
11304
+ * @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
11305
+ *
11306
+ * @throws {@link OpikApi.NotFoundError}
11307
+ *
11308
+ * @example
11309
+ * await client.reports.completeReport("projectId", "reportId", {
11310
+ * status: "pending"
11311
+ * })
11312
+ */
11313
+ completeReport(projectId: string, reportId: string, request: ReportCompleteRequest, requestOptions?: ReportsClient.RequestOptions): HttpResponsePromise<void>;
11314
+ private __completeReport;
11315
+ /**
11316
+ * Creates a pending report and triggers asynchronous generation via the orchestrator.
11317
+ *
11318
+ * @param {string} projectId
11319
+ * @param {OpikApi.GenerateReportRequest} request
11320
+ * @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
11321
+ *
11322
+ * @throws {@link OpikApi.UnauthorizedError}
11323
+ * @throws {@link OpikApi.ForbiddenError}
11324
+ *
11325
+ * @example
11326
+ * await client.reports.generateReport("projectId")
11327
+ */
11328
+ generateReport(projectId: string, request?: GenerateReportRequest, requestOptions?: ReportsClient.RequestOptions): HttpResponsePromise<GenerateReportResponse>;
11329
+ private __generateReport;
11330
+ /**
11331
+ * Returns report preferences for a project, or null if none have been set.
11332
+ *
11333
+ * @param {string} projectId
11334
+ * @param {OpikApi.GetReportPreferenceRequest} request
11335
+ * @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
11336
+ *
11337
+ * @example
11338
+ * await client.reports.getReportPreference("projectId")
11339
+ */
11340
+ getReportPreference(projectId: string, request?: GetReportPreferenceRequest, requestOptions?: ReportsClient.RequestOptions): HttpResponsePromise<ReportPreference>;
11341
+ private __getReportPreference;
11342
+ /**
11343
+ * Enable or disable daily report generation for a project.
11344
+ *
11345
+ * @param {string} projectId
11346
+ * @param {OpikApi.UpdateReportPreferenceRequest} request
11347
+ * @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
11348
+ *
11349
+ * @example
11350
+ * await client.reports.updateReportPreference("projectId", {
11351
+ * body: {}
11352
+ * })
11353
+ */
11354
+ updateReportPreference(projectId: string, request: UpdateReportPreferenceRequest, requestOptions?: ReportsClient.RequestOptions): HttpResponsePromise<ReportPreference>;
11355
+ private __updateReportPreference;
11356
+ /**
11357
+ * Returns a paginated list of reports, newest first.
11358
+ *
11359
+ * @param {string} projectId
11360
+ * @param {OpikApi.GetReportsRequest} request
11361
+ * @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
11362
+ *
11363
+ * @example
11364
+ * await client.reports.getReports("projectId")
11365
+ */
11366
+ getReports(projectId: string, request?: GetReportsRequest, requestOptions?: ReportsClient.RequestOptions): HttpResponsePromise<OllieReportPage>;
11367
+ private __getReports;
11368
+ }
11369
+
10661
11370
  declare namespace RetentionRulesClient {
10662
11371
  type Options = BaseClientOptions;
10663
11372
  interface RequestOptions extends BaseRequestOptions {
@@ -12063,8 +12772,10 @@ declare namespace OpikApiClient {
12063
12772
  }
12064
12773
  declare class OpikApiClient {
12065
12774
  protected readonly _options: NormalizedClientOptions<OpikApiClient.Options>;
12775
+ protected _mcpOAuth: McpOAuthClient | undefined;
12066
12776
  protected _systemUsage: SystemUsageClient | undefined;
12067
12777
  protected _agentConfigs: AgentConfigsClient | undefined;
12778
+ protected _aiSpend: AiSpendClient | undefined;
12068
12779
  protected _alerts: AlertsClient | undefined;
12069
12780
  protected _annotationQueues: AnnotationQueuesClient | undefined;
12070
12781
  protected _assertionResults: AssertionResultsClient | undefined;
@@ -12090,6 +12801,7 @@ declare class OpikApiClient {
12090
12801
  protected _pairing: PairingClient | undefined;
12091
12802
  protected _projects: ProjectsClient | undefined;
12092
12803
  protected _prompts: PromptsClient | undefined;
12804
+ protected _reports: ReportsClient | undefined;
12093
12805
  protected _retentionRules: RetentionRulesClient | undefined;
12094
12806
  protected _serviceToggles: ServiceTogglesClient | undefined;
12095
12807
  protected _spans: SpansClient | undefined;
@@ -12099,8 +12811,10 @@ declare class OpikApiClient {
12099
12811
  protected _workspaces: WorkspacesClient | undefined;
12100
12812
  protected _redirect: RedirectClient | undefined;
12101
12813
  constructor(options?: OpikApiClient.Options);
12814
+ get mcpOAuth(): McpOAuthClient;
12102
12815
  get systemUsage(): SystemUsageClient;
12103
12816
  get agentConfigs(): AgentConfigsClient;
12817
+ get aiSpend(): AiSpendClient;
12104
12818
  get alerts(): AlertsClient;
12105
12819
  get annotationQueues(): AnnotationQueuesClient;
12106
12820
  get assertionResults(): AssertionResultsClient;
@@ -12126,6 +12840,7 @@ declare class OpikApiClient {
12126
12840
  get pairing(): PairingClient;
12127
12841
  get projects(): ProjectsClient;
12128
12842
  get prompts(): PromptsClient;
12843
+ get reports(): ReportsClient;
12129
12844
  get retentionRules(): RetentionRulesClient;
12130
12845
  get serviceToggles(): ServiceTogglesClient;
12131
12846
  get spans(): SpansClient;