@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.
@@ -854,6 +854,46 @@ export interface paths {
854
854
  patch?: never;
855
855
  trace?: never;
856
856
  };
857
+ "/workspaces/{workspaceId}/strict-insights-on-trust": {
858
+ parameters: {
859
+ query?: never;
860
+ header?: never;
861
+ path?: never;
862
+ cookie?: never;
863
+ };
864
+ get?: never;
865
+ /**
866
+ * Enable or disable strict Insights gating on dataTrust
867
+ * @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`.
868
+ */
869
+ put: operations["putWorkspaceStrictInsightsOnTrust"];
870
+ post?: never;
871
+ delete?: never;
872
+ options?: never;
873
+ head?: never;
874
+ patch?: never;
875
+ trace?: never;
876
+ };
877
+ "/workspaces/{workspaceId}/insights/strict-trust-hide-notify": {
878
+ parameters: {
879
+ query?: never;
880
+ header?: never;
881
+ path?: never;
882
+ cookie?: never;
883
+ };
884
+ get?: never;
885
+ put?: never;
886
+ /**
887
+ * Notify ThinkAI ops of a non-remediable strict Insights hide
888
+ * @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).
889
+ */
890
+ post: operations["postInsightsStrictTrustHideNotify"];
891
+ delete?: never;
892
+ options?: never;
893
+ head?: never;
894
+ patch?: never;
895
+ trace?: never;
896
+ };
857
897
  "/workspaces/{workspaceId}/ai-model-policy": {
858
898
  parameters: {
859
899
  query?: never;
@@ -1675,7 +1715,7 @@ export interface paths {
1675
1715
  };
1676
1716
  /**
1677
1717
  * Test pyramid assessment — workspace summary
1678
- * @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.
1718
+ * @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.
1679
1719
  */
1680
1720
  get: operations["getInsightsTestPyramidSummary"];
1681
1721
  put?: never;
@@ -6380,6 +6420,8 @@ export interface components {
6380
6420
  deliveryTopology?: components["schemas"]["DeliveryTopologyDto"] | null;
6381
6421
  /** @description Deep Wiki documentation focus for this workspace (guidance notes + optional topic outline). Saved via `PUT /workspaces/{workspaceId}/code-intelligence` (`wikiGuidance`). */
6382
6422
  codeWikiGuidance?: components["schemas"]["CodeWikiGuidanceDto"];
6423
+ /** @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`. */
6424
+ strictInsightsOnTrust?: boolean;
6383
6425
  };
6384
6426
  DeliveryRoleConfigDto: {
6385
6427
  /** @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]`. */
@@ -10072,7 +10114,7 @@ export interface components {
10072
10114
  * @description Type of workspace lifecycle event.
10073
10115
  * @enum {string}
10074
10116
  */
10075
- 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";
10117
+ 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";
10076
10118
  /** @description Current legal-approved opt-in notice, or `unset` while opt-in is unavailable. */
10077
10119
  AggregateUseNoticeStatusDto: {
10078
10120
  /** @enum {string} */
@@ -10785,6 +10827,21 @@ export interface components {
10785
10827
  status: components["schemas"]["DataTrustStatus"];
10786
10828
  verificationMethod: components["schemas"]["DataTrustVerificationMethod"];
10787
10829
  };
10830
+ PutStrictInsightsOnTrustDto: {
10831
+ /** @description true to opt in to strict Insights gating on ingest dataTrust; false to opt out (default). Never default-on for all workspaces. */
10832
+ enabled: boolean;
10833
+ };
10834
+ /** @description Payload when the SPA hides an Insights card body under strict mode for a non-remediable unverified dataTrust gap. */
10835
+ InsightsStrictTrustHideNotifyDto: {
10836
+ /** @description Ingest-coverage pipeline id or kind (e.g. `productivity_github`, `ai_usage`, `monitoring`, `hris`). */
10837
+ pipeline: string;
10838
+ trustStatus: components["schemas"]["DataTrustStatus"];
10839
+ verificationMethod: components["schemas"]["DataTrustVerificationMethod"];
10840
+ };
10841
+ InsightsStrictTrustHideNotifyResultDto: {
10842
+ /** @description true when a new `@event:ingest.insights.strict_trust_hide` warn line was written for this workspace+pipeline transition. */
10843
+ emitted: boolean;
10844
+ };
10788
10845
  IngestCoveragePipelineDto: {
10789
10846
  id: string;
10790
10847
  /** @enum {string} */
@@ -12638,6 +12695,22 @@ export interface components {
12638
12695
  /** @description Dashboard metrics bucket end for the org snapshot. */
12639
12696
  bucketEnd: string;
12640
12697
  } | null;
12698
+ InsightsTestPyramidSuiteLayerOutcomeDto: {
12699
+ passRatePercent: number;
12700
+ failRatePercent: number;
12701
+ runsTotal: number;
12702
+ /** @description Latest mapped check-run `occurred_at` in the sample. */
12703
+ sampleBucketEnd: string;
12704
+ /** @description Included only when `runsTotal` is at least 5. Failure then success on the same `head_sha` + check name counts as a flake observation. */
12705
+ flakePercent?: number;
12706
+ };
12707
+ /** @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. */
12708
+ InsightsTestPyramidSuiteExecutionDto: {
12709
+ unit?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12710
+ e2e?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12711
+ /** @description Optional bonus layer; not required for */
12712
+ integration?: components["schemas"]["InsightsTestPyramidSuiteLayerOutcomeDto"] | null;
12713
+ } | null;
12641
12714
  InsightsTestPyramidSummaryDto: {
12642
12715
  /** Format: uuid */
12643
12716
  workspaceId: string;
@@ -12668,6 +12741,7 @@ export interface components {
12668
12741
  /** @description Repos whose latest Code Insights snapshot has `hotspotCount` > 0. */
12669
12742
  reposWithHotspots: number;
12670
12743
  ciQuality: components["schemas"]["InsightsTestPyramidCiQualityDto"];
12744
+ suiteExecution: components["schemas"]["InsightsTestPyramidSuiteExecutionDto"];
12671
12745
  };
12672
12746
  InsightsTestPyramidRepoItemDto: {
12673
12747
  /** Format: uuid */
@@ -12698,6 +12772,7 @@ export interface components {
12698
12772
  e2eCrossRepoCandidate: boolean;
12699
12773
  /** @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. */
12700
12774
  hotspotCount: number | null;
12775
+ suiteExecution: components["schemas"]["InsightsTestPyramidSuiteExecutionDto"];
12701
12776
  };
12702
12777
  InsightsTestPyramidRepoListDto: {
12703
12778
  items: components["schemas"]["InsightsTestPyramidRepoItemDto"][];
@@ -13571,6 +13646,9 @@ export type IngestCoverageSyncDetailDto = components['schemas']['IngestCoverageS
13571
13646
  export type DataTrustStatus = components['schemas']['DataTrustStatus'];
13572
13647
  export type DataTrustVerificationMethod = components['schemas']['DataTrustVerificationMethod'];
13573
13648
  export type DataTrustDto = components['schemas']['DataTrustDto'];
13649
+ export type PutStrictInsightsOnTrustDto = components['schemas']['PutStrictInsightsOnTrustDto'];
13650
+ export type InsightsStrictTrustHideNotifyDto = components['schemas']['InsightsStrictTrustHideNotifyDto'];
13651
+ export type InsightsStrictTrustHideNotifyResultDto = components['schemas']['InsightsStrictTrustHideNotifyResultDto'];
13574
13652
  export type IngestCoveragePipelineDto = components['schemas']['IngestCoveragePipelineDto'];
13575
13653
  export type IngestCoverageDto = components['schemas']['IngestCoverageDto'];
13576
13654
  export type IngestRunDto = components['schemas']['IngestRunDto'];
@@ -13752,6 +13830,8 @@ export type InsightsTestPyramidConfidenceDto = components['schemas']['InsightsTe
13752
13830
  export type InsightsTestPyramidLayerConfidenceDto = components['schemas']['InsightsTestPyramidLayerConfidenceDto'];
13753
13831
  export type InsightsTestPyramidCoverageRollupDto = components['schemas']['InsightsTestPyramidCoverageRollupDto'];
13754
13832
  export type InsightsTestPyramidCiQualityDto = components['schemas']['InsightsTestPyramidCiQualityDto'];
13833
+ export type InsightsTestPyramidSuiteLayerOutcomeDto = components['schemas']['InsightsTestPyramidSuiteLayerOutcomeDto'];
13834
+ export type InsightsTestPyramidSuiteExecutionDto = components['schemas']['InsightsTestPyramidSuiteExecutionDto'];
13755
13835
  export type InsightsTestPyramidSummaryDto = components['schemas']['InsightsTestPyramidSummaryDto'];
13756
13836
  export type InsightsTestPyramidRepoItemDto = components['schemas']['InsightsTestPyramidRepoItemDto'];
13757
13837
  export type InsightsTestPyramidRepoListDto = components['schemas']['InsightsTestPyramidRepoListDto'];
@@ -16499,6 +16579,92 @@ export interface operations {
16499
16579
  };
16500
16580
  };
16501
16581
  };
16582
+ putWorkspaceStrictInsightsOnTrust: {
16583
+ parameters: {
16584
+ query?: never;
16585
+ header?: never;
16586
+ path: {
16587
+ workspaceId: components["parameters"]["WorkspaceId"];
16588
+ };
16589
+ cookie?: never;
16590
+ };
16591
+ requestBody: {
16592
+ content: {
16593
+ "application/json": components["schemas"]["PutStrictInsightsOnTrustDto"];
16594
+ };
16595
+ };
16596
+ responses: {
16597
+ /** @description Flag updated */
16598
+ 200: {
16599
+ headers: {
16600
+ [name: string]: unknown;
16601
+ };
16602
+ content: {
16603
+ "application/json": {
16604
+ ok: boolean;
16605
+ strictInsightsOnTrust: boolean;
16606
+ };
16607
+ };
16608
+ };
16609
+ /** @description Invalid request body */
16610
+ 400: {
16611
+ headers: {
16612
+ [name: string]: unknown;
16613
+ };
16614
+ content: {
16615
+ "application/json": components["schemas"]["ErrorMessageDto"];
16616
+ };
16617
+ };
16618
+ 401: components["responses"]["Unauthorized"];
16619
+ 403: components["responses"]["Forbidden"];
16620
+ /** @description Store does not support this setting */
16621
+ 501: {
16622
+ headers: {
16623
+ [name: string]: unknown;
16624
+ };
16625
+ content: {
16626
+ "application/json": components["schemas"]["ErrorMessageDto"];
16627
+ };
16628
+ };
16629
+ };
16630
+ };
16631
+ postInsightsStrictTrustHideNotify: {
16632
+ parameters: {
16633
+ query?: never;
16634
+ header?: never;
16635
+ path: {
16636
+ workspaceId: components["parameters"]["WorkspaceId"];
16637
+ };
16638
+ cookie?: never;
16639
+ };
16640
+ requestBody: {
16641
+ content: {
16642
+ "application/json": components["schemas"]["InsightsStrictTrustHideNotifyDto"];
16643
+ };
16644
+ };
16645
+ responses: {
16646
+ /** @description Notify attempt recorded (may or may not have emitted) */
16647
+ 200: {
16648
+ headers: {
16649
+ [name: string]: unknown;
16650
+ };
16651
+ content: {
16652
+ "application/json": components["schemas"]["InsightsStrictTrustHideNotifyResultDto"];
16653
+ };
16654
+ };
16655
+ /** @description Invalid request body */
16656
+ 400: {
16657
+ headers: {
16658
+ [name: string]: unknown;
16659
+ };
16660
+ content: {
16661
+ "application/json": components["schemas"]["ErrorMessageDto"];
16662
+ };
16663
+ };
16664
+ 401: components["responses"]["Unauthorized"];
16665
+ 403: components["responses"]["Forbidden"];
16666
+ };
16667
+ };
16502
16668
  getWorkspaceAiModelPolicy: {
16503
16669
  parameters: {
16504
16670
  query?: never;