opik 2.2.80 → 2.2.82

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
@@ -455,6 +455,19 @@ declare const FindAgentInsightsIssuesRequestStatus: {
455
455
  };
456
456
  type FindAgentInsightsIssuesRequestStatus = (typeof FindAgentInsightsIssuesRequestStatus)[keyof typeof FindAgentInsightsIssuesRequestStatus];
457
457
 
458
+ /**
459
+ * @example
460
+ * {
461
+ * enrolled: true,
462
+ * projectIds: ["project_ids"]
463
+ * }
464
+ */
465
+ interface Request {
466
+ /** True enrols the given projects, false clears their enrolment */
467
+ enrolled: boolean;
468
+ projectIds: string[];
469
+ }
470
+
458
471
  /**
459
472
  * @example
460
473
  * {
@@ -3720,6 +3733,8 @@ interface AgentInsightsJob {
3720
3733
  id?: string;
3721
3734
  projectId?: string;
3722
3735
  status?: AgentInsightsJobStatus;
3736
+ autoFirstRunEnrolled?: boolean;
3737
+ autoFirstRunAt?: Date;
3723
3738
  lastScanAt?: Date;
3724
3739
  lastFailureReason?: string;
3725
3740
  lastFailureDetail?: string;
@@ -7224,6 +7239,15 @@ interface ReportPreference {
7224
7239
  lastUpdatedAt?: Date;
7225
7240
  }
7226
7241
 
7242
+ interface Response$1 {
7243
+ enrolled?: number;
7244
+ cleared?: number;
7245
+ /** Ids that match no project */
7246
+ unknownProjectIds?: string[];
7247
+ /** Ids whose automatic run already happened, so enrolling has no effect */
7248
+ alreadyRunProjectIds?: string[];
7249
+ }
7250
+
7227
7251
  interface ResponseFormat {
7228
7252
  type?: ResponseFormatType;
7229
7253
  jsonSchema?: JsonSchema;
@@ -8885,6 +8909,33 @@ declare class AgentInsightsClient {
8885
8909
  private __updateAgentInsightsIssue;
8886
8910
  }
8887
8911
 
8912
+ declare namespace AgentInsightsEnrollmentClient {
8913
+ type Options = BaseClientOptions;
8914
+ interface RequestOptions extends BaseRequestOptions {
8915
+ }
8916
+ }
8917
+ /**
8918
+ * Internal auto-first-run rollout enrollment
8919
+ */
8920
+ declare class AgentInsightsEnrollmentClient {
8921
+ protected readonly _options: NormalizedClientOptions<AgentInsightsEnrollmentClient.Options>;
8922
+ constructor(options?: AgentInsightsEnrollmentClient.Options);
8923
+ /**
8924
+ * Enrols the given projects, creating their job row if needed, or clears their enrolment. Idempotent.
8925
+ *
8926
+ * @param {OpikApi.Request} request
8927
+ * @param {AgentInsightsEnrollmentClient.RequestOptions} requestOptions - Request-specific configuration.
8928
+ *
8929
+ * @example
8930
+ * await client.agentInsightsEnrollment.enrolProjectsInAutoFirstRun({
8931
+ * enrolled: true,
8932
+ * projectIds: ["project_ids"]
8933
+ * })
8934
+ */
8935
+ enrolProjectsInAutoFirstRun(request: Request, requestOptions?: AgentInsightsEnrollmentClient.RequestOptions): HttpResponsePromise<Response$1>;
8936
+ private __enrolProjectsInAutoFirstRun;
8937
+ }
8938
+
8888
8939
  declare namespace AgentInsightsJobsClient {
8889
8940
  type Options = BaseClientOptions;
8890
8941
  interface RequestOptions extends BaseRequestOptions {
@@ -8911,7 +8962,7 @@ declare class AgentInsightsJobsClient {
8911
8962
  getAgentInsightsJob(projectId: string, request?: GetAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8912
8963
  private __getAgentInsightsJob;
8913
8964
  /**
8914
- * Creates the Agent Insights job for a project. 409 if one already exists.
8965
+ * Creates the Agent Insights job for a project, disabled: the daily schedule stays off until the job is enabled with PATCH. 409 if one already exists.
8915
8966
  *
8916
8967
  * @param {string} projectId
8917
8968
  * @param {OpikApi.CreateAgentInsightsJobRequest} request
@@ -13619,6 +13670,7 @@ declare namespace OpikApiClient {
13619
13670
  declare class OpikApiClient {
13620
13671
  protected readonly _options: NormalizedClientOptions<OpikApiClient.Options>;
13621
13672
  protected _mcpOAuth: McpOAuthClient | undefined;
13673
+ protected _agentInsightsEnrollment: AgentInsightsEnrollmentClient | undefined;
13622
13674
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
13623
13675
  protected _systemUsage: SystemUsageClient | undefined;
13624
13676
  protected _agentConfigs: AgentConfigsClient | undefined;
@@ -13661,6 +13713,7 @@ declare class OpikApiClient {
13661
13713
  protected _redirect: RedirectClient | undefined;
13662
13714
  constructor(options?: OpikApiClient.Options);
13663
13715
  get mcpOAuth(): McpOAuthClient;
13716
+ get agentInsightsEnrollment(): AgentInsightsEnrollmentClient;
13664
13717
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
13665
13718
  get systemUsage(): SystemUsageClient;
13666
13719
  get agentConfigs(): AgentConfigsClient;
package/dist/index.d.ts CHANGED
@@ -455,6 +455,19 @@ declare const FindAgentInsightsIssuesRequestStatus: {
455
455
  };
456
456
  type FindAgentInsightsIssuesRequestStatus = (typeof FindAgentInsightsIssuesRequestStatus)[keyof typeof FindAgentInsightsIssuesRequestStatus];
457
457
 
458
+ /**
459
+ * @example
460
+ * {
461
+ * enrolled: true,
462
+ * projectIds: ["project_ids"]
463
+ * }
464
+ */
465
+ interface Request {
466
+ /** True enrols the given projects, false clears their enrolment */
467
+ enrolled: boolean;
468
+ projectIds: string[];
469
+ }
470
+
458
471
  /**
459
472
  * @example
460
473
  * {
@@ -3720,6 +3733,8 @@ interface AgentInsightsJob {
3720
3733
  id?: string;
3721
3734
  projectId?: string;
3722
3735
  status?: AgentInsightsJobStatus;
3736
+ autoFirstRunEnrolled?: boolean;
3737
+ autoFirstRunAt?: Date;
3723
3738
  lastScanAt?: Date;
3724
3739
  lastFailureReason?: string;
3725
3740
  lastFailureDetail?: string;
@@ -7224,6 +7239,15 @@ interface ReportPreference {
7224
7239
  lastUpdatedAt?: Date;
7225
7240
  }
7226
7241
 
7242
+ interface Response$1 {
7243
+ enrolled?: number;
7244
+ cleared?: number;
7245
+ /** Ids that match no project */
7246
+ unknownProjectIds?: string[];
7247
+ /** Ids whose automatic run already happened, so enrolling has no effect */
7248
+ alreadyRunProjectIds?: string[];
7249
+ }
7250
+
7227
7251
  interface ResponseFormat {
7228
7252
  type?: ResponseFormatType;
7229
7253
  jsonSchema?: JsonSchema;
@@ -8885,6 +8909,33 @@ declare class AgentInsightsClient {
8885
8909
  private __updateAgentInsightsIssue;
8886
8910
  }
8887
8911
 
8912
+ declare namespace AgentInsightsEnrollmentClient {
8913
+ type Options = BaseClientOptions;
8914
+ interface RequestOptions extends BaseRequestOptions {
8915
+ }
8916
+ }
8917
+ /**
8918
+ * Internal auto-first-run rollout enrollment
8919
+ */
8920
+ declare class AgentInsightsEnrollmentClient {
8921
+ protected readonly _options: NormalizedClientOptions<AgentInsightsEnrollmentClient.Options>;
8922
+ constructor(options?: AgentInsightsEnrollmentClient.Options);
8923
+ /**
8924
+ * Enrols the given projects, creating their job row if needed, or clears their enrolment. Idempotent.
8925
+ *
8926
+ * @param {OpikApi.Request} request
8927
+ * @param {AgentInsightsEnrollmentClient.RequestOptions} requestOptions - Request-specific configuration.
8928
+ *
8929
+ * @example
8930
+ * await client.agentInsightsEnrollment.enrolProjectsInAutoFirstRun({
8931
+ * enrolled: true,
8932
+ * projectIds: ["project_ids"]
8933
+ * })
8934
+ */
8935
+ enrolProjectsInAutoFirstRun(request: Request, requestOptions?: AgentInsightsEnrollmentClient.RequestOptions): HttpResponsePromise<Response$1>;
8936
+ private __enrolProjectsInAutoFirstRun;
8937
+ }
8938
+
8888
8939
  declare namespace AgentInsightsJobsClient {
8889
8940
  type Options = BaseClientOptions;
8890
8941
  interface RequestOptions extends BaseRequestOptions {
@@ -8911,7 +8962,7 @@ declare class AgentInsightsJobsClient {
8911
8962
  getAgentInsightsJob(projectId: string, request?: GetAgentInsightsJobRequest, requestOptions?: AgentInsightsJobsClient.RequestOptions): HttpResponsePromise<AgentInsightsJob>;
8912
8963
  private __getAgentInsightsJob;
8913
8964
  /**
8914
- * Creates the Agent Insights job for a project. 409 if one already exists.
8965
+ * Creates the Agent Insights job for a project, disabled: the daily schedule stays off until the job is enabled with PATCH. 409 if one already exists.
8915
8966
  *
8916
8967
  * @param {string} projectId
8917
8968
  * @param {OpikApi.CreateAgentInsightsJobRequest} request
@@ -13619,6 +13670,7 @@ declare namespace OpikApiClient {
13619
13670
  declare class OpikApiClient {
13620
13671
  protected readonly _options: NormalizedClientOptions<OpikApiClient.Options>;
13621
13672
  protected _mcpOAuth: McpOAuthClient | undefined;
13673
+ protected _agentInsightsEnrollment: AgentInsightsEnrollmentClient | undefined;
13622
13674
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
13623
13675
  protected _systemUsage: SystemUsageClient | undefined;
13624
13676
  protected _agentConfigs: AgentConfigsClient | undefined;
@@ -13661,6 +13713,7 @@ declare class OpikApiClient {
13661
13713
  protected _redirect: RedirectClient | undefined;
13662
13714
  constructor(options?: OpikApiClient.Options);
13663
13715
  get mcpOAuth(): McpOAuthClient;
13716
+ get agentInsightsEnrollment(): AgentInsightsEnrollmentClient;
13664
13717
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
13665
13718
  get systemUsage(): SystemUsageClient;
13666
13719
  get agentConfigs(): AgentConfigsClient;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import {Ia}from'./chunk-BD2E2ENS.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-BD2E2ENS.js';Ia();
1
+ import {Ia}from'./chunk-YHNZ4SWJ.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-YHNZ4SWJ.js';Ia();
@@ -1 +1 @@
1
- import {Ca}from'./chunk-BD2E2ENS.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-BD2E2ENS.js';Ca();
1
+ import {Ca}from'./chunk-YHNZ4SWJ.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-YHNZ4SWJ.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.2.80",
4
+ "version": "2.2.82",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/comet-ml/opik.git",