@thinkai/tai-api-contract 2.132.0 → 2.134.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.
@@ -4135,6 +4135,26 @@ export interface paths {
4135
4135
  patch?: never;
4136
4136
  trace?: never;
4137
4137
  };
4138
+ "/workspaces/{workspaceId}/ingest-runs": {
4139
+ parameters: {
4140
+ query?: never;
4141
+ header?: never;
4142
+ path?: never;
4143
+ cookie?: never;
4144
+ };
4145
+ /**
4146
+ * List durable ingest runs
4147
+ * @description Newest-first history of ingest worker ticks that polled. Quiet skips (lock held, rate-limit deferral, and other non-poll skips) are omitted. This wave writes `productivity_github` only; other kinds return an empty list. Requires workspace membership. Does not include run history on ingest-coverage.
4148
+ */
4149
+ get: operations["getWorkspaceIngestRuns"];
4150
+ put?: never;
4151
+ post?: never;
4152
+ delete?: never;
4153
+ options?: never;
4154
+ head?: never;
4155
+ patch?: never;
4156
+ trace?: never;
4157
+ };
4138
4158
  "/workspaces/{workspaceId}/hris/status": {
4139
4159
  parameters: {
4140
4160
  query?: never;
@@ -6855,6 +6875,36 @@ export interface components {
6855
6875
  */
6856
6876
  cursorKeySource?: "workspace_execution_token" | "platform_env_key" | null;
6857
6877
  };
6878
+ /**
6879
+ * @description Where a CI setup criterion's evidence came from. `in_repo` — this repository's CI config contributed. `linked_platform` — a linked CI templates platform repo (role `ci_templates` or the `jenkins_shared` alias) contributed.
6880
+ * @enum {string}
6881
+ */
6882
+ CriterionEvidenceKind: "in_repo" | "linked_platform";
6883
+ /** @description One evidence chip for a CI setup criterion (CI on change, CI runs build, CI runs tests, CI static analysis). `role` and `providerSlug` are present when `kind` is `linked_platform` and omitted for `in_repo`. */
6884
+ CriterionEvidenceSourceDto: {
6885
+ kind: components["schemas"]["CriterionEvidenceKind"];
6886
+ /** @description Chip text shown in the UI (for example "In this repo" or "CI templates · org/platform-ci"). */
6887
+ label: string;
6888
+ /** @description Topology role when `kind` is `linked_platform` (for example `ci_templates` or `jenkins_shared`). Omit for `in_repo`. */
6889
+ role?: string;
6890
+ /** @description Platform repository `owner/name` when `kind` is `linked_platform`. Omit for `in_repo`. */
6891
+ providerSlug?: string;
6892
+ };
6893
+ /**
6894
+ * @description Stable "Improve this scan" code for Agentic Foundation CI setup honesty. `configure_linked_ci_templates` — map a linked CI templates repo. `scan_linked_ci_templates` — the mapped platform repo still needs a fresh scan. `view_ci_health_in_insights` — CI config is present; live pass/fail health is in SDLC Insights.
6895
+ * @enum {string}
6896
+ */
6897
+ ScanImprovementCode: "configure_linked_ci_templates" | "scan_linked_ci_templates" | "view_ci_health_in_insights";
6898
+ /** @description One repo-level recommendation on a readiness scorecard. Display copy is `title` and `description`; clients may also route from `code`. */
6899
+ ScanImprovementDto: {
6900
+ code: components["schemas"]["ScanImprovementCode"];
6901
+ title: string;
6902
+ description: string;
6903
+ /** @description Optional SPA path for the recommendation (linked-platform settings or SDLC Insights). Not a scored URL. */
6904
+ href?: string;
6905
+ /** @description Platform repository `owner/name` when the recommendation names a specific linked repo (typically `scan_linked_ci_templates`). */
6906
+ providerSlug?: string;
6907
+ };
6858
6908
  CriterionDetailDto: {
6859
6909
  /** @description Rubric criterion id (e.g. A1, B3) */
6860
6910
  rubricId: string;
@@ -6881,6 +6931,8 @@ export interface components {
6881
6931
  * @description UUID of the linked open issue in tai_workspace_repo_issues. Present only for gap/partial criteria that have a corresponding issue row. Use this to navigate to the Fix flow.
6882
6932
  */
6883
6933
  issueId?: string | null;
6934
+ /** @description Sources that contributed to CI setup criteria (CI on change, CI runs build, CI runs tests, CI static analysis). Met or Partial on those rows includes at least one entry (`in_repo` and/or `linked_platform`). Omitted on other criteria and when the scan did not record evidence. */
6935
+ evidenceUsed?: components["schemas"]["CriterionEvidenceSourceDto"][];
6884
6936
  };
6885
6937
  ReadinessCriteriaSummaryDto: {
6886
6938
  total: number;
@@ -7248,6 +7300,8 @@ export interface components {
7248
7300
  platformArchetype?: "terraform_platform" | "gitops_platform" | "ci_templates" | "api_contracts_platform" | null;
7249
7301
  /** @description Federated readiness completeness for service repos: which linked platform roles (terraform/gitops/ci_templates/api_contracts, from the workspace delivery topology) are still missing scan evidence. Absent/null when no topology is configured or every declared role has fresh metadata (`complete: true`). */
7250
7302
  linkedRoleAssessment?: components["schemas"]["LinkedRoleAssessmentDto"] | null;
7303
+ /** @description Repo-level "Improve this scan" recommendations for Agentic Foundation CI setup (at most three). Omitted when the scan emitted none. Does not change criterion scores; live CI health stays in SDLC Insights. */
7304
+ scanImprovements?: components["schemas"]["ScanImprovementDto"][];
7251
7305
  };
7252
7306
  LinkedRolePendingDto: {
7253
7307
  /** @description Topology role key, e.g. terraform | gitops | ci_templates | api_contracts. */
@@ -7326,6 +7380,8 @@ export interface components {
7326
7380
  platformArchetype?: "terraform_platform" | "gitops_platform" | "ci_templates" | "api_contracts_platform" | null;
7327
7381
  /** @description See RepoReadinessScoreDto.linkedRoleAssessment. */
7328
7382
  linkedRoleAssessment?: components["schemas"]["LinkedRoleAssessmentDto"] | null;
7383
+ /** @description See RepoReadinessScoreDto.scanImprovements. */
7384
+ scanImprovements?: components["schemas"]["ScanImprovementDto"][];
7329
7385
  };
7330
7386
  AgenticFoundationDashboardSummaryDto: {
7331
7387
  repoCount: number;
@@ -8166,6 +8222,27 @@ export interface components {
8166
8222
  /** Format: date-time */
8167
8223
  generatedAt?: string;
8168
8224
  };
8225
+ IngestRunDto: {
8226
+ /** Format: uuid */
8227
+ runId: string;
8228
+ /** @enum {string} */
8229
+ kind: "productivity_github" | "ai_usage" | "sdlc_github" | "monitoring" | "hris";
8230
+ /** Format: date-time */
8231
+ startedAt: string;
8232
+ /** Format: date-time */
8233
+ completedAt: string | null;
8234
+ /** @enum {string} */
8235
+ outcome: "in_progress" | "ok" | "partial" | "failed" | "cancelled";
8236
+ reposPolled: number | null;
8237
+ reposOk: number | null;
8238
+ reposFailed: number | null;
8239
+ errorSummary: string | null;
8240
+ /** @description ISO lastIngestAt after the cursor moved; null when it did not. */
8241
+ watermark: string | null;
8242
+ };
8243
+ IngestRunListDto: {
8244
+ runs: components["schemas"]["IngestRunDto"][];
8245
+ };
8169
8246
  HrisSyncStatusDto: {
8170
8247
  /** @description Provider identifier (e.g. 'personio', 'zenhr'). */
8171
8248
  provider: string;
@@ -10223,6 +10300,10 @@ export type ReadinessAnalyzeResponseDto = components['schemas']['ReadinessAnalyz
10223
10300
  export type ReadinessRunStatusDto = components['schemas']['ReadinessRunStatusDto'];
10224
10301
  export type ReadinessRepoAnalysisStatusDto = components['schemas']['ReadinessRepoAnalysisStatusDto'];
10225
10302
  export type ReadinessRunSummaryDto = components['schemas']['ReadinessRunSummaryDto'];
10303
+ export type CriterionEvidenceKind = components['schemas']['CriterionEvidenceKind'];
10304
+ export type CriterionEvidenceSourceDto = components['schemas']['CriterionEvidenceSourceDto'];
10305
+ export type ScanImprovementCode = components['schemas']['ScanImprovementCode'];
10306
+ export type ScanImprovementDto = components['schemas']['ScanImprovementDto'];
10226
10307
  export type CriterionDetailDto = components['schemas']['CriterionDetailDto'];
10227
10308
  export type ReadinessCriteriaSummaryDto = components['schemas']['ReadinessCriteriaSummaryDto'];
10228
10309
  export type ReadinessIssueDto = components['schemas']['ReadinessIssueDto'];
@@ -10350,6 +10431,8 @@ export type IngestCoverageSdlcDetailDto = components['schemas']['IngestCoverageS
10350
10431
  export type IngestCoverageSyncDetailDto = components['schemas']['IngestCoverageSyncDetailDto'];
10351
10432
  export type IngestCoveragePipelineDto = components['schemas']['IngestCoveragePipelineDto'];
10352
10433
  export type IngestCoverageDto = components['schemas']['IngestCoverageDto'];
10434
+ export type IngestRunDto = components['schemas']['IngestRunDto'];
10435
+ export type IngestRunListDto = components['schemas']['IngestRunListDto'];
10353
10436
  export type HrisSyncStatusDto = components['schemas']['HrisSyncStatusDto'];
10354
10437
  export type HrisSyncStatusListDto = components['schemas']['HrisSyncStatusListDto'];
10355
10438
  export type ZenHrReconnectResultDto = components['schemas']['ZenHrReconnectResultDto'];
@@ -20968,6 +21051,55 @@ export interface operations {
20968
21051
  403: components["responses"]["Forbidden"];
20969
21052
  };
20970
21053
  };
21054
+ getWorkspaceIngestRuns: {
21055
+ parameters: {
21056
+ query?: {
21057
+ /** @description Coverage pipeline kind. Omit to list every kind stored for the workspace. */
21058
+ kind?: "productivity_github" | "ai_usage" | "sdlc_github" | "monitoring" | "hris";
21059
+ /** @description Page size. Default 20. Values above 100 are rejected. */
21060
+ limit?: number;
21061
+ };
21062
+ header?: never;
21063
+ path: {
21064
+ workspaceId: components["parameters"]["WorkspaceId"];
21065
+ };
21066
+ cookie?: never;
21067
+ };
21068
+ requestBody?: never;
21069
+ responses: {
21070
+ /** @description Ingest runs, newest startedAt first */
21071
+ 200: {
21072
+ headers: {
21073
+ [name: string]: unknown;
21074
+ };
21075
+ content: {
21076
+ /**
21077
+ * @example {
21078
+ * "runs": []
21079
+ * }
21080
+ */
21081
+ "application/json": components["schemas"]["IngestRunListDto"];
21082
+ };
21083
+ };
21084
+ /** @description Invalid kind or limit */
21085
+ 400: {
21086
+ headers: {
21087
+ [name: string]: unknown;
21088
+ };
21089
+ content: {
21090
+ /**
21091
+ * @example {
21092
+ * "error": "Invalid ingest-runs query",
21093
+ * "code": "invalid_query"
21094
+ * }
21095
+ */
21096
+ "application/json": components["schemas"]["ErrorMessageDto"];
21097
+ };
21098
+ };
21099
+ 401: components["responses"]["Unauthorized"];
21100
+ 403: components["responses"]["Forbidden"];
21101
+ };
21102
+ };
20971
21103
  getHrisSyncStatus: {
20972
21104
  parameters: {
20973
21105
  query?: never;
package/src/index.ts CHANGED
@@ -1443,6 +1443,30 @@ export interface IngestCoverageDto {
1443
1443
  generatedAt?: string;
1444
1444
  }
1445
1445
 
1446
+ export type IngestRunKind = IngestCoveragePipelineKind;
1447
+
1448
+ /** Finish state for one durable ingest tick. `cancelled` is legal and unused this wave. */
1449
+ export type IngestRunOutcome = "in_progress" | "ok" | "partial" | "failed" | "cancelled";
1450
+
1451
+ /** One persisted ingest tick from GET /workspaces/:id/ingest-runs. */
1452
+ export interface IngestRunDto {
1453
+ runId: string;
1454
+ kind: IngestRunKind;
1455
+ startedAt: string;
1456
+ completedAt: string | null;
1457
+ outcome: IngestRunOutcome;
1458
+ reposPolled: number | null;
1459
+ reposOk: number | null;
1460
+ reposFailed: number | null;
1461
+ errorSummary: string | null;
1462
+ watermark: string | null;
1463
+ }
1464
+
1465
+ /** Response body for GET /workspaces/:id/ingest-runs. */
1466
+ export interface IngestRunListDto {
1467
+ runs: IngestRunDto[];
1468
+ }
1469
+
1446
1470
  /** Sync status for a single HRIS provider connected to a workspace. */
1447
1471
  export interface HrisSyncStatusDto {
1448
1472
  /** Provider identifier ('personio', 'zenhr', …). */