@vibexp/api-client 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -1322,35 +1322,6 @@ export interface paths {
1322
1322
  patch?: never;
1323
1323
  trace?: never;
1324
1324
  };
1325
- "/bo/v1/embeddings/backfill": {
1326
- parameters: {
1327
- query?: never;
1328
- header?: never;
1329
- path?: never;
1330
- cookie?: never;
1331
- };
1332
- get?: never;
1333
- put?: never;
1334
- /**
1335
- * Regenerate embeddings
1336
- * @description Republishes the `.created` event for embeddable entities (prompts,
1337
- * artifacts, memories, blueprints, and feed items) so the embedding pipeline
1338
- * regenerates vectors under the currently configured embedding model. This is
1339
- * the operational step after an embedding model or dimension change. The
1340
- * operation is idempotent (the pipeline uses delete-then-insert per entity).
1341
- *
1342
- * The scope is explicit: the request body must set exactly one of `all` or a
1343
- * non-empty `entity_types`. Set `missing_only` to limit the run to entities
1344
- * that lack an embedding for the configured model. This endpoint is for
1345
- * administrative purposes only and requires the back office admin API key.
1346
- */
1347
- post: operations["backfillEmbeddings"];
1348
- delete?: never;
1349
- options?: never;
1350
- head?: never;
1351
- patch?: never;
1352
- trace?: never;
1353
- };
1354
1325
  "/api/v1/{team_id}/integrations/github/status": {
1355
1326
  parameters: {
1356
1327
  query?: never;
@@ -2708,6 +2679,34 @@ export interface paths {
2708
2679
  patch?: never;
2709
2680
  trace?: never;
2710
2681
  };
2682
+ "/api/v1/{team_id}/embedding-providers/coverage": {
2683
+ parameters: {
2684
+ query?: never;
2685
+ header?: never;
2686
+ path: {
2687
+ /** @description Team whose embedding coverage is reported. */
2688
+ team_id: string;
2689
+ };
2690
+ cookie?: never;
2691
+ };
2692
+ /**
2693
+ * Get embedding coverage
2694
+ * @description Returns derived, team-scoped embedding coverage per entity type under the
2695
+ * team's active provider model: how many entities exist (`total`), how many
2696
+ * have an embedding (`embedded`), how many are still pending, and the
2697
+ * embedded percentage. Counts are computed from existing rows — there is no
2698
+ * per-entity state. When the team has no active provider, the response
2699
+ * reports every type as all-pending (0%) rather than an error.
2700
+ */
2701
+ get: operations["getEmbeddingCoverage"];
2702
+ put?: never;
2703
+ post?: never;
2704
+ delete?: never;
2705
+ options?: never;
2706
+ head?: never;
2707
+ patch?: never;
2708
+ trace?: never;
2709
+ };
2711
2710
  "/api/v1/{team_id}/embedding-providers/{id}": {
2712
2711
  parameters: {
2713
2712
  query?: never;
@@ -2745,6 +2744,40 @@ export interface paths {
2745
2744
  patch?: never;
2746
2745
  trace?: never;
2747
2746
  };
2747
+ "/api/v1/{team_id}/embedding-providers/{id}/reprocess": {
2748
+ parameters: {
2749
+ query?: never;
2750
+ header?: never;
2751
+ path: {
2752
+ /** @description Team that owns the embedding provider(s). */
2753
+ team_id: string;
2754
+ };
2755
+ cookie?: never;
2756
+ };
2757
+ get?: never;
2758
+ put?: never;
2759
+ /**
2760
+ * Reprocess missing embeddings
2761
+ * @description Re-drives embedding generation for the team's entities that are still
2762
+ * missing an embedding, through the concurrency-bounded embedding path so a
2763
+ * large run never fans out beyond the provider's configured concurrency. It
2764
+ * is the sanctioned replacement for the removed back-office backfill
2765
+ * endpoint.
2766
+ *
2767
+ * The provider `{id}` is validated and authorized, but the work is
2768
+ * team-scoped: an embedding provider is per-team, so reprocess enqueues the
2769
+ * team's entity set (generated via the team's active provider). It returns
2770
+ * 202 immediately and runs in the background; generation is idempotent
2771
+ * (delete-then-insert per entity) and a per-team in-flight guard makes
2772
+ * repeat calls safe (no double fan-out).
2773
+ */
2774
+ post: operations["reprocessEmbeddingProvider"];
2775
+ delete?: never;
2776
+ options?: never;
2777
+ head?: never;
2778
+ patch?: never;
2779
+ trace?: never;
2780
+ };
2748
2781
  "/api/v1/{team_id}/embedding-providers/validate": {
2749
2782
  parameters: {
2750
2783
  query?: never;
@@ -2803,6 +2836,31 @@ export interface paths {
2803
2836
  patch?: never;
2804
2837
  trace?: never;
2805
2838
  };
2839
+ "/api/v1/{team_id}/settings/embedding-providers/coverage": {
2840
+ parameters: {
2841
+ query?: never;
2842
+ header?: never;
2843
+ path: {
2844
+ /** @description Team whose embedding coverage is reported. */
2845
+ team_id: string;
2846
+ };
2847
+ cookie?: never;
2848
+ };
2849
+ /**
2850
+ * Get embedding coverage (Settings)
2851
+ * @description Returns derived, team-scoped embedding coverage per entity type under the
2852
+ * team's active provider model (settings route). See `getEmbeddingCoverage`
2853
+ * for the payload semantics.
2854
+ */
2855
+ get: operations["getEmbeddingCoverageSettings"];
2856
+ put?: never;
2857
+ post?: never;
2858
+ delete?: never;
2859
+ options?: never;
2860
+ head?: never;
2861
+ patch?: never;
2862
+ trace?: never;
2863
+ };
2806
2864
  "/api/v1/{team_id}/settings/embedding-providers/{id}": {
2807
2865
  parameters: {
2808
2866
  query?: never;
@@ -2841,6 +2899,35 @@ export interface paths {
2841
2899
  patch?: never;
2842
2900
  trace?: never;
2843
2901
  };
2902
+ "/api/v1/{team_id}/settings/embedding-providers/{id}/reprocess": {
2903
+ parameters: {
2904
+ query?: never;
2905
+ header?: never;
2906
+ path: {
2907
+ /** @description Team that owns the embedding provider(s). */
2908
+ team_id: string;
2909
+ };
2910
+ cookie?: never;
2911
+ };
2912
+ get?: never;
2913
+ put?: never;
2914
+ /**
2915
+ * Reprocess missing embeddings (Settings)
2916
+ * @description Re-drives embedding generation for the team's entities that are still
2917
+ * missing an embedding, through the concurrency-bounded embedding path
2918
+ * (settings route). The provider `{id}` is validated and authorized, but the
2919
+ * work is team-scoped: an embedding provider is per-team, so reprocess
2920
+ * enqueues the team's entity set. It returns 202 immediately and runs in the
2921
+ * background; generation is idempotent and a per-team in-flight guard makes
2922
+ * repeat calls safe.
2923
+ */
2924
+ post: operations["reprocessEmbeddingProviderSettings"];
2925
+ delete?: never;
2926
+ options?: never;
2927
+ head?: never;
2928
+ patch?: never;
2929
+ trace?: never;
2930
+ };
2844
2931
  "/api/v1/{team_id}/settings/embedding-providers/validate": {
2845
2932
  parameters: {
2846
2933
  query?: never;
@@ -4108,6 +4195,11 @@ export interface components {
4108
4195
  * @example 200
4109
4196
  */
4110
4197
  chunk_overlap: number;
4198
+ /**
4199
+ * @description Maximum number of simultaneous embedding requests VibeXP issues to this provider. Keep at 1 for single-threaded providers.
4200
+ * @example 1
4201
+ */
4202
+ concurrency: number;
4111
4203
  /** @example false */
4112
4204
  is_default: boolean;
4113
4205
  /**
@@ -4152,6 +4244,11 @@ export interface components {
4152
4244
  * @example 200
4153
4245
  */
4154
4246
  chunk_overlap?: number;
4247
+ /**
4248
+ * @description Optional max simultaneous embedding requests to this provider; defaults to 1 when omitted.
4249
+ * @example 1
4250
+ */
4251
+ concurrency?: number;
4155
4252
  /** @example false */
4156
4253
  is_default?: boolean;
4157
4254
  /**
@@ -4170,6 +4267,7 @@ export interface components {
4170
4267
  model?: string;
4171
4268
  chunk_size?: number;
4172
4269
  chunk_overlap?: number;
4270
+ concurrency?: number;
4173
4271
  is_default?: boolean;
4174
4272
  /** Format: uri */
4175
4273
  base_url?: string;
@@ -4222,6 +4320,53 @@ export interface components {
4222
4320
  error_details?: string;
4223
4321
  };
4224
4322
  };
4323
+ /** @description Embedding coverage for a single entity type: how many entities exist, how many have an embedding under the team's active model, how many are still pending, and the embedded percentage. */
4324
+ EmbeddingCoverageItem: {
4325
+ /**
4326
+ * @description The embeddable entity type this row reports on.
4327
+ * @example prompt
4328
+ * @enum {string}
4329
+ */
4330
+ entity_type: "prompt" | "artifact" | "memory" | "blueprint" | "feed_item";
4331
+ /**
4332
+ * Format: int64
4333
+ * @description Total embeddable entities of this type owned by the team.
4334
+ * @example 120
4335
+ */
4336
+ total: number;
4337
+ /**
4338
+ * Format: int64
4339
+ * @description Entities of this type that already have an embedding under the team's active model.
4340
+ * @example 90
4341
+ */
4342
+ embedded: number;
4343
+ /**
4344
+ * Format: int64
4345
+ * @description Entities still missing an embedding (total − embedded).
4346
+ * @example 30
4347
+ */
4348
+ pending: number;
4349
+ /**
4350
+ * @description Rounded percentage of entities embedded (embedded / total * 100); 0 when there are no entities of this type.
4351
+ * @example 75
4352
+ */
4353
+ embedded_percent: number;
4354
+ };
4355
+ /** @description Derived, team-scoped embedding coverage per entity type under the team's active provider model. Counts are computed from existing rows (no per-entity state); a non-decreasing pending count is the signal that embedding is stuck. When the team has no active provider, has_active_provider is false, active_model is null, and every type reports all entities as pending (0%). */
4356
+ EmbeddingCoverageResponse: {
4357
+ /**
4358
+ * @description Whether the team has an active embedding provider configured.
4359
+ * @example true
4360
+ */
4361
+ has_active_provider: boolean;
4362
+ /**
4363
+ * @description The active provider's embedding model the embedded counts are measured against, or null when no provider is configured.
4364
+ * @example text-embedding-3-small
4365
+ */
4366
+ active_model: string | null;
4367
+ /** @description One entry per embeddable entity type, in a stable order. */
4368
+ coverage: components["schemas"]["EmbeddingCoverageItem"][];
4369
+ };
4225
4370
  ResourceUsageItem: {
4226
4371
  /**
4227
4372
  * @description Type of resource (e.g., prompt, memory, artifact)
@@ -6117,63 +6262,6 @@ export interface components {
6117
6262
  /** @description Total number of agent executions run by user */
6118
6263
  total_agent_executions_run?: number;
6119
6264
  };
6120
- /** @description Configuration for an embedding backfill run. The scope is explicit: set exactly one of `all` or a non-empty `entity_types`. Sending neither, or both, is rejected with a 400. */
6121
- EmbeddingBackfillRequest: {
6122
- /**
6123
- * @description Backfill every supported entity type. Mutually exclusive with `entity_types`.
6124
- * @default false
6125
- */
6126
- all: boolean;
6127
- /**
6128
- * @description Restrict the run to these entity types. Mutually exclusive with `all`.
6129
- * @example [
6130
- * "prompt",
6131
- * "artifact"
6132
- * ]
6133
- */
6134
- entity_types?: ("prompt" | "artifact" | "memory" | "blueprint" | "feed_item")[];
6135
- /**
6136
- * @description When true, only publish for entities that do not already have an embedding for the currently configured model. Honored by `dry_run`.
6137
- * @default false
6138
- */
6139
- missing_only: boolean;
6140
- /**
6141
- * @description When true, count the entities that would be republished without publishing any event.
6142
- * @default false
6143
- */
6144
- dry_run: boolean;
6145
- };
6146
- /** @description Per-entity-type outcome of a backfill run. */
6147
- EmbeddingBackfillTypeResult: {
6148
- /** @example prompt */
6149
- entity_type: string;
6150
- /**
6151
- * @description Number of source entities seen for this type.
6152
- * @example 42
6153
- */
6154
- total: number;
6155
- /**
6156
- * @description Number of `.created` events successfully republished (0 on a dry run).
6157
- * @example 42
6158
- */
6159
- published: number;
6160
- /**
6161
- * @description Number of entities whose event publish failed (log-and-continue).
6162
- * @example 0
6163
- */
6164
- failed: number;
6165
- };
6166
- /** @description Aggregated result of an embedding backfill run. */
6167
- EmbeddingBackfillResult: {
6168
- dry_run: boolean;
6169
- results: components["schemas"]["EmbeddingBackfillTypeResult"][];
6170
- /** @example 42 */
6171
- total_seen: number;
6172
- /** @example 42 */
6173
- total_published: number;
6174
- /** @example 0 */
6175
- total_failed: number;
6176
- };
6177
6265
  /** @description Usage and growth data response */
6178
6266
  UsageAndGrowthResponse: {
6179
6267
  /** @description Weekly usage metrics */
@@ -12023,57 +12111,6 @@ export interface operations {
12023
12111
  };
12024
12112
  };
12025
12113
  };
12026
- backfillEmbeddings: {
12027
- parameters: {
12028
- query?: never;
12029
- header?: never;
12030
- path?: never;
12031
- cookie?: never;
12032
- };
12033
- requestBody: {
12034
- content: {
12035
- "application/json": components["schemas"]["EmbeddingBackfillRequest"];
12036
- };
12037
- };
12038
- responses: {
12039
- /** @description Backfill completed; per-entity-type and aggregate counts returned. */
12040
- 200: {
12041
- headers: {
12042
- [name: string]: unknown;
12043
- };
12044
- content: {
12045
- "application/json": components["schemas"]["EmbeddingBackfillResult"];
12046
- };
12047
- };
12048
- /** @description Invalid request body, no scope (`all` and `entity_types` both empty), an ambiguous scope (both `all` and `entity_types` set), or an unsupported entity type was requested. */
12049
- 400: {
12050
- headers: {
12051
- [name: string]: unknown;
12052
- };
12053
- content: {
12054
- "application/problem+json": components["schemas"]["ErrorResponse"];
12055
- };
12056
- };
12057
- /** @description Unauthorized - Missing or invalid back office admin API key */
12058
- 401: {
12059
- headers: {
12060
- [name: string]: unknown;
12061
- };
12062
- content: {
12063
- "application/problem+json": components["schemas"]["ErrorResponse"];
12064
- };
12065
- };
12066
- /** @description Internal server error */
12067
- 500: {
12068
- headers: {
12069
- [name: string]: unknown;
12070
- };
12071
- content: {
12072
- "application/problem+json": components["schemas"]["ErrorResponse"];
12073
- };
12074
- };
12075
- };
12076
- };
12077
12114
  getGitHubStatus: {
12078
12115
  parameters: {
12079
12116
  query?: never;
@@ -16985,6 +17022,47 @@ export interface operations {
16985
17022
  };
16986
17023
  };
16987
17024
  };
17025
+ getEmbeddingCoverage: {
17026
+ parameters: {
17027
+ query?: never;
17028
+ header?: never;
17029
+ path: {
17030
+ /** @description Team whose embedding coverage is reported. */
17031
+ team_id: string;
17032
+ };
17033
+ cookie?: never;
17034
+ };
17035
+ requestBody?: never;
17036
+ responses: {
17037
+ /** @description Embedding coverage retrieved successfully */
17038
+ 200: {
17039
+ headers: {
17040
+ [name: string]: unknown;
17041
+ };
17042
+ content: {
17043
+ "application/json": components["schemas"]["EmbeddingCoverageResponse"];
17044
+ };
17045
+ };
17046
+ /** @description Unauthorized */
17047
+ 401: {
17048
+ headers: {
17049
+ [name: string]: unknown;
17050
+ };
17051
+ content: {
17052
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17053
+ };
17054
+ };
17055
+ /** @description Failed to retrieve embedding coverage (`DATABASE_ERROR`) */
17056
+ 500: {
17057
+ headers: {
17058
+ [name: string]: unknown;
17059
+ };
17060
+ content: {
17061
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17062
+ };
17063
+ };
17064
+ };
17065
+ };
16988
17066
  getEmbeddingProvider: {
16989
17067
  parameters: {
16990
17068
  query?: never;
@@ -17161,6 +17239,58 @@ export interface operations {
17161
17239
  };
17162
17240
  };
17163
17241
  };
17242
+ reprocessEmbeddingProvider: {
17243
+ parameters: {
17244
+ query?: never;
17245
+ header?: never;
17246
+ path: {
17247
+ /** @description Team that owns the embedding provider(s). */
17248
+ team_id: string;
17249
+ /** @description Embedding provider ID */
17250
+ id: string;
17251
+ };
17252
+ cookie?: never;
17253
+ };
17254
+ requestBody?: never;
17255
+ responses: {
17256
+ /** @description Reprocess accepted; embeddings are regenerated in the background. */
17257
+ 202: {
17258
+ headers: {
17259
+ [name: string]: unknown;
17260
+ };
17261
+ content: {
17262
+ "application/json": components["schemas"]["SuccessResponse"];
17263
+ };
17264
+ };
17265
+ /** @description Unauthorized */
17266
+ 401: {
17267
+ headers: {
17268
+ [name: string]: unknown;
17269
+ };
17270
+ content: {
17271
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17272
+ };
17273
+ };
17274
+ /** @description Embedding provider not found (`PROVIDER_NOT_FOUND`) */
17275
+ 404: {
17276
+ headers: {
17277
+ [name: string]: unknown;
17278
+ };
17279
+ content: {
17280
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17281
+ };
17282
+ };
17283
+ /** @description Failed to load the provider before reprocess (`DATABASE_ERROR`) */
17284
+ 500: {
17285
+ headers: {
17286
+ [name: string]: unknown;
17287
+ };
17288
+ content: {
17289
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17290
+ };
17291
+ };
17292
+ };
17293
+ };
17164
17294
  validateEmbeddingProvider: {
17165
17295
  parameters: {
17166
17296
  query?: never;
@@ -17319,6 +17449,47 @@ export interface operations {
17319
17449
  };
17320
17450
  };
17321
17451
  };
17452
+ getEmbeddingCoverageSettings: {
17453
+ parameters: {
17454
+ query?: never;
17455
+ header?: never;
17456
+ path: {
17457
+ /** @description Team whose embedding coverage is reported. */
17458
+ team_id: string;
17459
+ };
17460
+ cookie?: never;
17461
+ };
17462
+ requestBody?: never;
17463
+ responses: {
17464
+ /** @description Embedding coverage retrieved successfully */
17465
+ 200: {
17466
+ headers: {
17467
+ [name: string]: unknown;
17468
+ };
17469
+ content: {
17470
+ "application/json": components["schemas"]["EmbeddingCoverageResponse"];
17471
+ };
17472
+ };
17473
+ /** @description Unauthorized */
17474
+ 401: {
17475
+ headers: {
17476
+ [name: string]: unknown;
17477
+ };
17478
+ content: {
17479
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17480
+ };
17481
+ };
17482
+ /** @description Failed to retrieve embedding coverage (`DATABASE_ERROR`) */
17483
+ 500: {
17484
+ headers: {
17485
+ [name: string]: unknown;
17486
+ };
17487
+ content: {
17488
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17489
+ };
17490
+ };
17491
+ };
17492
+ };
17322
17493
  getEmbeddingProviderSettings: {
17323
17494
  parameters: {
17324
17495
  query?: never;
@@ -17495,6 +17666,58 @@ export interface operations {
17495
17666
  };
17496
17667
  };
17497
17668
  };
17669
+ reprocessEmbeddingProviderSettings: {
17670
+ parameters: {
17671
+ query?: never;
17672
+ header?: never;
17673
+ path: {
17674
+ /** @description Team that owns the embedding provider(s). */
17675
+ team_id: string;
17676
+ /** @description Embedding provider ID */
17677
+ id: string;
17678
+ };
17679
+ cookie?: never;
17680
+ };
17681
+ requestBody?: never;
17682
+ responses: {
17683
+ /** @description Reprocess accepted; embeddings are regenerated in the background. */
17684
+ 202: {
17685
+ headers: {
17686
+ [name: string]: unknown;
17687
+ };
17688
+ content: {
17689
+ "application/json": components["schemas"]["SuccessResponse"];
17690
+ };
17691
+ };
17692
+ /** @description Unauthorized */
17693
+ 401: {
17694
+ headers: {
17695
+ [name: string]: unknown;
17696
+ };
17697
+ content: {
17698
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17699
+ };
17700
+ };
17701
+ /** @description Embedding provider not found (`PROVIDER_NOT_FOUND`) */
17702
+ 404: {
17703
+ headers: {
17704
+ [name: string]: unknown;
17705
+ };
17706
+ content: {
17707
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17708
+ };
17709
+ };
17710
+ /** @description Failed to load the provider before reprocess (`DATABASE_ERROR`) */
17711
+ 500: {
17712
+ headers: {
17713
+ [name: string]: unknown;
17714
+ };
17715
+ content: {
17716
+ "application/problem+json": components["schemas"]["ErrorResponse"];
17717
+ };
17718
+ };
17719
+ };
17720
+ };
17498
17721
  validateEmbeddingProviderSettings: {
17499
17722
  parameters: {
17500
17723
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Typed VibeXP API client generated from the OpenAPI spec (openapi-fetch main entrypoint, axios SDK at ./axios)",
5
5
  "license": "MIT",
6
6
  "repository": {