opik 1.11.2 → 1.11.3

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
@@ -756,6 +756,9 @@ interface CreateDatasetItemsFromSpansRequest {
756
756
  /** Set of span IDs to add to the dataset */
757
757
  spanIds: string[];
758
758
  enrichmentOptions: SpanEnrichmentOptions;
759
+ /** Optional evaluators to apply to the created items */
760
+ evaluators?: EvaluatorItem[];
761
+ executionPolicy?: ExecutionPolicy$1;
759
762
  }
760
763
 
761
764
  /**
@@ -769,6 +772,9 @@ interface CreateDatasetItemsFromTracesRequest {
769
772
  /** Set of trace IDs to add to the dataset */
770
773
  traceIds: string[];
771
774
  enrichmentOptions: TraceEnrichmentOptions;
775
+ /** Optional evaluators to apply to the created items */
776
+ evaluators?: EvaluatorItem[];
777
+ executionPolicy?: ExecutionPolicy$1;
772
778
  }
773
779
 
774
780
  /**
@@ -1530,6 +1536,39 @@ declare const OptimizationUpdateStatus: {
1530
1536
  };
1531
1537
  type OptimizationUpdateStatus = (typeof OptimizationUpdateStatus)[keyof typeof OptimizationUpdateStatus];
1532
1538
 
1539
+ /**
1540
+ * @example
1541
+ * {
1542
+ * runnerName: "runner_name",
1543
+ * hmac: "hmac"
1544
+ * }
1545
+ */
1546
+ interface ActivateRequest {
1547
+ runnerName: string;
1548
+ hmac: string;
1549
+ }
1550
+
1551
+ /**
1552
+ * @example
1553
+ * {
1554
+ * projectId: "project_id",
1555
+ * activationKey: "activation_key",
1556
+ * type: "connect"
1557
+ * }
1558
+ */
1559
+ interface CreateSessionRequest {
1560
+ projectId: string;
1561
+ activationKey: string;
1562
+ ttlSeconds?: number;
1563
+ type: CreateSessionRequestType;
1564
+ }
1565
+
1566
+ declare const CreateSessionRequestType: {
1567
+ readonly Connect: "connect";
1568
+ readonly Endpoint: "endpoint";
1569
+ };
1570
+ type CreateSessionRequestType = (typeof CreateSessionRequestType)[keyof typeof CreateSessionRequestType];
1571
+
1533
1572
  /**
1534
1573
  * @example
1535
1574
  * {}
@@ -2115,6 +2154,7 @@ interface CreateLocalRunnerJobRequest {
2115
2154
  inputs?: JsonNode;
2116
2155
  projectId: string;
2117
2156
  maskId?: string;
2157
+ blueprintName?: string;
2118
2158
  metadata?: LocalRunnerJobMetadata;
2119
2159
  }
2120
2160
 
@@ -2170,18 +2210,6 @@ interface ListRunnersRequest {
2170
2210
  size?: number;
2171
2211
  }
2172
2212
 
2173
- /**
2174
- * @example
2175
- * {
2176
- * pairingCode: "pairing_code",
2177
- * runnerName: "runner_name"
2178
- * }
2179
- */
2180
- interface LocalRunnerConnectRequest {
2181
- pairingCode: string;
2182
- runnerName: string;
2183
- }
2184
-
2185
2213
  /**
2186
2214
  * @example
2187
2215
  * {}
@@ -2203,16 +2231,6 @@ interface LocalRunnerJobResultRequest {
2203
2231
  traceId?: string;
2204
2232
  }
2205
2233
 
2206
- /**
2207
- * @example
2208
- * {
2209
- * projectId: "project_id"
2210
- * }
2211
- */
2212
- interface LocalRunnerPairRequest {
2213
- projectId: string;
2214
- }
2215
-
2216
2234
  /**
2217
2235
  * @example
2218
2236
  * {}
@@ -3259,7 +3277,7 @@ interface AssertionResultCompare {
3259
3277
  }
3260
3278
 
3261
3279
  /**
3262
- * Per-assertion average pass rates for evaluation suite experiments. Null for regular experiments.
3280
+ * Per-assertion average pass rates for test suite experiments. Null for regular experiments.
3263
3281
  */
3264
3282
  interface AssertionScoreAveragePublic {
3265
3283
  name: string;
@@ -3902,6 +3920,11 @@ interface CountValueStatPublic {
3902
3920
  value?: number;
3903
3921
  }
3904
3922
 
3923
+ interface CreateSessionResponse {
3924
+ sessionId?: string;
3925
+ runnerId?: string;
3926
+ }
3927
+
3905
3928
  interface DashboardPagePublic {
3906
3929
  content?: DashboardPublic[];
3907
3930
  page?: number;
@@ -4651,13 +4674,13 @@ interface ExperimentPublic {
4651
4674
  /** ID of the dataset version this experiment is linked to. If not provided at creation, experiment will be automatically linked to the latest version. */
4652
4675
  datasetVersionId?: string;
4653
4676
  datasetVersionSummary?: DatasetVersionSummaryPublic;
4654
- /** Pass rate for evaluation suite experiments (0.0-1.0). Null for regular experiments. */
4677
+ /** Pass rate for test suite experiments (0.0-1.0). Null for regular experiments. */
4655
4678
  passRate?: number;
4656
- /** Number of items that passed for evaluation suite experiments. Null for regular experiments. */
4679
+ /** Number of items that passed for test suite experiments. Null for regular experiments. */
4657
4680
  passedCount?: number;
4658
- /** Total number of items for evaluation suite experiments. Null for regular experiments. */
4681
+ /** Total number of items for test suite experiments. Null for regular experiments. */
4659
4682
  totalCount?: number;
4660
- /** Per-assertion average pass rates for evaluation suite experiments. Null for regular experiments. */
4683
+ /** Per-assertion average pass rates for test suite experiments. Null for regular experiments. */
4661
4684
  assertionScores?: AssertionScoreAveragePublic[];
4662
4685
  }
4663
4686
 
@@ -5302,13 +5325,7 @@ interface LocalRunner {
5302
5325
  agents?: Agent[];
5303
5326
  capabilities?: string[];
5304
5327
  checklist?: JsonNode;
5305
- }
5306
-
5307
- interface LocalRunnerConnectResponse {
5308
- runnerId?: string;
5309
- workspaceId?: string;
5310
- projectId?: string;
5311
- projectName?: string;
5328
+ type?: LocalRunnerType;
5312
5329
  }
5313
5330
 
5314
5331
  interface LocalRunnerHeartbeatResponse {
@@ -5326,6 +5343,7 @@ interface LocalRunnerJob {
5326
5343
  projectId?: string;
5327
5344
  traceId?: string;
5328
5345
  maskId?: string;
5346
+ blueprintName?: string;
5329
5347
  metadata?: LocalRunnerJobMetadata;
5330
5348
  timeout?: number;
5331
5349
  createdAt?: Date;
@@ -5368,12 +5386,6 @@ interface LocalRunnerPage {
5368
5386
  content?: LocalRunner[];
5369
5387
  }
5370
5388
 
5371
- interface LocalRunnerPairResponse {
5372
- pairingCode?: string;
5373
- runnerId?: string;
5374
- expiresInSeconds?: number;
5375
- }
5376
-
5377
5389
  declare const LocalRunnerStatus: {
5378
5390
  readonly Pairing: "pairing";
5379
5391
  readonly Connected: "connected";
@@ -5381,6 +5393,12 @@ declare const LocalRunnerStatus: {
5381
5393
  };
5382
5394
  type LocalRunnerStatus = (typeof LocalRunnerStatus)[keyof typeof LocalRunnerStatus];
5383
5395
 
5396
+ declare const LocalRunnerType: {
5397
+ readonly Connect: "connect";
5398
+ readonly Endpoint: "endpoint";
5399
+ };
5400
+ type LocalRunnerType = (typeof LocalRunnerType)[keyof typeof LocalRunnerType];
5401
+
5384
5402
  interface LogItem {
5385
5403
  timestamp?: Date;
5386
5404
  ruleId?: string;
@@ -6078,7 +6096,9 @@ interface ServiceTogglesConfig {
6078
6096
  customllmProviderEnabled: boolean;
6079
6097
  ollamaProviderEnabled: boolean;
6080
6098
  collaboratorsTabEnabled: boolean;
6099
+ v2WorkspaceAllowlistIds: string[];
6081
6100
  forceWorkspaceVersion: string;
6101
+ v2WorkspaceAllowlist?: string;
6082
6102
  }
6083
6103
 
6084
6104
  interface Span$1 {
@@ -9502,6 +9522,62 @@ declare class OptimizationsClient {
9502
9522
  private __getStudioOptimizationLogs;
9503
9523
  }
9504
9524
 
9525
+ declare namespace PairingClient {
9526
+ type Options = BaseClientOptions;
9527
+ interface RequestOptions extends BaseRequestOptions {
9528
+ }
9529
+ }
9530
+ /**
9531
+ * Pairing sessions for the `opik connect` and `opik endpoint` CLI commands
9532
+ */
9533
+ declare class PairingClient {
9534
+ protected readonly _options: NormalizedClientOptions<PairingClient.Options>;
9535
+ constructor(options?: PairingClient.Options);
9536
+ /**
9537
+ * Verify the activation HMAC and flip the runner row to CONNECTED
9538
+ *
9539
+ * @param {string} sessionId
9540
+ * @param {OpikApi.ActivateRequest} request
9541
+ * @param {PairingClient.RequestOptions} requestOptions - Request-specific configuration.
9542
+ *
9543
+ * @throws {@link OpikApi.ForbiddenError}
9544
+ * @throws {@link OpikApi.NotFoundError}
9545
+ * @throws {@link OpikApi.ConflictError}
9546
+ * @throws {@link OpikApi.UnprocessableEntityError}
9547
+ * @throws {@link OpikApi.TooManyRequestsError}
9548
+ * @throws {@link OpikApi.NotImplementedError}
9549
+ *
9550
+ * @example
9551
+ * await client.pairing.activatePairingSession("sessionId", {
9552
+ * runnerName: "runner_name",
9553
+ * hmac: "hmac"
9554
+ * })
9555
+ */
9556
+ activatePairingSession(sessionId: string, request: ActivateRequest, requestOptions?: PairingClient.RequestOptions): HttpResponsePromise<void>;
9557
+ private __activatePairingSession;
9558
+ /**
9559
+ * Register a short-lived pairing session that a local daemon will later activate via HMAC
9560
+ *
9561
+ * @param {OpikApi.CreateSessionRequest} request
9562
+ * @param {PairingClient.RequestOptions} requestOptions - Request-specific configuration.
9563
+ *
9564
+ * @throws {@link OpikApi.BadRequestError}
9565
+ * @throws {@link OpikApi.NotFoundError}
9566
+ * @throws {@link OpikApi.UnprocessableEntityError}
9567
+ * @throws {@link OpikApi.TooManyRequestsError}
9568
+ * @throws {@link OpikApi.NotImplementedError}
9569
+ *
9570
+ * @example
9571
+ * await client.pairing.createPairingSession({
9572
+ * projectId: "project_id",
9573
+ * activationKey: "activation_key",
9574
+ * type: "connect"
9575
+ * })
9576
+ */
9577
+ createPairingSession(request: CreateSessionRequest, requestOptions?: PairingClient.RequestOptions): HttpResponsePromise<CreateSessionResponse>;
9578
+ private __createPairingSession;
9579
+ }
9580
+
9505
9581
  declare namespace ProjectsClient {
9506
9582
  type Options = BaseClientOptions;
9507
9583
  interface RequestOptions extends BaseRequestOptions {
@@ -10196,23 +10272,6 @@ declare class RunnersClient {
10196
10272
  */
10197
10273
  cancelJob(jobId: string, request?: CancelJobRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<void>;
10198
10274
  private __cancelJob;
10199
- /**
10200
- * Exchange a pairing code or API key for local runner credentials
10201
- *
10202
- * @param {OpikApi.LocalRunnerConnectRequest} request
10203
- * @param {RunnersClient.RequestOptions} requestOptions - Request-specific configuration.
10204
- *
10205
- * @throws {@link OpikApi.BadRequestError}
10206
- * @throws {@link OpikApi.NotFoundError}
10207
- *
10208
- * @example
10209
- * await client.runners.connectRunner({
10210
- * pairingCode: "pairing_code",
10211
- * runnerName: "runner_name"
10212
- * })
10213
- */
10214
- connectRunner(request: LocalRunnerConnectRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<LocalRunnerConnectResponse>;
10215
- private __connectRunner;
10216
10275
  /**
10217
10276
  * Submit a bridge command for execution by the local daemon
10218
10277
  *
@@ -10251,21 +10310,6 @@ declare class RunnersClient {
10251
10310
  */
10252
10311
  createJob(request: CreateLocalRunnerJobRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<void>;
10253
10312
  private __createJob;
10254
- /**
10255
- * Generate a pairing code for a local runner in the current workspace
10256
- *
10257
- * @param {OpikApi.LocalRunnerPairRequest} request
10258
- * @param {RunnersClient.RequestOptions} requestOptions - Request-specific configuration.
10259
- *
10260
- * @throws {@link OpikApi.NotFoundError}
10261
- *
10262
- * @example
10263
- * await client.runners.generatePairingCode({
10264
- * projectId: "project_id"
10265
- * })
10266
- */
10267
- generatePairingCode(request: LocalRunnerPairRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<LocalRunnerPairResponse>;
10268
- private __generatePairingCode;
10269
10313
  /**
10270
10314
  * Get bridge command status, optionally long-polling for completion
10271
10315
  *
@@ -11456,10 +11500,11 @@ declare class WorkspacesClient {
11456
11500
  * determination, clients must never derive the version themselves.
11457
11501
  *
11458
11502
  * Determination logic (priority order):
11459
- * 1) Feature flag override (TOGGLE_FORCE_WORKSPACE_VERSION)
11460
- * 2) Auth one-way V2 gate (authenticated mode only)
11461
- * 3) Version 1 entity check (entities without project_id)
11462
- * 4) Fallback on failure
11503
+ * 1) V2 workspace allowlist (TOGGLE_V2_WORKSPACE_ALLOWLIST)
11504
+ * 2) Feature flag override (TOGGLE_FORCE_WORKSPACE_VERSION)
11505
+ * 3) Auth one-way V2 gate (authenticated mode only)
11506
+ * 4) Version 1 entity check (entities without project_id)
11507
+ * 5) Fallback on failure
11463
11508
  *
11464
11509
  * In unauthenticated mode (authentication.enabled=false), auth steps are skipped.
11465
11510
  * Called by the frontend on workspace load.
@@ -11518,6 +11563,7 @@ declare class OpikApiClient {
11518
11563
  protected _ollieState: OllieStateClient | undefined;
11519
11564
  protected _openTelemetryIngestion: OpenTelemetryIngestionClient | undefined;
11520
11565
  protected _optimizations: OptimizationsClient | undefined;
11566
+ protected _pairing: PairingClient | undefined;
11521
11567
  protected _projects: ProjectsClient | undefined;
11522
11568
  protected _prompts: PromptsClient | undefined;
11523
11569
  protected _retentionRules: RetentionRulesClient | undefined;
@@ -11551,6 +11597,7 @@ declare class OpikApiClient {
11551
11597
  get ollieState(): OllieStateClient;
11552
11598
  get openTelemetryIngestion(): OpenTelemetryIngestionClient;
11553
11599
  get optimizations(): OptimizationsClient;
11600
+ get pairing(): PairingClient;
11554
11601
  get projects(): ProjectsClient;
11555
11602
  get prompts(): PromptsClient;
11556
11603
  get retentionRules(): RetentionRulesClient;
@@ -15793,7 +15840,11 @@ declare class AgentConfigManager {
15793
15840
  tagBlueprintWithEnv(blueprintId: string, env: string): Promise<void>;
15794
15841
  }
15795
15842
 
15796
- declare function agentConfigContext<T>(maskId: string, fn: () => T | Promise<T>): T | Promise<T>;
15843
+ interface ConfigContext {
15844
+ maskId?: string;
15845
+ blueprintName?: string;
15846
+ }
15847
+ declare function agentConfigContext<T>(context: ConfigContext, fn: () => T | Promise<T>): T | Promise<T>;
15797
15848
 
15798
15849
  declare function activateRunner(): void;
15799
15850
 
package/dist/index.d.ts CHANGED
@@ -756,6 +756,9 @@ interface CreateDatasetItemsFromSpansRequest {
756
756
  /** Set of span IDs to add to the dataset */
757
757
  spanIds: string[];
758
758
  enrichmentOptions: SpanEnrichmentOptions;
759
+ /** Optional evaluators to apply to the created items */
760
+ evaluators?: EvaluatorItem[];
761
+ executionPolicy?: ExecutionPolicy$1;
759
762
  }
760
763
 
761
764
  /**
@@ -769,6 +772,9 @@ interface CreateDatasetItemsFromTracesRequest {
769
772
  /** Set of trace IDs to add to the dataset */
770
773
  traceIds: string[];
771
774
  enrichmentOptions: TraceEnrichmentOptions;
775
+ /** Optional evaluators to apply to the created items */
776
+ evaluators?: EvaluatorItem[];
777
+ executionPolicy?: ExecutionPolicy$1;
772
778
  }
773
779
 
774
780
  /**
@@ -1530,6 +1536,39 @@ declare const OptimizationUpdateStatus: {
1530
1536
  };
1531
1537
  type OptimizationUpdateStatus = (typeof OptimizationUpdateStatus)[keyof typeof OptimizationUpdateStatus];
1532
1538
 
1539
+ /**
1540
+ * @example
1541
+ * {
1542
+ * runnerName: "runner_name",
1543
+ * hmac: "hmac"
1544
+ * }
1545
+ */
1546
+ interface ActivateRequest {
1547
+ runnerName: string;
1548
+ hmac: string;
1549
+ }
1550
+
1551
+ /**
1552
+ * @example
1553
+ * {
1554
+ * projectId: "project_id",
1555
+ * activationKey: "activation_key",
1556
+ * type: "connect"
1557
+ * }
1558
+ */
1559
+ interface CreateSessionRequest {
1560
+ projectId: string;
1561
+ activationKey: string;
1562
+ ttlSeconds?: number;
1563
+ type: CreateSessionRequestType;
1564
+ }
1565
+
1566
+ declare const CreateSessionRequestType: {
1567
+ readonly Connect: "connect";
1568
+ readonly Endpoint: "endpoint";
1569
+ };
1570
+ type CreateSessionRequestType = (typeof CreateSessionRequestType)[keyof typeof CreateSessionRequestType];
1571
+
1533
1572
  /**
1534
1573
  * @example
1535
1574
  * {}
@@ -2115,6 +2154,7 @@ interface CreateLocalRunnerJobRequest {
2115
2154
  inputs?: JsonNode;
2116
2155
  projectId: string;
2117
2156
  maskId?: string;
2157
+ blueprintName?: string;
2118
2158
  metadata?: LocalRunnerJobMetadata;
2119
2159
  }
2120
2160
 
@@ -2170,18 +2210,6 @@ interface ListRunnersRequest {
2170
2210
  size?: number;
2171
2211
  }
2172
2212
 
2173
- /**
2174
- * @example
2175
- * {
2176
- * pairingCode: "pairing_code",
2177
- * runnerName: "runner_name"
2178
- * }
2179
- */
2180
- interface LocalRunnerConnectRequest {
2181
- pairingCode: string;
2182
- runnerName: string;
2183
- }
2184
-
2185
2213
  /**
2186
2214
  * @example
2187
2215
  * {}
@@ -2203,16 +2231,6 @@ interface LocalRunnerJobResultRequest {
2203
2231
  traceId?: string;
2204
2232
  }
2205
2233
 
2206
- /**
2207
- * @example
2208
- * {
2209
- * projectId: "project_id"
2210
- * }
2211
- */
2212
- interface LocalRunnerPairRequest {
2213
- projectId: string;
2214
- }
2215
-
2216
2234
  /**
2217
2235
  * @example
2218
2236
  * {}
@@ -3259,7 +3277,7 @@ interface AssertionResultCompare {
3259
3277
  }
3260
3278
 
3261
3279
  /**
3262
- * Per-assertion average pass rates for evaluation suite experiments. Null for regular experiments.
3280
+ * Per-assertion average pass rates for test suite experiments. Null for regular experiments.
3263
3281
  */
3264
3282
  interface AssertionScoreAveragePublic {
3265
3283
  name: string;
@@ -3902,6 +3920,11 @@ interface CountValueStatPublic {
3902
3920
  value?: number;
3903
3921
  }
3904
3922
 
3923
+ interface CreateSessionResponse {
3924
+ sessionId?: string;
3925
+ runnerId?: string;
3926
+ }
3927
+
3905
3928
  interface DashboardPagePublic {
3906
3929
  content?: DashboardPublic[];
3907
3930
  page?: number;
@@ -4651,13 +4674,13 @@ interface ExperimentPublic {
4651
4674
  /** ID of the dataset version this experiment is linked to. If not provided at creation, experiment will be automatically linked to the latest version. */
4652
4675
  datasetVersionId?: string;
4653
4676
  datasetVersionSummary?: DatasetVersionSummaryPublic;
4654
- /** Pass rate for evaluation suite experiments (0.0-1.0). Null for regular experiments. */
4677
+ /** Pass rate for test suite experiments (0.0-1.0). Null for regular experiments. */
4655
4678
  passRate?: number;
4656
- /** Number of items that passed for evaluation suite experiments. Null for regular experiments. */
4679
+ /** Number of items that passed for test suite experiments. Null for regular experiments. */
4657
4680
  passedCount?: number;
4658
- /** Total number of items for evaluation suite experiments. Null for regular experiments. */
4681
+ /** Total number of items for test suite experiments. Null for regular experiments. */
4659
4682
  totalCount?: number;
4660
- /** Per-assertion average pass rates for evaluation suite experiments. Null for regular experiments. */
4683
+ /** Per-assertion average pass rates for test suite experiments. Null for regular experiments. */
4661
4684
  assertionScores?: AssertionScoreAveragePublic[];
4662
4685
  }
4663
4686
 
@@ -5302,13 +5325,7 @@ interface LocalRunner {
5302
5325
  agents?: Agent[];
5303
5326
  capabilities?: string[];
5304
5327
  checklist?: JsonNode;
5305
- }
5306
-
5307
- interface LocalRunnerConnectResponse {
5308
- runnerId?: string;
5309
- workspaceId?: string;
5310
- projectId?: string;
5311
- projectName?: string;
5328
+ type?: LocalRunnerType;
5312
5329
  }
5313
5330
 
5314
5331
  interface LocalRunnerHeartbeatResponse {
@@ -5326,6 +5343,7 @@ interface LocalRunnerJob {
5326
5343
  projectId?: string;
5327
5344
  traceId?: string;
5328
5345
  maskId?: string;
5346
+ blueprintName?: string;
5329
5347
  metadata?: LocalRunnerJobMetadata;
5330
5348
  timeout?: number;
5331
5349
  createdAt?: Date;
@@ -5368,12 +5386,6 @@ interface LocalRunnerPage {
5368
5386
  content?: LocalRunner[];
5369
5387
  }
5370
5388
 
5371
- interface LocalRunnerPairResponse {
5372
- pairingCode?: string;
5373
- runnerId?: string;
5374
- expiresInSeconds?: number;
5375
- }
5376
-
5377
5389
  declare const LocalRunnerStatus: {
5378
5390
  readonly Pairing: "pairing";
5379
5391
  readonly Connected: "connected";
@@ -5381,6 +5393,12 @@ declare const LocalRunnerStatus: {
5381
5393
  };
5382
5394
  type LocalRunnerStatus = (typeof LocalRunnerStatus)[keyof typeof LocalRunnerStatus];
5383
5395
 
5396
+ declare const LocalRunnerType: {
5397
+ readonly Connect: "connect";
5398
+ readonly Endpoint: "endpoint";
5399
+ };
5400
+ type LocalRunnerType = (typeof LocalRunnerType)[keyof typeof LocalRunnerType];
5401
+
5384
5402
  interface LogItem {
5385
5403
  timestamp?: Date;
5386
5404
  ruleId?: string;
@@ -6078,7 +6096,9 @@ interface ServiceTogglesConfig {
6078
6096
  customllmProviderEnabled: boolean;
6079
6097
  ollamaProviderEnabled: boolean;
6080
6098
  collaboratorsTabEnabled: boolean;
6099
+ v2WorkspaceAllowlistIds: string[];
6081
6100
  forceWorkspaceVersion: string;
6101
+ v2WorkspaceAllowlist?: string;
6082
6102
  }
6083
6103
 
6084
6104
  interface Span$1 {
@@ -9502,6 +9522,62 @@ declare class OptimizationsClient {
9502
9522
  private __getStudioOptimizationLogs;
9503
9523
  }
9504
9524
 
9525
+ declare namespace PairingClient {
9526
+ type Options = BaseClientOptions;
9527
+ interface RequestOptions extends BaseRequestOptions {
9528
+ }
9529
+ }
9530
+ /**
9531
+ * Pairing sessions for the `opik connect` and `opik endpoint` CLI commands
9532
+ */
9533
+ declare class PairingClient {
9534
+ protected readonly _options: NormalizedClientOptions<PairingClient.Options>;
9535
+ constructor(options?: PairingClient.Options);
9536
+ /**
9537
+ * Verify the activation HMAC and flip the runner row to CONNECTED
9538
+ *
9539
+ * @param {string} sessionId
9540
+ * @param {OpikApi.ActivateRequest} request
9541
+ * @param {PairingClient.RequestOptions} requestOptions - Request-specific configuration.
9542
+ *
9543
+ * @throws {@link OpikApi.ForbiddenError}
9544
+ * @throws {@link OpikApi.NotFoundError}
9545
+ * @throws {@link OpikApi.ConflictError}
9546
+ * @throws {@link OpikApi.UnprocessableEntityError}
9547
+ * @throws {@link OpikApi.TooManyRequestsError}
9548
+ * @throws {@link OpikApi.NotImplementedError}
9549
+ *
9550
+ * @example
9551
+ * await client.pairing.activatePairingSession("sessionId", {
9552
+ * runnerName: "runner_name",
9553
+ * hmac: "hmac"
9554
+ * })
9555
+ */
9556
+ activatePairingSession(sessionId: string, request: ActivateRequest, requestOptions?: PairingClient.RequestOptions): HttpResponsePromise<void>;
9557
+ private __activatePairingSession;
9558
+ /**
9559
+ * Register a short-lived pairing session that a local daemon will later activate via HMAC
9560
+ *
9561
+ * @param {OpikApi.CreateSessionRequest} request
9562
+ * @param {PairingClient.RequestOptions} requestOptions - Request-specific configuration.
9563
+ *
9564
+ * @throws {@link OpikApi.BadRequestError}
9565
+ * @throws {@link OpikApi.NotFoundError}
9566
+ * @throws {@link OpikApi.UnprocessableEntityError}
9567
+ * @throws {@link OpikApi.TooManyRequestsError}
9568
+ * @throws {@link OpikApi.NotImplementedError}
9569
+ *
9570
+ * @example
9571
+ * await client.pairing.createPairingSession({
9572
+ * projectId: "project_id",
9573
+ * activationKey: "activation_key",
9574
+ * type: "connect"
9575
+ * })
9576
+ */
9577
+ createPairingSession(request: CreateSessionRequest, requestOptions?: PairingClient.RequestOptions): HttpResponsePromise<CreateSessionResponse>;
9578
+ private __createPairingSession;
9579
+ }
9580
+
9505
9581
  declare namespace ProjectsClient {
9506
9582
  type Options = BaseClientOptions;
9507
9583
  interface RequestOptions extends BaseRequestOptions {
@@ -10196,23 +10272,6 @@ declare class RunnersClient {
10196
10272
  */
10197
10273
  cancelJob(jobId: string, request?: CancelJobRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<void>;
10198
10274
  private __cancelJob;
10199
- /**
10200
- * Exchange a pairing code or API key for local runner credentials
10201
- *
10202
- * @param {OpikApi.LocalRunnerConnectRequest} request
10203
- * @param {RunnersClient.RequestOptions} requestOptions - Request-specific configuration.
10204
- *
10205
- * @throws {@link OpikApi.BadRequestError}
10206
- * @throws {@link OpikApi.NotFoundError}
10207
- *
10208
- * @example
10209
- * await client.runners.connectRunner({
10210
- * pairingCode: "pairing_code",
10211
- * runnerName: "runner_name"
10212
- * })
10213
- */
10214
- connectRunner(request: LocalRunnerConnectRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<LocalRunnerConnectResponse>;
10215
- private __connectRunner;
10216
10275
  /**
10217
10276
  * Submit a bridge command for execution by the local daemon
10218
10277
  *
@@ -10251,21 +10310,6 @@ declare class RunnersClient {
10251
10310
  */
10252
10311
  createJob(request: CreateLocalRunnerJobRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<void>;
10253
10312
  private __createJob;
10254
- /**
10255
- * Generate a pairing code for a local runner in the current workspace
10256
- *
10257
- * @param {OpikApi.LocalRunnerPairRequest} request
10258
- * @param {RunnersClient.RequestOptions} requestOptions - Request-specific configuration.
10259
- *
10260
- * @throws {@link OpikApi.NotFoundError}
10261
- *
10262
- * @example
10263
- * await client.runners.generatePairingCode({
10264
- * projectId: "project_id"
10265
- * })
10266
- */
10267
- generatePairingCode(request: LocalRunnerPairRequest, requestOptions?: RunnersClient.RequestOptions): HttpResponsePromise<LocalRunnerPairResponse>;
10268
- private __generatePairingCode;
10269
10313
  /**
10270
10314
  * Get bridge command status, optionally long-polling for completion
10271
10315
  *
@@ -11456,10 +11500,11 @@ declare class WorkspacesClient {
11456
11500
  * determination, clients must never derive the version themselves.
11457
11501
  *
11458
11502
  * Determination logic (priority order):
11459
- * 1) Feature flag override (TOGGLE_FORCE_WORKSPACE_VERSION)
11460
- * 2) Auth one-way V2 gate (authenticated mode only)
11461
- * 3) Version 1 entity check (entities without project_id)
11462
- * 4) Fallback on failure
11503
+ * 1) V2 workspace allowlist (TOGGLE_V2_WORKSPACE_ALLOWLIST)
11504
+ * 2) Feature flag override (TOGGLE_FORCE_WORKSPACE_VERSION)
11505
+ * 3) Auth one-way V2 gate (authenticated mode only)
11506
+ * 4) Version 1 entity check (entities without project_id)
11507
+ * 5) Fallback on failure
11463
11508
  *
11464
11509
  * In unauthenticated mode (authentication.enabled=false), auth steps are skipped.
11465
11510
  * Called by the frontend on workspace load.
@@ -11518,6 +11563,7 @@ declare class OpikApiClient {
11518
11563
  protected _ollieState: OllieStateClient | undefined;
11519
11564
  protected _openTelemetryIngestion: OpenTelemetryIngestionClient | undefined;
11520
11565
  protected _optimizations: OptimizationsClient | undefined;
11566
+ protected _pairing: PairingClient | undefined;
11521
11567
  protected _projects: ProjectsClient | undefined;
11522
11568
  protected _prompts: PromptsClient | undefined;
11523
11569
  protected _retentionRules: RetentionRulesClient | undefined;
@@ -11551,6 +11597,7 @@ declare class OpikApiClient {
11551
11597
  get ollieState(): OllieStateClient;
11552
11598
  get openTelemetryIngestion(): OpenTelemetryIngestionClient;
11553
11599
  get optimizations(): OptimizationsClient;
11600
+ get pairing(): PairingClient;
11554
11601
  get projects(): ProjectsClient;
11555
11602
  get prompts(): PromptsClient;
11556
11603
  get retentionRules(): RetentionRulesClient;
@@ -15793,7 +15840,11 @@ declare class AgentConfigManager {
15793
15840
  tagBlueprintWithEnv(blueprintId: string, env: string): Promise<void>;
15794
15841
  }
15795
15842
 
15796
- declare function agentConfigContext<T>(maskId: string, fn: () => T | Promise<T>): T | Promise<T>;
15843
+ interface ConfigContext {
15844
+ maskId?: string;
15845
+ blueprintName?: string;
15846
+ }
15847
+ declare function agentConfigContext<T>(context: ConfigContext, fn: () => T | Promise<T>): T | Promise<T>;
15797
15848
 
15798
15849
  declare function activateRunner(): void;
15799
15850