@thinkai/tai-api-contract 2.199.0 → 2.201.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.
@@ -942,6 +942,30 @@ export interface paths {
942
942
  patch?: never;
943
943
  trace?: never;
944
944
  };
945
+ "/workspaces/{workspaceId}/agentic-foundation/dimension-targets": {
946
+ parameters: {
947
+ query?: never;
948
+ header?: never;
949
+ path?: never;
950
+ cookie?: never;
951
+ };
952
+ /**
953
+ * Get Agentic Foundation dimension targets
954
+ * @description Workspace target percent per readiness dimension, plus optional per-repository overrides. Omitted targets mean 100. A repository override may disable scoring for a dimension and set its own target. Empty object means every dimension is scored at 100. Member-level read access.
955
+ */
956
+ get: operations["getWorkspaceDimensionTargets"];
957
+ /**
958
+ * Set Agentic Foundation dimension targets
959
+ * @description Full-replace workspace dimension targets and repository overrides. Omit a target or send 100 to keep the default. `PUT {}` or `null` clears overrides so every dimension is scored at 100. Repository ids must be in Agentic Foundation scan scope. Requires workspace **admin**.
960
+ */
961
+ put: operations["putWorkspaceDimensionTargets"];
962
+ post?: never;
963
+ delete?: never;
964
+ options?: never;
965
+ head?: never;
966
+ patch?: never;
967
+ trace?: never;
968
+ };
945
969
  "/workspaces/{workspaceId}/sources": {
946
970
  parameters: {
947
971
  query?: never;
@@ -5215,7 +5239,7 @@ export interface paths {
5215
5239
  };
5216
5240
  /**
5217
5241
  * Ingest / backfill data coverage
5218
- * @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub, AI usage/spend per provider, SDLC components, monitoring, HRIS). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Every pipeline includes always-present `dataTrust` (`status` + `verificationMethod`) as a unified trust summary derived from existing coverage signals (stale, gaps, productivity `verificationStatus`, AI `spendReconciliationStatus`, pipeline `status`). It does not replace Source verified, Spend matched, or Backfill complete fields. Productivity detail may include `selfHeal` (latest depth scan and week reconcile) read from stored activity rows; this GET does not run a scan. `selfHeal` is null when neither event exists. AI usage detail includes spend reconciliation (`spendReconciliationStatus`, `spendDataQuality`, provider and stored cent totals, `spendReconcileCheckedAt`) read from the refresh-status snapshot. This GET does not call Cursor or Claude. Productivity, HR, monitoring, and SDLC pipelines omit those fields. `nextScheduledAt` is the scheduled poll instant for `ai_usage`, `hris`, and `monitoring`. It is null for productivity and SDLC, when that sync worker is disabled, or when there has been no attempt (`hris`/`monitoring` use last status `never`). For `hris` and `monitoring`, the value is the next PHASE2 daily UTC cron after now (`15 2` / `30 2`, not lastAttempt plus interval) and is therefore in the future when set. For `ai_usage`, it is the next weekly workspace slot and a past instant means that poll is overdue; it is not moved forward to now and is not an ETA. Monitoring `sync` copies stored `issueCount`, `deploymentCount`, and `eventCount` (null when unset). HRIS leaves those three null. Requires workspace membership. Disconnected sources are omitted. Insights / Measure / Engineering Health response DTOs do not include `dataTrust`.
5242
+ * @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub/Bitbucket, AI usage/spend per provider, SDLC components, monitoring, HRIS, Jira, PagerDuty). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Every pipeline includes always-present `dataTrust` (`status` + `verificationMethod`) as a unified trust summary derived from existing coverage signals (stale, gaps, productivity `verificationStatus`, AI `spendReconciliationStatus`, optional pipeline `sourceReconcile`, pipeline `status`). It does not replace Source verified, Spend matched, or Backfill complete fields. Optional `sourceReconcile` generalizes Source verified (count/checksum vs provider) for L2 reconcilers; omit/null when no scheduled reconcile snapshot exists. Productivity detail may include `selfHeal` (latest depth scan and week reconcile) read from stored activity rows; this GET does not run a scan. `selfHeal` is null when neither event exists. AI usage detail includes spend reconciliation (`spendReconciliationStatus`, `spendDataQuality`, provider and stored cent totals, `spendReconcileCheckedAt`) read from the refresh-status snapshot. This GET does not call Cursor or Claude. Productivity, HR, monitoring, and SDLC pipelines omit those spend fields. `nextScheduledAt` is the scheduled poll instant for `ai_usage`, `hris`, and `monitoring`. It is null for productivity and SDLC, when that sync worker is disabled, or when there has been no attempt (`hris`/`monitoring` use last status `never`). For `hris` and `monitoring`, the value is the next PHASE2 daily UTC cron after now (`15 2` / `30 2`, not lastAttempt plus interval) and is therefore in the future when set. For `ai_usage`, it is the next weekly workspace slot and a past instant means that poll is overdue; it is not moved forward to now and is not an ETA. Monitoring `sync` copies stored `issueCount`, `deploymentCount`, and `eventCount` (null when unset). HRIS leaves those three null. Requires workspace membership. Disconnected sources are omitted. Insights / Measure / Engineering Health response DTOs do not include `dataTrust`.
5219
5243
  */
5220
5244
  get: operations["getWorkspaceIngestCoverage"];
5221
5245
  put?: never;
@@ -6515,6 +6539,31 @@ export interface components {
6515
6539
  /** @description Ceiling — stay at or below this many CI failures per engineer per week. `0` is valid. */
6516
6540
  ciFailuresPerEngineerPerWeek?: number | null;
6517
6541
  };
6542
+ /** @description Omitted dimension means a target of 100. Values of 100 are not stored. */
6543
+ DimensionTargetPercentsDto: {
6544
+ "ai-agent-readiness"?: number | null;
6545
+ "token-efficiency"?: number | null;
6546
+ "repo-hygiene"?: number | null;
6547
+ "stack-quality"?: number | null;
6548
+ "tests-qa"?: number | null;
6549
+ observability?: number | null;
6550
+ "api-contracts"?: number | null;
6551
+ "platform-governance"?: number | null;
6552
+ delivery?: number | null;
6553
+ };
6554
+ DimensionTargetsRepoOverrideDto: {
6555
+ /** @description Dimensions left out of this repository's score. */
6556
+ disabledDimensions?: components["schemas"]["ReadinessDimensionId"][];
6557
+ targets?: components["schemas"]["DimensionTargetPercentsDto"];
6558
+ };
6559
+ /** @description Agentic Foundation dimension targets. Empty object means every dimension is scored and the target is 100. */
6560
+ DimensionTargetsDto: {
6561
+ targets?: components["schemas"]["DimensionTargetPercentsDto"];
6562
+ /** @description Keys are in-scope repository ids. */
6563
+ repoOverrides?: {
6564
+ [key: string]: components["schemas"]["DimensionTargetsRepoOverrideDto"];
6565
+ };
6566
+ };
6518
6567
  AiEmailAliasEntryDto: {
6519
6568
  /**
6520
6569
  * Format: email
@@ -10812,6 +10861,36 @@ export interface components {
10812
10861
  /** @description Monitoring meta event count. Null for HRIS and when the stored count is unset. */
10813
10862
  eventCount?: number | null;
10814
10863
  };
10864
+ /**
10865
+ * @description Pipeline-level source reconcile outcome (L2). Same values as productivity Source verified, plus `not_applicable` when the provider has no countable or checksum reconcile surface.
10866
+ * @enum {string}
10867
+ */
10868
+ IngestCoverageSourceReconcileStatus: "unverified" | "verified" | "below_target" | "insufficient_sample" | "stale" | "not_applicable";
10869
+ /**
10870
+ * @description Which L2 reconcile check produced `sourceReconcile.verificationStatus`. Prefer `source_count` or `checksum` when mapping into `dataTrust.verificationMethod`.
10871
+ * @enum {string}
10872
+ */
10873
+ IngestCoverageSourceReconcileMethod: "source_count" | "checksum" | "none";
10874
+ /** @description Generalized Source verified / reconcile snapshot on a coverage pipeline. Optional until a scheduled reconciler writes a row. Does not replace nested productivity verify fields or AI spend reconcile. */
10875
+ IngestCoverageSourceReconcileDto: {
10876
+ verificationStatus: components["schemas"]["IngestCoverageSourceReconcileStatus"];
10877
+ /** @description Minimum provider-vs-stored capture for a count reconcile (0–100, up to two decimals). Null when the check is checksum-only, thin, not applicable, or no sample exists. */
10878
+ sourceCapturePercent: number | null;
10879
+ verificationMethod: components["schemas"]["IngestCoverageSourceReconcileMethod"];
10880
+ /**
10881
+ * Format: date-time
10882
+ * @description When the snapshot was written. Null when unverified with no row.
10883
+ */
10884
+ checkedAt: string | null;
10885
+ /** @description Provider-side count for the reconcile window. Null when unset or N/A. */
10886
+ providerCount: number | null;
10887
+ /** @description Stored platform count for the reconcile window. Null when unset or N/A. */
10888
+ storedCount: number | null;
10889
+ /** @description Provider-side checksum (opaque). Null when method is not checksum. */
10890
+ providerChecksum: string | null;
10891
+ /** @description Stored platform checksum (opaque). Null when method is not checksum. */
10892
+ storedChecksum: string | null;
10893
+ };
10815
10894
  /**
10816
10895
  * @description Unified data-trust summary for one ingest-coverage pipeline. Derived from existing coverage signals; does not rename Source verified, Spend matched, or Backfill complete.
10817
10896
  * @enum {string}
@@ -10845,7 +10924,7 @@ export interface components {
10845
10924
  IngestCoveragePipelineDto: {
10846
10925
  id: string;
10847
10926
  /** @enum {string} */
10848
- kind: "productivity_github" | "ai_usage" | "sdlc_github" | "monitoring" | "hris";
10927
+ kind: "productivity_github" | "productivity_bitbucket" | "ai_usage" | "sdlc_github" | "monitoring" | "hris" | "jira" | "pagerduty";
10849
10928
  provider?: string | null;
10850
10929
  /** @enum {string} */
10851
10930
  status: "not_started" | "backfilling" | "incremental" | "complete" | "failed" | "in_progress";
@@ -10878,6 +10957,8 @@ export interface components {
10878
10957
  ai?: components["schemas"]["IngestCoverageAiDetailDto"];
10879
10958
  sdlc?: components["schemas"]["IngestCoverageSdlcDetailDto"];
10880
10959
  sync?: components["schemas"]["IngestCoverageSyncDetailDto"];
10960
+ /** @description Optional L2 source-reconcile snapshot (count / checksum vs provider API). Null when no scheduled reconcile has written a row for this pipeline. Does not replace nested productivity verify fields or AI spend reconcile. */
10961
+ sourceReconcile?: components["schemas"]["IngestCoverageSourceReconcileDto"] | null;
10881
10962
  dataTrust: components["schemas"]["DataTrustDto"];
10882
10963
  };
10883
10964
  IngestCoverageDto: {
@@ -10889,7 +10970,7 @@ export interface components {
10889
10970
  /** Format: uuid */
10890
10971
  runId: string;
10891
10972
  /** @enum {string} */
10892
- kind: "productivity_github" | "ai_usage" | "sdlc_github" | "monitoring" | "hris";
10973
+ kind: "productivity_github" | "productivity_bitbucket" | "ai_usage" | "sdlc_github" | "monitoring" | "hris" | "jira" | "pagerduty";
10893
10974
  /** Format: date-time */
10894
10975
  startedAt: string;
10895
10976
  /** Format: date-time */
@@ -13283,6 +13364,9 @@ export type AiModelPolicyConfigDto = components['schemas']['AiModelPolicyConfigD
13283
13364
  export type AiModelPolicyPersonOverrideDto = components['schemas']['AiModelPolicyPersonOverrideDto'];
13284
13365
  export type AiModelPolicyDto = components['schemas']['AiModelPolicyDto'];
13285
13366
  export type ProductivityTargetsDto = components['schemas']['ProductivityTargetsDto'];
13367
+ export type DimensionTargetPercentsDto = components['schemas']['DimensionTargetPercentsDto'];
13368
+ export type DimensionTargetsRepoOverrideDto = components['schemas']['DimensionTargetsRepoOverrideDto'];
13369
+ export type DimensionTargetsDto = components['schemas']['DimensionTargetsDto'];
13286
13370
  export type AiEmailAliasEntryDto = components['schemas']['AiEmailAliasEntryDto'];
13287
13371
  export type AiEmailAliasesDto = components['schemas']['AiEmailAliasesDto'];
13288
13372
  export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
@@ -13643,6 +13727,9 @@ export type IngestCoverageAiDetailDto = components['schemas']['IngestCoverageAiD
13643
13727
  export type IngestCoverageSdlcComponentDto = components['schemas']['IngestCoverageSdlcComponentDto'];
13644
13728
  export type IngestCoverageSdlcDetailDto = components['schemas']['IngestCoverageSdlcDetailDto'];
13645
13729
  export type IngestCoverageSyncDetailDto = components['schemas']['IngestCoverageSyncDetailDto'];
13730
+ export type IngestCoverageSourceReconcileStatus = components['schemas']['IngestCoverageSourceReconcileStatus'];
13731
+ export type IngestCoverageSourceReconcileMethod = components['schemas']['IngestCoverageSourceReconcileMethod'];
13732
+ export type IngestCoverageSourceReconcileDto = components['schemas']['IngestCoverageSourceReconcileDto'];
13646
13733
  export type DataTrustStatus = components['schemas']['DataTrustStatus'];
13647
13734
  export type DataTrustVerificationMethod = components['schemas']['DataTrustVerificationMethod'];
13648
13735
  export type DataTrustDto = components['schemas']['DataTrustDto'];
@@ -16835,6 +16922,91 @@ export interface operations {
16835
16922
  };
16836
16923
  };
16837
16924
  };
16925
+ getWorkspaceDimensionTargets: {
16926
+ parameters: {
16927
+ query?: never;
16928
+ header?: never;
16929
+ path: {
16930
+ workspaceId: components["parameters"]["WorkspaceId"];
16931
+ };
16932
+ cookie?: never;
16933
+ };
16934
+ requestBody?: never;
16935
+ responses: {
16936
+ /** @description Current targets (may be empty) */
16937
+ 200: {
16938
+ headers: {
16939
+ [name: string]: unknown;
16940
+ };
16941
+ content: {
16942
+ "application/json": components["schemas"]["DimensionTargetsDto"];
16943
+ };
16944
+ };
16945
+ 401: components["responses"]["Unauthorized"];
16946
+ 403: components["responses"]["Forbidden"];
16947
+ /** @description Workspace does not exist or malformed workspaceId */
16948
+ 404: {
16949
+ headers: {
16950
+ [name: string]: unknown;
16951
+ };
16952
+ content: {
16953
+ "application/json": components["schemas"]["ErrorMessageDto"];
16954
+ };
16955
+ };
16956
+ };
16957
+ };
16958
+ putWorkspaceDimensionTargets: {
16959
+ parameters: {
16960
+ query?: never;
16961
+ header?: never;
16962
+ path: {
16963
+ workspaceId: components["parameters"]["WorkspaceId"];
16964
+ };
16965
+ cookie?: never;
16966
+ };
16967
+ requestBody: {
16968
+ content: {
16969
+ "application/json": components["schemas"]["DimensionTargetsDto"];
16970
+ };
16971
+ };
16972
+ responses: {
16973
+ /** @description Targets persisted (or cleared). */
16974
+ 204: {
16975
+ headers: {
16976
+ [name: string]: unknown;
16977
+ };
16978
+ content?: never;
16979
+ };
16980
+ /** @description Invalid payload or repository is not in scan scope */
16981
+ 400: {
16982
+ headers: {
16983
+ [name: string]: unknown;
16984
+ };
16985
+ content: {
16986
+ "application/json": components["schemas"]["ErrorMessageDto"];
16987
+ };
16988
+ };
16989
+ 401: components["responses"]["Unauthorized"];
16990
+ /** @description Forbidden — workspace admin required */
16991
+ 403: {
16992
+ headers: {
16993
+ [name: string]: unknown;
16994
+ };
16995
+ content: {
16996
+ "application/json": components["schemas"]["ErrorMessageDto"];
16997
+ };
16998
+ };
16999
+ /** @description Workspace does not exist or malformed workspaceId */
17000
+ 404: {
17001
+ headers: {
17002
+ [name: string]: unknown;
17003
+ };
17004
+ content: {
17005
+ "application/json": components["schemas"]["ErrorMessageDto"];
17006
+ };
17007
+ };
17008
+ };
17009
+ };
16838
17010
  putTenantSources: {
16839
17011
  parameters: {
16840
17012
  query?: never;
@@ -28103,7 +28275,7 @@ export interface operations {
28103
28275
  parameters: {
28104
28276
  query?: {
28105
28277
  /** @description Coverage pipeline kind. Omit to list every kind stored for the workspace. */
28106
- kind?: "productivity_github" | "ai_usage" | "sdlc_github" | "monitoring" | "hris";
28278
+ kind?: "productivity_github" | "productivity_bitbucket" | "ai_usage" | "sdlc_github" | "monitoring" | "hris" | "jira" | "pagerduty";
28107
28279
  /** @description Page size. Default 20. Values above 100 are rejected. */
28108
28280
  limit?: number;
28109
28281
  };