@thinkai/tai-api-contract 2.243.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;
@@ -14135,6 +14187,11 @@ export interface components {
14135
14187
  focusWikiRepoId?: string;
14136
14188
  /** @description When true the server replies with `text/event-stream` (`stage`, `token`, `done`, `error` events). The `done` event carries the same JSON as the non-streaming 200 body. */
14137
14189
  stream?: boolean;
14190
+ /**
14191
+ * Format: uuid
14192
+ * @description Resume a soft-stopped investigate turn on a fresh stream (no new user message). Value is the `continueAsk` id from a prior `done` payload. Expired or mismatched ids return `409` `continue_expired`.
14193
+ */
14194
+ continueAsk?: string;
14138
14195
  };
14139
14196
  CodeChatUploadAttachmentBodyDto: {
14140
14197
  filename: string;
@@ -14173,6 +14230,11 @@ export interface components {
14173
14230
  skillId?: "chat-api-detail" | "chat-architecture" | "chat-tests" | "chat-contracts" | "chat-cicd" | "chat-stack" | "chat-platform" | "chat-workspace" | "chat-product" | "chat-pr-review" | "chat-wiki";
14174
14231
  /** @description Short customer-safe summary when mode is failed. Shown in the reply body; raw provider detail is only in providerFailures / debug marker. */
14175
14232
  userMessage?: string;
14233
+ /**
14234
+ * Format: uuid
14235
+ * @description When set, the client should open one fresh stream with body `continueAsk` set to this id (same thread, no new user turn) so investigate can finish under a new synthesis budget. Omitted when no continue is needed.
14236
+ */
14237
+ continueAsk?: string;
14176
14238
  /** @description Structured provider failures for Conversations ⓘ hover (primary first). Also embedded in content as `<!-- code-intel-debug:{...} -->` for reload. */
14177
14239
  providerFailures?: {
14178
14240
  /** @enum {string} */
@@ -16453,6 +16515,10 @@ export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
16453
16515
  export type AutomationCostOperationDto = components['schemas']['AutomationCostOperationDto'];
16454
16516
  export type AutomationCostSummaryRowDto = components['schemas']['AutomationCostSummaryRowDto'];
16455
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'];
16456
16522
  export type PlatformEcgSpendBucketDto = components['schemas']['PlatformEcgSpendBucketDto'];
16457
16523
  export type PlatformEcgSpendSummaryDto = components['schemas']['PlatformEcgSpendSummaryDto'];
16458
16524
  export type AutomationCostSummaryDto = components['schemas']['AutomationCostSummaryDto'];
@@ -18708,6 +18774,65 @@ export interface operations {
18708
18774
  };
18709
18775
  };
18710
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
+ };
18711
18836
  adminGetPlatformBanner: {
18712
18837
  parameters: {
18713
18838
  query?: never;
@@ -29433,7 +29558,7 @@ export interface operations {
29433
29558
  "application/json": components["schemas"]["ErrorMessageDto"];
29434
29559
  };
29435
29560
  };
29436
- /** @description Chat not ready, or no ready corpus in thread scope */
29561
+ /** @description Chat not ready, no ready corpus in thread scope, or `continueAsk` expired / mismatched (`continue_expired`). */
29437
29562
  409: {
29438
29563
  headers: {
29439
29564
  [name: string]: unknown;