@thinkai/tai-api-contract 2.197.0 → 2.199.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.197.0",
3
+ "version": "2.199.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -855,6 +855,46 @@ export interface paths {
855
855
  patch?: never;
856
856
  trace?: never;
857
857
  };
858
+ "/workspaces/{workspaceId}/strict-insights-on-trust": {
859
+ parameters: {
860
+ query?: never;
861
+ header?: never;
862
+ path?: never;
863
+ cookie?: never;
864
+ };
865
+ get?: never;
866
+ /**
867
+ * Enable or disable strict Insights gating on dataTrust
868
+ * @description Opt-in enterprise flag (default off). When enabled, Insights may hide card bodies for non-remediable unverified ingest `dataTrust` and notify ThinkAI ops. Requires workspace admin. On success writes activity `config.strict_insights_on_trust.changed`. Read back via `GET /workspaces/{workspaceId}/config` → `strictInsightsOnTrust`.
869
+ */
870
+ put: operations["putWorkspaceStrictInsightsOnTrust"];
871
+ post?: never;
872
+ delete?: never;
873
+ options?: never;
874
+ head?: never;
875
+ patch?: never;
876
+ trace?: never;
877
+ };
878
+ "/workspaces/{workspaceId}/insights/strict-trust-hide-notify": {
879
+ parameters: {
880
+ query?: never;
881
+ header?: never;
882
+ path?: never;
883
+ cookie?: never;
884
+ };
885
+ get?: never;
886
+ put?: never;
887
+ /**
888
+ * Notify ThinkAI ops of a non-remediable strict Insights hide
889
+ * @description Called by the SPA when strict Insights is on and a card body is hidden because a required ingest input has `dataTrust.status` ≠ `verified` and Data coverage offers no meaningful self-serve fix (reconnect / Fill / Retry / Sync). Emits a warn `@event:ingest.insights.strict_trust_hide` line with `workspaceId`, `pipeline`, `trustStatus`, `verificationMethod`, and `fix_request: true` (ThinkAI ops / Datadog — not Message Center). Debounced per workspace+pipeline transition into the same hide fingerprint. Returns `{ emitted: false }` without writing a line when the workspace flag is off, `trustStatus` is `verified`, or the fingerprint was already emitted. Member-level access (any Insights viewer may trigger ops notify).
890
+ */
891
+ post: operations["postInsightsStrictTrustHideNotify"];
892
+ delete?: never;
893
+ options?: never;
894
+ head?: never;
895
+ patch?: never;
896
+ trace?: never;
897
+ };
858
898
  "/workspaces/{workspaceId}/ai-model-policy": {
859
899
  parameters: {
860
900
  query?: never;
@@ -1676,7 +1716,7 @@ export interface paths {
1676
1716
  };
1677
1717
  /**
1678
1718
  * Test pyramid assessment — workspace summary
1679
- * @description Org-level Test pyramid assessment for `/insights/test-pyramid`. Aggregates each active repo's **latest** readiness-scan test-pyramid snapshot and the immediately previous succeeded/partial_failed/failed point when present (`limitPerRepo: 2`). Layer **presence is count-based** (`fileCount > 0`); CI/dependency-only AF `present` flags are ignored. Shape uses fixed advisory targets (base ~70% unit, middle ~20% integration+contract+acceptance/BDD, top ~10% E2E) and returns `insufficient_data` when total classified test files < 10. Also returns maturity trend, coverage overlay, confidence, applicability, E2E-cross/hotspot risk, and workspace-only `ciQuality` from the latest org dashboard snapshot. Does not change Agentic Foundation `/readiness/test-pyramid*` responses.
1719
+ * @description Org-level Test pyramid assessment for `/insights/test-pyramid`. Aggregates each active repo's **latest** readiness-scan test-pyramid snapshot and the immediately previous succeeded/partial_failed/failed point when present (`limitPerRepo: 2`). Layer **presence is count-based** (`fileCount > 0`); CI/dependency-only AF `present` flags are ignored. Shape uses fixed advisory targets (base ~70% unit, middle ~20% integration+contract+acceptance/BDD, top ~10% E2E) and returns `insufficient_data` when total classified test files < 10. Also returns maturity trend, coverage overlay, confidence, applicability, E2E-cross/hotspot risk, workspace-only `ciQuality`, and Actions/check-name `suiteExecution` (unit/e2e suite pass/flake) from the latest org dashboard snapshot. Does not change Agentic Foundation `/readiness/test-pyramid*` responses.
1680
1720
  */
1681
1721
  get: operations["getInsightsTestPyramidSummary"];
1682
1722
  put?: never;
@@ -6381,6 +6421,8 @@ export interface components {
6381
6421
  deliveryTopology?: components["schemas"]["DeliveryTopologyDto"] | null;
6382
6422
  /** @description Deep Wiki documentation focus for this workspace (guidance notes + optional topic outline). Saved via `PUT /workspaces/{workspaceId}/code-intelligence` (`wikiGuidance`). */
6383
6423
  codeWikiGuidance?: components["schemas"]["CodeWikiGuidanceDto"];
6424
+ /** @description When true (opt-in enterprise), Insights may hide card bodies whose required ingest inputs have `dataTrust.status` ≠ `verified` and no meaningful Data coverage self-serve fix (reconnect / Fill / Retry / Sync), and notify ThinkAI ops. Default false — never on for all workspaces. Missing/null treated as off. Change via `PUT /workspaces/{workspaceId}/strict-insights-on-trust`. */
6425
+ strictInsightsOnTrust?: boolean;
6384
6426
  };
6385
6427
  DeliveryRoleConfigDto: {
6386
6428
  /** @description First connected workspace repo (`owner/repo`) that holds this kind of evidence. Kept so a saved single-repo role still reads. Same value as `providerSlugs[0]`. */
@@ -10073,7 +10115,7 @@ export interface components {
10073
10115
  * @description Type of workspace lifecycle event.
10074
10116
  * @enum {string}
10075
10117
  */
10076
- ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.suspended" | "integration.github.unsuspended" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "code_insights.design_run_started" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "rules_skills.soft_quality.override" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.hibob.sync_started" | "hris.hibob.sync_completed" | "hris.hibob.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "integrations.code_intelligence.settings_changed" | "integrations.code_intelligence.execution_key.added" | "integrations.code_intelligence.execution_key.updated" | "integrations.code_intelligence.execution_key.removed" | "integrations.code_intelligence.execution_key.check_failed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.datadog.added" | "integrations.datadog.removed" | "integrations.datadog.sync_completed" | "integrations.datadog.sync_failed" | "integrations.sentry.added" | "integrations.sentry.removed" | "integrations.sentry.sync_completed" | "integrations.sentry.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed" | "report.exported" | "report.assessment_stored" | "report.assessment_link_sent" | "report.assessment_link_revoked" | "report.assessment_downloaded" | "report.assessment_hidden" | "report.assessment_restored" | "workspace.aggregate_use.changed" | "workspace.assessment_rollout.changed";
10118
+ ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.suspended" | "integration.github.unsuspended" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "code_insights.design_run_started" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "rules_skills.soft_quality.override" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.hibob.sync_started" | "hris.hibob.sync_completed" | "hris.hibob.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "integrations.code_intelligence.settings_changed" | "integrations.code_intelligence.execution_key.added" | "integrations.code_intelligence.execution_key.updated" | "integrations.code_intelligence.execution_key.removed" | "integrations.code_intelligence.execution_key.check_failed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.datadog.added" | "integrations.datadog.removed" | "integrations.datadog.sync_completed" | "integrations.datadog.sync_failed" | "integrations.sentry.added" | "integrations.sentry.removed" | "integrations.sentry.sync_completed" | "integrations.sentry.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed" | "report.exported" | "report.assessment_stored" | "report.assessment_link_sent" | "report.assessment_link_revoked" | "report.assessment_downloaded" | "report.assessment_hidden" | "report.assessment_restored" | "workspace.aggregate_use.changed" | "workspace.assessment_rollout.changed" | "config.strict_insights_on_trust.changed";
10077
10119
  /** @description Current legal-approved opt-in notice, or `unset` while opt-in is unavailable. */
10078
10120
  AggregateUseNoticeStatusDto: {
10079
10121
  /** @enum {string} */
@@ -10786,6 +10828,21 @@ export interface components {
10786
10828
  status: components["schemas"]["DataTrustStatus"];
10787
10829
  verificationMethod: components["schemas"]["DataTrustVerificationMethod"];
10788
10830
  };
10831
+ PutStrictInsightsOnTrustDto: {
10832
+ /** @description true to opt in to strict Insights gating on ingest dataTrust; false to opt out (default). Never default-on for all workspaces. */
10833
+ enabled: boolean;
10834
+ };
10835
+ /** @description Payload when the SPA hides an Insights card body under strict mode for a non-remediable unverified dataTrust gap. */
10836
+ InsightsStrictTrustHideNotifyDto: {
10837
+ /** @description Ingest-coverage pipeline id or kind (e.g. `productivity_github`, `ai_usage`, `monitoring`, `hris`). */
10838
+ pipeline: string;
10839
+ trustStatus: components["schemas"]["DataTrustStatus"];
10840
+ verificationMethod: components["schemas"]["DataTrustVerificationMethod"];
10841
+ };
10842
+ InsightsStrictTrustHideNotifyResultDto: {
10843
+ /** @description true when a new `@event:ingest.insights.strict_trust_hide` warn line was written for this workspace+pipeline transition. */
10844
+ emitted: boolean;
10845
+ };
10789
10846
  IngestCoveragePipelineDto: {
10790
10847
  id: string;
10791
10848
  /** @enum {string} */
@@ -12639,6 +12696,22 @@ export interface components {
12639
12696
  /** @description Dashboard metrics bucket end for the org snapshot. */
12640
12697
  bucketEnd: string;
12641
12698
  } | null;
12699
+ InsightsTestPyramidSuiteLayerOutcomeDto: {
12700
+ passRatePercent: number;
12701
+ failRatePercent: number;
12702
+ runsTotal: number;
12703
+ /** @description Latest mapped check-run `occurred_at` in the sample. */
12704
+ sampleBucketEnd: string;
12705
+ /** @description Included only when `runsTotal` is at least 5. Failure then success on the same `head_sha` + check name counts as a flake observation. */
12706
+ flakePercent?: number;
12707
+ };
12708
+ /** @description Suite-level pass/flake from GitHub Actions / Checks job names classified onto pyramid layers. Null when no mapped unit/e2e (or optional integration) check names exist in the org dashboard quality snapshot. */
12709
+ InsightsTestPyramidSuiteExecutionDto: {
12710
+ unit?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12711
+ e2e?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12712
+ /** @description Optional bonus layer; not required for */
12713
+ integration?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12714
+ } | null;
12642
12715
  InsightsTestPyramidSummaryDto: {
12643
12716
  /** Format: uuid */
12644
12717
  workspaceId: string;
@@ -12669,6 +12742,7 @@ export interface components {
12669
12742
  /** @description Repos whose latest Code Insights snapshot has `hotspotCount` > 0. */
12670
12743
  reposWithHotspots: number;
12671
12744
  ciQuality: components["schemas"]["InsightsTestPyramidCiQualityDto"];
12745
+ suiteExecution: components["schemas"]["InsightsTestPyramidSuiteExecutionDto"];
12672
12746
  };
12673
12747
  InsightsTestPyramidRepoItemDto: {
12674
12748
  /** Format: uuid */
@@ -12699,6 +12773,7 @@ export interface components {
12699
12773
  e2eCrossRepoCandidate: boolean;
12700
12774
  /** @description Row count in `tai_workspace_repo_code_hotspots` for the repo's latest Code Insights metrics snapshot. Null when the repo has no metrics snapshot. */
12701
12775
  hotspotCount: number | null;
12776
+ suiteExecution: components["schemas"]["InsightsTestPyramidSuiteExecutionDto"];
12702
12777
  };
12703
12778
  InsightsTestPyramidRepoListDto: {
12704
12779
  items: components["schemas"]["InsightsTestPyramidRepoItemDto"][];
@@ -13572,6 +13647,9 @@ export type IngestCoverageSyncDetailDto = components['schemas']['IngestCoverageS
13572
13647
  export type DataTrustStatus = components['schemas']['DataTrustStatus'];
13573
13648
  export type DataTrustVerificationMethod = components['schemas']['DataTrustVerificationMethod'];
13574
13649
  export type DataTrustDto = components['schemas']['DataTrustDto'];
13650
+ export type PutStrictInsightsOnTrustDto = components['schemas']['PutStrictInsightsOnTrustDto'];
13651
+ export type InsightsStrictTrustHideNotifyDto = components['schemas']['InsightsStrictTrustHideNotifyDto'];
13652
+ export type InsightsStrictTrustHideNotifyResultDto = components['schemas']['InsightsStrictTrustHideNotifyResultDto'];
13575
13653
  export type IngestCoveragePipelineDto = components['schemas']['IngestCoveragePipelineDto'];
13576
13654
  export type IngestCoverageDto = components['schemas']['IngestCoverageDto'];
13577
13655
  export type IngestRunDto = components['schemas']['IngestRunDto'];
@@ -13753,6 +13831,8 @@ export type InsightsTestPyramidConfidenceDto = components['schemas']['InsightsTe
13753
13831
  export type InsightsTestPyramidLayerConfidenceDto = components['schemas']['InsightsTestPyramidLayerConfidenceDto'];
13754
13832
  export type InsightsTestPyramidCoverageRollupDto = components['schemas']['InsightsTestPyramidCoverageRollupDto'];
13755
13833
  export type InsightsTestPyramidCiQualityDto = components['schemas']['InsightsTestPyramidCiQualityDto'];
13834
+ export type InsightsTestPyramidSuiteLayerOutcomeDto = components['schemas']['InsightsTestPyramidSuiteLayerOutcomeDto'];
13835
+ export type InsightsTestPyramidSuiteExecutionDto = components['schemas']['InsightsTestPyramidSuiteExecutionDto'];
13756
13836
  export type InsightsTestPyramidSummaryDto = components['schemas']['InsightsTestPyramidSummaryDto'];
13757
13837
  export type InsightsTestPyramidRepoItemDto = components['schemas']['InsightsTestPyramidRepoItemDto'];
13758
13838
  export type InsightsTestPyramidRepoListDto = components['schemas']['InsightsTestPyramidRepoListDto'];
@@ -16500,6 +16580,92 @@ export interface operations {
16500
16580
  };
16501
16581
  };
16502
16582
  };
16583
+ putWorkspaceStrictInsightsOnTrust: {
16584
+ parameters: {
16585
+ query?: never;
16586
+ header?: never;
16587
+ path: {
16588
+ workspaceId: components["parameters"]["WorkspaceId"];
16589
+ };
16590
+ cookie?: never;
16591
+ };
16592
+ requestBody: {
16593
+ content: {
16594
+ "application/json": components["schemas"]["PutStrictInsightsOnTrustDto"];
16595
+ };
16596
+ };
16597
+ responses: {
16598
+ /** @description Flag updated */
16599
+ 200: {
16600
+ headers: {
16601
+ [name: string]: unknown;
16602
+ };
16603
+ content: {
16604
+ "application/json": {
16605
+ ok: boolean;
16606
+ strictInsightsOnTrust: boolean;
16607
+ };
16608
+ };
16609
+ };
16610
+ /** @description Invalid request body */
16611
+ 400: {
16612
+ headers: {
16613
+ [name: string]: unknown;
16614
+ };
16615
+ content: {
16616
+ "application/json": components["schemas"]["ErrorMessageDto"];
16617
+ };
16618
+ };
16619
+ 401: components["responses"]["Unauthorized"];
16620
+ 403: components["responses"]["Forbidden"];
16621
+ /** @description Store does not support this setting */
16622
+ 501: {
16623
+ headers: {
16624
+ [name: string]: unknown;
16625
+ };
16626
+ content: {
16627
+ "application/json": components["schemas"]["ErrorMessageDto"];
16628
+ };
16629
+ };
16630
+ };
16631
+ };
16632
+ postInsightsStrictTrustHideNotify: {
16633
+ parameters: {
16634
+ query?: never;
16635
+ header?: never;
16636
+ path: {
16637
+ workspaceId: components["parameters"]["WorkspaceId"];
16638
+ };
16639
+ cookie?: never;
16640
+ };
16641
+ requestBody: {
16642
+ content: {
16643
+ "application/json": components["schemas"]["InsightsStrictTrustHideNotifyDto"];
16644
+ };
16645
+ };
16646
+ responses: {
16647
+ /** @description Notify attempt recorded (may or may not have emitted) */
16648
+ 200: {
16649
+ headers: {
16650
+ [name: string]: unknown;
16651
+ };
16652
+ content: {
16653
+ "application/json": components["schemas"]["InsightsStrictTrustHideNotifyResultDto"];
16654
+ };
16655
+ };
16656
+ /** @description Invalid request body */
16657
+ 400: {
16658
+ headers: {
16659
+ [name: string]: unknown;
16660
+ };
16661
+ content: {
16662
+ "application/json": components["schemas"]["ErrorMessageDto"];
16663
+ };
16664
+ };
16665
+ 401: components["responses"]["Unauthorized"];
16666
+ 403: components["responses"]["Forbidden"];
16667
+ };
16668
+ };
16503
16669
  getWorkspaceAiModelPolicy: {
16504
16670
  parameters: {
16505
16671
  query?: never;