opik 2.0.69 → 2.0.71

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
@@ -445,6 +445,42 @@ declare const FindAgentInsightsIssuesRequestStatus: {
445
445
  };
446
446
  type FindAgentInsightsIssuesRequestStatus = (typeof FindAgentInsightsIssuesRequestStatus)[keyof typeof FindAgentInsightsIssuesRequestStatus];
447
447
 
448
+ /**
449
+ * @example
450
+ * {
451
+ * status: "enabled"
452
+ * }
453
+ */
454
+ interface AgentInsightsJobUpdate {
455
+ /** New status for the job */
456
+ status: AgentInsightsJobUpdateStatus;
457
+ }
458
+
459
+ /**
460
+ * @example
461
+ * {}
462
+ */
463
+ type CreateAgentInsightsJobRequest = {};
464
+
465
+ /**
466
+ * @example
467
+ * {}
468
+ */
469
+ type GetAgentInsightsJobRequest = {};
470
+
471
+ /**
472
+ * @example
473
+ * {}
474
+ */
475
+ type TriggerAgentInsightsJobRequest = {};
476
+
477
+ /** New status for the job */
478
+ declare const AgentInsightsJobUpdateStatus: {
479
+ readonly Enabled: "enabled";
480
+ readonly Disabled: "disabled";
481
+ };
482
+ type AgentInsightsJobUpdateStatus = (typeof AgentInsightsJobUpdateStatus)[keyof typeof AgentInsightsJobUpdateStatus];
483
+
448
484
  /**
449
485
  * @example
450
486
  * {
@@ -3536,6 +3572,22 @@ declare const AgentInsightsIssueWithDetailsStatus: {
3536
3572
  };
3537
3573
  type AgentInsightsIssueWithDetailsStatus = (typeof AgentInsightsIssueWithDetailsStatus)[keyof typeof AgentInsightsIssueWithDetailsStatus];
3538
3574
 
3575
+ interface AgentInsightsJob {
3576
+ id?: string;
3577
+ projectId?: string;
3578
+ status?: AgentInsightsJobStatus;
3579
+ createdAt?: Date;
3580
+ createdBy?: string;
3581
+ lastUpdatedAt?: Date;
3582
+ lastUpdatedBy?: string;
3583
+ }
3584
+
3585
+ declare const AgentInsightsJobStatus: {
3586
+ readonly Enabled: "enabled";
3587
+ readonly Disabled: "disabled";
3588
+ };
3589
+ type AgentInsightsJobStatus = (typeof AgentInsightsJobStatus)[keyof typeof AgentInsightsJobStatus];
3590
+
3539
3591
  interface AggregationData {
3540
3592
  experimentCount?: number;
3541
3593
  traceCount?: number;
@@ -8442,6 +8494,78 @@ declare class AgentInsightsClient {
8442
8494
  private __updateAgentInsightsIssue;
8443
8495
  }
8444
8496
 
8497
+ declare namespace AgentInsightsJobsClient {
8498
+ type Options = BaseClientOptions;
8499
+ interface RequestOptions extends BaseRequestOptions {
8500
+ }
8501
+ }
8502
+ /**
8503
+ * Per-(workspace, project) Agent Insights report configuration
8504
+ */
8505
+ declare class AgentInsightsJobsClient {
8506
+ protected readonly _options: NormalizedClientOptions<AgentInsightsJobsClient.Options>;
8507
+ constructor(options?: AgentInsightsJobsClient.Options);
8508
+ /**
8509
+ * Returns the Agent Insights job for the (workspace, project), or 404 if none exists.
8510
+ *
8511
+ * @param {string} projectId
8512
+ * @param {OpikApi.GetAgentInsightsJobRequest} request
8513
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8514
+ *
8515
+ * @throws {@link OpikApi.NotFoundError}
8516
+ *
8517
+ * @example
8518
+ * await client.agentInsightsJobs.getAgentInsightsJob("projectId")
8519
+ */
8520
+ getAgentInsightsJob(projectId: string, request?: GetAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8521
+ private __getAgentInsightsJob;
8522
+ /**
8523
+ * Creates the Agent Insights job for a project. 409 if one already exists.
8524
+ *
8525
+ * @param {string} projectId
8526
+ * @param {OpikApi.CreateAgentInsightsJobRequest} request
8527
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8528
+ *
8529
+ * @throws {@link OpikApi.NotFoundError}
8530
+ * @throws {@link OpikApi.ConflictError}
8531
+ *
8532
+ * @example
8533
+ * await client.agentInsightsJobs.createAgentInsightsJob("projectId")
8534
+ */
8535
+ createAgentInsightsJob(projectId: string, request?: CreateAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8536
+ private __createAgentInsightsJob;
8537
+ /**
8538
+ * Partially updates the Agent Insights job for a project (e.g. status; never deletes). Returns the updated job, or 404 if none exists.
8539
+ *
8540
+ * @param {string} projectId
8541
+ * @param {OpikApi.AgentInsightsJobUpdate} request
8542
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8543
+ *
8544
+ * @throws {@link OpikApi.NotFoundError}
8545
+ *
8546
+ * @example
8547
+ * await client.agentInsightsJobs.updateAgentInsightsJob("projectId", {
8548
+ * status: "enabled"
8549
+ * })
8550
+ */
8551
+ updateAgentInsightsJob(projectId: string, request: AgentInsightsJobUpdate, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8552
+ private __updateAgentInsightsJob;
8553
+ /**
8554
+ * Triggers an immediate report run for an existing job (over the last 24h). Fire-and-forget; returns 202. 404 if none exists.
8555
+ *
8556
+ * @param {string} projectId
8557
+ * @param {OpikApi.TriggerAgentInsightsJobRequest} request
8558
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8559
+ *
8560
+ * @throws {@link OpikApi.NotFoundError}
8561
+ *
8562
+ * @example
8563
+ * await client.agentInsightsJobs.triggerAgentInsightsJob("projectId")
8564
+ */
8565
+ triggerAgentInsightsJob(projectId: string, request?: TriggerAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<void>;
8566
+ private __triggerAgentInsightsJob;
8567
+ }
8568
+
8445
8569
  declare namespace AiSpendClient {
8446
8570
  type Options = BaseClientOptions;
8447
8571
  interface RequestOptions extends BaseRequestOptions {
@@ -13098,6 +13222,7 @@ declare class OpikApiClient {
13098
13222
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
13099
13223
  protected _systemUsage: SystemUsageClient | undefined;
13100
13224
  protected _agentConfigs: AgentConfigsClient | undefined;
13225
+ protected _agentInsightsJobs: AgentInsightsJobsClient | undefined;
13101
13226
  protected _agentInsights: AgentInsightsClient | undefined;
13102
13227
  protected _aiSpend: AiSpendClient | undefined;
13103
13228
  protected _alerts: AlertsClient | undefined;
@@ -13139,6 +13264,7 @@ declare class OpikApiClient {
13139
13264
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
13140
13265
  get systemUsage(): SystemUsageClient;
13141
13266
  get agentConfigs(): AgentConfigsClient;
13267
+ get agentInsightsJobs(): AgentInsightsJobsClient;
13142
13268
  get agentInsights(): AgentInsightsClient;
13143
13269
  get aiSpend(): AiSpendClient;
13144
13270
  get alerts(): AlertsClient;
package/dist/index.d.ts CHANGED
@@ -445,6 +445,42 @@ declare const FindAgentInsightsIssuesRequestStatus: {
445
445
  };
446
446
  type FindAgentInsightsIssuesRequestStatus = (typeof FindAgentInsightsIssuesRequestStatus)[keyof typeof FindAgentInsightsIssuesRequestStatus];
447
447
 
448
+ /**
449
+ * @example
450
+ * {
451
+ * status: "enabled"
452
+ * }
453
+ */
454
+ interface AgentInsightsJobUpdate {
455
+ /** New status for the job */
456
+ status: AgentInsightsJobUpdateStatus;
457
+ }
458
+
459
+ /**
460
+ * @example
461
+ * {}
462
+ */
463
+ type CreateAgentInsightsJobRequest = {};
464
+
465
+ /**
466
+ * @example
467
+ * {}
468
+ */
469
+ type GetAgentInsightsJobRequest = {};
470
+
471
+ /**
472
+ * @example
473
+ * {}
474
+ */
475
+ type TriggerAgentInsightsJobRequest = {};
476
+
477
+ /** New status for the job */
478
+ declare const AgentInsightsJobUpdateStatus: {
479
+ readonly Enabled: "enabled";
480
+ readonly Disabled: "disabled";
481
+ };
482
+ type AgentInsightsJobUpdateStatus = (typeof AgentInsightsJobUpdateStatus)[keyof typeof AgentInsightsJobUpdateStatus];
483
+
448
484
  /**
449
485
  * @example
450
486
  * {
@@ -3536,6 +3572,22 @@ declare const AgentInsightsIssueWithDetailsStatus: {
3536
3572
  };
3537
3573
  type AgentInsightsIssueWithDetailsStatus = (typeof AgentInsightsIssueWithDetailsStatus)[keyof typeof AgentInsightsIssueWithDetailsStatus];
3538
3574
 
3575
+ interface AgentInsightsJob {
3576
+ id?: string;
3577
+ projectId?: string;
3578
+ status?: AgentInsightsJobStatus;
3579
+ createdAt?: Date;
3580
+ createdBy?: string;
3581
+ lastUpdatedAt?: Date;
3582
+ lastUpdatedBy?: string;
3583
+ }
3584
+
3585
+ declare const AgentInsightsJobStatus: {
3586
+ readonly Enabled: "enabled";
3587
+ readonly Disabled: "disabled";
3588
+ };
3589
+ type AgentInsightsJobStatus = (typeof AgentInsightsJobStatus)[keyof typeof AgentInsightsJobStatus];
3590
+
3539
3591
  interface AggregationData {
3540
3592
  experimentCount?: number;
3541
3593
  traceCount?: number;
@@ -8442,6 +8494,78 @@ declare class AgentInsightsClient {
8442
8494
  private __updateAgentInsightsIssue;
8443
8495
  }
8444
8496
 
8497
+ declare namespace AgentInsightsJobsClient {
8498
+ type Options = BaseClientOptions;
8499
+ interface RequestOptions extends BaseRequestOptions {
8500
+ }
8501
+ }
8502
+ /**
8503
+ * Per-(workspace, project) Agent Insights report configuration
8504
+ */
8505
+ declare class AgentInsightsJobsClient {
8506
+ protected readonly _options: NormalizedClientOptions<AgentInsightsJobsClient.Options>;
8507
+ constructor(options?: AgentInsightsJobsClient.Options);
8508
+ /**
8509
+ * Returns the Agent Insights job for the (workspace, project), or 404 if none exists.
8510
+ *
8511
+ * @param {string} projectId
8512
+ * @param {OpikApi.GetAgentInsightsJobRequest} request
8513
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8514
+ *
8515
+ * @throws {@link OpikApi.NotFoundError}
8516
+ *
8517
+ * @example
8518
+ * await client.agentInsightsJobs.getAgentInsightsJob("projectId")
8519
+ */
8520
+ getAgentInsightsJob(projectId: string, request?: GetAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8521
+ private __getAgentInsightsJob;
8522
+ /**
8523
+ * Creates the Agent Insights job for a project. 409 if one already exists.
8524
+ *
8525
+ * @param {string} projectId
8526
+ * @param {OpikApi.CreateAgentInsightsJobRequest} request
8527
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8528
+ *
8529
+ * @throws {@link OpikApi.NotFoundError}
8530
+ * @throws {@link OpikApi.ConflictError}
8531
+ *
8532
+ * @example
8533
+ * await client.agentInsightsJobs.createAgentInsightsJob("projectId")
8534
+ */
8535
+ createAgentInsightsJob(projectId: string, request?: CreateAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8536
+ private __createAgentInsightsJob;
8537
+ /**
8538
+ * Partially updates the Agent Insights job for a project (e.g. status; never deletes). Returns the updated job, or 404 if none exists.
8539
+ *
8540
+ * @param {string} projectId
8541
+ * @param {OpikApi.AgentInsightsJobUpdate} request
8542
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8543
+ *
8544
+ * @throws {@link OpikApi.NotFoundError}
8545
+ *
8546
+ * @example
8547
+ * await client.agentInsightsJobs.updateAgentInsightsJob("projectId", {
8548
+ * status: "enabled"
8549
+ * })
8550
+ */
8551
+ updateAgentInsightsJob(projectId: string, request: AgentInsightsJobUpdate, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8552
+ private __updateAgentInsightsJob;
8553
+ /**
8554
+ * Triggers an immediate report run for an existing job (over the last 24h). Fire-and-forget; returns 202. 404 if none exists.
8555
+ *
8556
+ * @param {string} projectId
8557
+ * @param {OpikApi.TriggerAgentInsightsJobRequest} request
8558
+ * @param {AgentInsightsJobsClient.RequestOptions} requestOptions - Request-specific configuration.
8559
+ *
8560
+ * @throws {@link OpikApi.NotFoundError}
8561
+ *
8562
+ * @example
8563
+ * await client.agentInsightsJobs.triggerAgentInsightsJob("projectId")
8564
+ */
8565
+ triggerAgentInsightsJob(projectId: string, request?: TriggerAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<void>;
8566
+ private __triggerAgentInsightsJob;
8567
+ }
8568
+
8445
8569
  declare namespace AiSpendClient {
8446
8570
  type Options = BaseClientOptions;
8447
8571
  interface RequestOptions extends BaseRequestOptions {
@@ -13098,6 +13222,7 @@ declare class OpikApiClient {
13098
13222
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
13099
13223
  protected _systemUsage: SystemUsageClient | undefined;
13100
13224
  protected _agentConfigs: AgentConfigsClient | undefined;
13225
+ protected _agentInsightsJobs: AgentInsightsJobsClient | undefined;
13101
13226
  protected _agentInsights: AgentInsightsClient | undefined;
13102
13227
  protected _aiSpend: AiSpendClient | undefined;
13103
13228
  protected _alerts: AlertsClient | undefined;
@@ -13139,6 +13264,7 @@ declare class OpikApiClient {
13139
13264
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
13140
13265
  get systemUsage(): SystemUsageClient;
13141
13266
  get agentConfigs(): AgentConfigsClient;
13267
+ get agentInsightsJobs(): AgentInsightsJobsClient;
13142
13268
  get agentInsights(): AgentInsightsClient;
13143
13269
  get aiSpend(): AiSpendClient;
13144
13270
  get alerts(): AlertsClient;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import {Ia}from'./chunk-DNPSLTSR.js';export{va as AgentTaskCompletionJudge,ua as AgentToolCorrectnessJudge,ia as AnswerRelevance,ea as BaseLLMJudgeMetric,F as BaseMetric,G as BaseSuiteEvaluator,s as ChatPrompt,xa as ComplianceRiskJudge,l as ConfigMismatchError,k as ConfigNotFoundError,ba as Contains,B as DEFAULT_EXECUTION_POLICY,m as Dataset,i as DatasetVersion,j as DatasetVersionNotFoundError,pa as DemographicBiasJudge,na as DialogueHelpfulnessJudge,aa as ExactMatch,ja as GEval,ka as GEvalPreset,ra as GenderBiasJudge,ha as Hallucination,da as IsJson,T as LLMJudge,K as ModelConfigurationError,I as ModelError,J as ModelGenerationError,fa as Moderation,Fa as OPIK_PARENT_SPAN_ID_HEADER,Ea as OPIK_TRACE_ID_HEADER,Da as Opik,H as OpikBaseModel,t as OpikQueryLanguage,g as OpikSpanType,qa as PoliticalBiasJudge,r as Prompt,n as PromptType,wa as PromptUncertaintyJudge,oa as QARelevanceJudge,ca as RegexMatch,ta as RegionalBiasJudge,sa as ReligiousBiasJudge,S as ResponseSchema,Q as SYSTEM_PROMPT,ma as SummarizationCoherenceJudge,la as SummarizationConsistencyJudge,E as TASK_ERROR_SCORE_NAME,Ba as TestSuite,C as TestSuiteResult,v as ThreadsAnnotationQueue,u as TracesAnnotationQueue,R as USER_PROMPT_TEMPLATE,ga as Usefulness,M as VercelAIChatModel,y as activateRunner,w as agentConfigContext,D as buildSuiteResult,N as createModel,O as createModelFromInstance,V as deserializeEvaluators,L as detectProvider,c as disableLogger,_ as evaluate,$ as evaluatePrompt,Y as evaluateTestSuite,x as flushAll,h as generateId,Ga as getDistributedTraceHeaders,o as getGlobalClient,z as getTrackContext,e as isTracingActive,a as logger,q as resetGlobalClient,f as resetTracingToConfigDefault,ya as resolveEvaluators,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,P as resolveModel,Z as runTests,U as serializeEvaluators,p as setGlobalClient,b as setLoggerLevel,d as setTracingActive,A as track,za as validateEvaluators,Aa as validateExecutionPolicy,Ha as z}from'./chunk-DNPSLTSR.js';Ia();
1
+ import {Ia}from'./chunk-277G3DZX.js';export{va as AgentTaskCompletionJudge,ua as AgentToolCorrectnessJudge,ia as AnswerRelevance,ea as BaseLLMJudgeMetric,F as BaseMetric,G as BaseSuiteEvaluator,s as ChatPrompt,xa as ComplianceRiskJudge,l as ConfigMismatchError,k as ConfigNotFoundError,ba as Contains,B as DEFAULT_EXECUTION_POLICY,m as Dataset,i as DatasetVersion,j as DatasetVersionNotFoundError,pa as DemographicBiasJudge,na as DialogueHelpfulnessJudge,aa as ExactMatch,ja as GEval,ka as GEvalPreset,ra as GenderBiasJudge,ha as Hallucination,da as IsJson,T as LLMJudge,K as ModelConfigurationError,I as ModelError,J as ModelGenerationError,fa as Moderation,Fa as OPIK_PARENT_SPAN_ID_HEADER,Ea as OPIK_TRACE_ID_HEADER,Da as Opik,H as OpikBaseModel,t as OpikQueryLanguage,g as OpikSpanType,qa as PoliticalBiasJudge,r as Prompt,n as PromptType,wa as PromptUncertaintyJudge,oa as QARelevanceJudge,ca as RegexMatch,ta as RegionalBiasJudge,sa as ReligiousBiasJudge,S as ResponseSchema,Q as SYSTEM_PROMPT,ma as SummarizationCoherenceJudge,la as SummarizationConsistencyJudge,E as TASK_ERROR_SCORE_NAME,Ba as TestSuite,C as TestSuiteResult,v as ThreadsAnnotationQueue,u as TracesAnnotationQueue,R as USER_PROMPT_TEMPLATE,ga as Usefulness,M as VercelAIChatModel,y as activateRunner,w as agentConfigContext,D as buildSuiteResult,N as createModel,O as createModelFromInstance,V as deserializeEvaluators,L as detectProvider,c as disableLogger,_ as evaluate,$ as evaluatePrompt,Y as evaluateTestSuite,x as flushAll,h as generateId,Ga as getDistributedTraceHeaders,o as getGlobalClient,z as getTrackContext,e as isTracingActive,a as logger,q as resetGlobalClient,f as resetTracingToConfigDefault,ya as resolveEvaluators,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,P as resolveModel,Z as runTests,U as serializeEvaluators,p as setGlobalClient,b as setLoggerLevel,d as setTracingActive,A as track,za as validateEvaluators,Aa as validateExecutionPolicy,Ha as z}from'./chunk-277G3DZX.js';Ia();
@@ -1 +1 @@
1
- import {Ca}from'./chunk-DNPSLTSR.js';export{B as DEFAULT_EXECUTION_POLICY,Ba as TestSuite,C as TestSuiteResult,D as buildSuiteResult,V as deserializeEvaluators,Y as evaluateTestSuite,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,Z as runTests,U as serializeEvaluators}from'./chunk-DNPSLTSR.js';Ca();
1
+ import {Ca}from'./chunk-277G3DZX.js';export{B as DEFAULT_EXECUTION_POLICY,Ba as TestSuite,C as TestSuiteResult,D as buildSuiteResult,V as deserializeEvaluators,Y as evaluateTestSuite,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,Z as runTests,U as serializeEvaluators}from'./chunk-277G3DZX.js';Ca();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opik",
3
3
  "description": "Opik TypeScript and JavaScript SDK",
4
- "version": "2.0.69",
4
+ "version": "2.0.71",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/comet-ml/opik.git",