@thinkai/tai-api-contract 2.244.0 → 2.245.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.
@@ -566,6 +566,26 @@ export interface paths {
566
566
  patch?: never;
567
567
  trace?: never;
568
568
  };
569
+ "/admin/productivity-workers": {
570
+ parameters: {
571
+ query?: never;
572
+ header?: never;
573
+ path?: never;
574
+ cookie?: never;
575
+ };
576
+ /**
577
+ * Active productivity ingest worker lanes
578
+ * @description Platform admins only. Lists workers currently holding leased rows in `tai_productivity_ingest_work_units` (productivity ingest ledger). One lane per `(worker_id, kind, workspace, install, week)` pack. `elapsedSeconds` is computed server-side from the earliest `leased_at` in the pack relative to `polledAt`. Requires Bearer JWT from an email on `PLATFORM_ADMIN_EMAILS`.
579
+ */
580
+ get: operations["adminGetProductivityWorkers"];
581
+ put?: never;
582
+ post?: never;
583
+ delete?: never;
584
+ options?: never;
585
+ head?: never;
586
+ patch?: never;
587
+ trace?: never;
588
+ };
569
589
  "/admin/platform/banner": {
570
590
  parameters: {
571
591
  query?: never;
@@ -13247,6 +13267,38 @@ export interface components {
13247
13267
  estimatedSpendCents: number;
13248
13268
  invocationCount: number;
13249
13269
  };
13270
+ /** @enum {string} */
13271
+ ProductivityWorkLedgerKindDto: "backfill_historical" | "incremental" | "ci_gap" | "week_rewrite";
13272
+ AdminProductivityWorkerCurrentLeaseDto: {
13273
+ kind: components["schemas"]["ProductivityWorkLedgerKindDto"];
13274
+ /** Format: uuid */
13275
+ workspaceId: string;
13276
+ workspaceSlug: string;
13277
+ /** Format: uuid */
13278
+ vcsConnectionId: string;
13279
+ /** @description Display label for the VCS install (e.g. github.com/org). */
13280
+ installLabel: string;
13281
+ /**
13282
+ * Format: date
13283
+ * @description UTC week Monday for the leased pack.
13284
+ */
13285
+ weekBucketStart: string;
13286
+ repoCount: number;
13287
+ };
13288
+ AdminProductivityWorkerLaneDto: {
13289
+ workerId: string;
13290
+ elapsedSeconds: number;
13291
+ /** Format: date-time */
13292
+ leasedAt: string;
13293
+ /** Format: date-time */
13294
+ leaseExpiresAt?: string | null;
13295
+ current: components["schemas"]["AdminProductivityWorkerCurrentLeaseDto"];
13296
+ };
13297
+ AdminProductivityWorkersResponseDto: {
13298
+ lanes: components["schemas"]["AdminProductivityWorkerLaneDto"][];
13299
+ /** Format: date-time */
13300
+ polledAt: string;
13301
+ };
13250
13302
  PlatformEcgSpendBucketDto: {
13251
13303
  /** Format: int64 */
13252
13304
  calls: number;
@@ -16463,6 +16515,10 @@ export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
16463
16515
  export type AutomationCostOperationDto = components['schemas']['AutomationCostOperationDto'];
16464
16516
  export type AutomationCostSummaryRowDto = components['schemas']['AutomationCostSummaryRowDto'];
16465
16517
  export type AutomationCostSummaryTotalsDto = components['schemas']['AutomationCostSummaryTotalsDto'];
16518
+ export type ProductivityWorkLedgerKindDto = components['schemas']['ProductivityWorkLedgerKindDto'];
16519
+ export type AdminProductivityWorkerCurrentLeaseDto = components['schemas']['AdminProductivityWorkerCurrentLeaseDto'];
16520
+ export type AdminProductivityWorkerLaneDto = components['schemas']['AdminProductivityWorkerLaneDto'];
16521
+ export type AdminProductivityWorkersResponseDto = components['schemas']['AdminProductivityWorkersResponseDto'];
16466
16522
  export type PlatformEcgSpendBucketDto = components['schemas']['PlatformEcgSpendBucketDto'];
16467
16523
  export type PlatformEcgSpendSummaryDto = components['schemas']['PlatformEcgSpendSummaryDto'];
16468
16524
  export type AutomationCostSummaryDto = components['schemas']['AutomationCostSummaryDto'];
@@ -18718,6 +18774,65 @@ export interface operations {
18718
18774
  };
18719
18775
  };
18720
18776
  };
18777
+ adminGetProductivityWorkers: {
18778
+ parameters: {
18779
+ query?: never;
18780
+ header?: never;
18781
+ path?: never;
18782
+ cookie?: never;
18783
+ };
18784
+ requestBody?: never;
18785
+ responses: {
18786
+ /** @description Active lanes (empty list when no leases). */
18787
+ 200: {
18788
+ headers: {
18789
+ [name: string]: unknown;
18790
+ };
18791
+ content: {
18792
+ "application/json": components["schemas"]["AdminProductivityWorkersResponseDto"];
18793
+ };
18794
+ };
18795
+ /** @description Missing or invalid JWT. */
18796
+ 401: {
18797
+ headers: {
18798
+ [name: string]: unknown;
18799
+ };
18800
+ content: {
18801
+ "application/json": components["schemas"]["ErrorMessageDto"];
18802
+ };
18803
+ };
18804
+ /** @description Caller is not a platform admin. */
18805
+ 403: {
18806
+ headers: {
18807
+ [name: string]: unknown;
18808
+ };
18809
+ content: {
18810
+ /**
18811
+ * @example {
18812
+ * "error": "Forbidden",
18813
+ * "code": "forbidden"
18814
+ * }
18815
+ */
18816
+ "application/json": components["schemas"]["ErrorMessageDto"];
18817
+ };
18818
+ };
18819
+ /** @description Batch database (`READINESS_DATABASE_URL`) is not configured on this API instance. */
18820
+ 503: {
18821
+ headers: {
18822
+ [name: string]: unknown;
18823
+ };
18824
+ content: {
18825
+ /**
18826
+ * @example {
18827
+ * "error": "Batch database unavailable",
18828
+ * "code": "batch_database_unavailable"
18829
+ * }
18830
+ */
18831
+ "application/json": components["schemas"]["ErrorMessageDto"];
18832
+ };
18833
+ };
18834
+ };
18835
+ };
18721
18836
  adminGetPlatformBanner: {
18722
18837
  parameters: {
18723
18838
  query?: never;