@thinkai/tai-api-contract 2.187.0 → 2.189.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.
@@ -3344,6 +3344,46 @@ export interface paths {
3344
3344
  patch?: never;
3345
3345
  trace?: never;
3346
3346
  };
3347
+ "/workspaces/{workspaceId}/rules-skills/validate": {
3348
+ parameters: {
3349
+ query?: never;
3350
+ header?: never;
3351
+ path?: never;
3352
+ cookie?: never;
3353
+ };
3354
+ get?: never;
3355
+ put?: never;
3356
+ /**
3357
+ * Validate agent rules and skills for a repository
3358
+ * @description Clones the connected GitHub repository via the workspace GitHub App installation and runs the shared Rules & Skills validate engine (structural + soft quality). Assessed tools come from the latest **succeeded** readiness scan (`agent_tool_assessed`: `cursor` | `claude-code` | `both`). Returns draft `proposedFiles` for review (not committed). Workspace member auth; write permissions are not required for validate-only.
3359
+ */
3360
+ post: operations["postRulesSkillsValidate"];
3361
+ delete?: never;
3362
+ options?: never;
3363
+ head?: never;
3364
+ patch?: never;
3365
+ trace?: never;
3366
+ };
3367
+ "/workspaces/{workspaceId}/rules-skills/pull-requests": {
3368
+ parameters: {
3369
+ query?: never;
3370
+ header?: never;
3371
+ path?: never;
3372
+ cookie?: never;
3373
+ };
3374
+ get?: never;
3375
+ put?: never;
3376
+ /**
3377
+ * Open a Rules & Skills remediation pull request
3378
+ * @description Applies `proposedFiles` (or a future create-mode session) onto a non-default branch via the Automations GitHub App installation and opens a pull request. Never pushes to the default branch. PR title/body identify the change as platform-generated and link back to `/agentic-foundation/rules-skills`. Requires workspace editor or admin. Same write-permission gate as readiness fixes.
3379
+ */
3380
+ post: operations["postRulesSkillsPullRequest"];
3381
+ delete?: never;
3382
+ options?: never;
3383
+ head?: never;
3384
+ patch?: never;
3385
+ trace?: never;
3386
+ };
3347
3387
  "/workspaces/{workspaceId}/readiness/issues/{issueId}/fix-guide": {
3348
3388
  parameters: {
3349
3389
  query?: never;
@@ -6078,6 +6118,36 @@ export interface components {
6078
6118
  /** @description PagerDuty user email when known from the last successful verify. */
6079
6119
  userEmail?: string;
6080
6120
  };
6121
+ /** @description Sentry incident and release source for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Requires an organization slug and an auth token with `org:read`, `event:read`, and `project:read`. Issues map to incident events and releases with a commit or environment map to deployment events. */
6122
+ SentrySourceDto: {
6123
+ /** @enum {string} */
6124
+ type: "sentry";
6125
+ /** @description Sentry organization slug (the `{slug}` in `sentry.io/organizations/{slug}/`). */
6126
+ orgSlug: string;
6127
+ /** @description Sentry auth token (organization or internal integration token, write-only on PUT). */
6128
+ token: string;
6129
+ /** @description Optional API base URL for self-hosted Sentry. Default `https://sentry.io/api/0`. */
6130
+ baseUrl?: string;
6131
+ /** @description Optional project slug. When set, only that project's issues and releases are ingested. */
6132
+ projectSlug?: string;
6133
+ /** @description Optional organization display name from a successful connection test (echo-after-test). */
6134
+ orgName?: string;
6135
+ };
6136
+ /** @description Redacted Sentry source returned by `GET /workspaces/{workspaceId}/config`. Raw token is never returned. */
6137
+ SentrySourceConfigDto: {
6138
+ /** @enum {string} */
6139
+ type: "sentry";
6140
+ /** @description Whether an auth token is stored for this workspace. */
6141
+ hasToken: boolean;
6142
+ /** @description Configured Sentry organization slug. */
6143
+ orgSlug: string;
6144
+ /** @description Configured API base URL override, when set. */
6145
+ baseUrl?: string;
6146
+ /** @description Configured project filter, when set. */
6147
+ projectSlug?: string;
6148
+ /** @description Sentry organization name when known from the last successful verify. */
6149
+ orgName?: string;
6150
+ };
6081
6151
  /** @description Jira Cloud source for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Uses Atlassian Cloud email + API token (Basic auth). Provide `apiToken` (preferred) or legacy write-only `api_key`; the server normalizes `api_key` to `apiToken` on write. */
6082
6152
  JiraSourceDto: {
6083
6153
  /** @enum {string} */
@@ -6202,7 +6272,7 @@ export interface components {
6202
6272
  topics?: components["schemas"]["CodeWikiGuidanceTopicDto"][];
6203
6273
  };
6204
6274
  WorkspaceConfigDto: {
6205
- sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["DatadogSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["JiraSourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
6275
+ sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["DatadogSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["SentrySourceConfigDto"] | components["schemas"]["JiraSourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
6206
6276
  orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
6207
6277
  /** @enum {string|null} */
6208
6278
  region?: "us" | "eu" | "me" | null;
@@ -6325,7 +6395,7 @@ export interface components {
6325
6395
  accountName?: string;
6326
6396
  /** @description Present for New Relic or Jira verify success — resolved account ID. */
6327
6397
  accountId?: string;
6328
- /** @description Present for Grafana or Datadog verify success — resolved organization name. */
6398
+ /** @description Present for Grafana, Datadog, or Sentry verify success — resolved organization name. */
6329
6399
  orgName?: string;
6330
6400
  /** @description Present for Prometheus verify success — Alertmanager cluster name. */
6331
6401
  clusterName?: string;
@@ -9243,6 +9313,80 @@ export interface components {
9243
9313
  /** @description Required when the issue has unresolvedChoices. Must be one of those labels. Stored on the fix row and stated in the worker prompt. */
9244
9314
  patternChoice?: string;
9245
9315
  };
9316
+ /**
9317
+ * @description From the latest succeeded readiness scan (`agent_tool_assessed`). Never invent `both` without scan evidence.
9318
+ * @enum {string}
9319
+ */
9320
+ RulesSkillsAssessedTools: "cursor" | "claude-code" | "both";
9321
+ RulesSkillsValidateRequestDto: {
9322
+ /** Format: uuid */
9323
+ repoId: string;
9324
+ /** @description Optional relative path prefixes limiting the validate walk. */
9325
+ pathPrefixes?: string[];
9326
+ };
9327
+ RulesSkillsFindingDto: {
9328
+ id: string;
9329
+ /** @enum {string} */
9330
+ kind: "structural" | "soft";
9331
+ /** @enum {string} */
9332
+ severity: "fail" | "warn";
9333
+ code: string;
9334
+ path: string;
9335
+ message: string;
9336
+ /** @description Empty when unmapped structural noise. */
9337
+ criterionIds: ("A1" | "A2" | "A3" | "A3a" | "A3b" | "A3c" | "A11")[];
9338
+ };
9339
+ RulesSkillsSoftQualityCheckDto: {
9340
+ code: string;
9341
+ /** @enum {string} */
9342
+ status: "pass" | "fail" | "warn" | "skip";
9343
+ message?: string;
9344
+ path?: string;
9345
+ };
9346
+ RulesSkillsSoftQualitySummaryDto: {
9347
+ /** @description True when there are no soft-quality fail findings (warns allowed). */
9348
+ passed: boolean;
9349
+ failCount: number;
9350
+ warnCount: number;
9351
+ checks: components["schemas"]["RulesSkillsSoftQualityCheckDto"][];
9352
+ };
9353
+ RulesSkillsProposedFileDto: {
9354
+ path: string;
9355
+ /** @enum {string} */
9356
+ action: "create" | "update" | "delete" | "rename";
9357
+ /** @description Full file contents for create/update/rename target. */
9358
+ content?: string;
9359
+ /** @description Source path when action is rename. */
9360
+ previousPath?: string;
9361
+ };
9362
+ RulesSkillsValidateResponseDto: {
9363
+ assessedTools: components["schemas"]["RulesSkillsAssessedTools"];
9364
+ findings: components["schemas"]["RulesSkillsFindingDto"][];
9365
+ softQualitySummary: components["schemas"]["RulesSkillsSoftQualitySummaryDto"];
9366
+ proposedFiles: components["schemas"]["RulesSkillsProposedFileDto"][];
9367
+ /** @description Quiet-case note (e.g. empty tree under pathPrefixes). */
9368
+ note?: string;
9369
+ };
9370
+ RulesSkillsOpenPullRequestRequestDto: {
9371
+ /** Format: uuid */
9372
+ repoId: string;
9373
+ /** @enum {string} */
9374
+ mode: "validate" | "create";
9375
+ /**
9376
+ * Format: uuid
9377
+ * @description Reserved for Create-mode sessions; validate mode uses proposedFiles.
9378
+ */
9379
+ sessionId?: string;
9380
+ proposedFiles?: components["schemas"]["RulesSkillsProposedFileDto"][];
9381
+ title?: string;
9382
+ body?: string;
9383
+ };
9384
+ RulesSkillsOpenPullRequestResponseDto: {
9385
+ /** Format: uri */
9386
+ prUrl: string;
9387
+ prNumber: number;
9388
+ branchName: string;
9389
+ };
9246
9390
  PhaseRoleDto: {
9247
9391
  phase: string;
9248
9392
  /** @enum {string} */
@@ -12878,6 +13022,8 @@ export type SonarQubeRepoMappingValidateRowDto = components['schemas']['SonarQub
12878
13022
  export type SonarQubeRepoMappingsValidateResponseDto = components['schemas']['SonarQubeRepoMappingsValidateResponseDto'];
12879
13023
  export type PagerDutySourceDto = components['schemas']['PagerDutySourceDto'];
12880
13024
  export type PagerDutySourceConfigDto = components['schemas']['PagerDutySourceConfigDto'];
13025
+ export type SentrySourceDto = components['schemas']['SentrySourceDto'];
13026
+ export type SentrySourceConfigDto = components['schemas']['SentrySourceConfigDto'];
12881
13027
  export type JiraSourceDto = components['schemas']['JiraSourceDto'];
12882
13028
  export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
12883
13029
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
@@ -13132,6 +13278,15 @@ export type ReadinessFixGuideDto = components['schemas']['ReadinessFixGuideDto']
13132
13278
  export type FixRetryableErrorCode = components['schemas']['FixRetryableErrorCode'];
13133
13279
  export type FixNonRetryableErrorCode = components['schemas']['FixNonRetryableErrorCode'];
13134
13280
  export type CreateFixRequestBodyDto = components['schemas']['CreateFixRequestBodyDto'];
13281
+ export type RulesSkillsAssessedTools = components['schemas']['RulesSkillsAssessedTools'];
13282
+ export type RulesSkillsValidateRequestDto = components['schemas']['RulesSkillsValidateRequestDto'];
13283
+ export type RulesSkillsFindingDto = components['schemas']['RulesSkillsFindingDto'];
13284
+ export type RulesSkillsSoftQualityCheckDto = components['schemas']['RulesSkillsSoftQualityCheckDto'];
13285
+ export type RulesSkillsSoftQualitySummaryDto = components['schemas']['RulesSkillsSoftQualitySummaryDto'];
13286
+ export type RulesSkillsProposedFileDto = components['schemas']['RulesSkillsProposedFileDto'];
13287
+ export type RulesSkillsValidateResponseDto = components['schemas']['RulesSkillsValidateResponseDto'];
13288
+ export type RulesSkillsOpenPullRequestRequestDto = components['schemas']['RulesSkillsOpenPullRequestRequestDto'];
13289
+ export type RulesSkillsOpenPullRequestResponseDto = components['schemas']['RulesSkillsOpenPullRequestResponseDto'];
13135
13290
  export type PhaseRoleDto = components['schemas']['PhaseRoleDto'];
13136
13291
  export type SquadMemberDto = components['schemas']['SquadMemberDto'];
13137
13292
  export type CustomWorkStreamTaskDto = components['schemas']['CustomWorkStreamTaskDto'];
@@ -16207,7 +16362,7 @@ export interface operations {
16207
16362
  requestBody: {
16208
16363
  content: {
16209
16364
  "application/json": {
16210
- sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["DatadogSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
16365
+ sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["DatadogSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["SentrySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
16211
16366
  };
16212
16367
  };
16213
16368
  };
@@ -16261,7 +16416,7 @@ export interface operations {
16261
16416
  };
16262
16417
  requestBody: {
16263
16418
  content: {
16264
- "application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["DatadogSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"];
16419
+ "application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["DatadogSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["SentrySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"];
16265
16420
  };
16266
16421
  };
16267
16422
  responses: {
@@ -22868,6 +23023,134 @@ export interface operations {
22868
23023
  };
22869
23024
  };
22870
23025
  };
23026
+ postRulesSkillsValidate: {
23027
+ parameters: {
23028
+ query?: never;
23029
+ header?: never;
23030
+ path: {
23031
+ workspaceId: components["parameters"]["WorkspaceId"];
23032
+ };
23033
+ cookie?: never;
23034
+ };
23035
+ requestBody: {
23036
+ content: {
23037
+ "application/json": components["schemas"]["RulesSkillsValidateRequestDto"];
23038
+ };
23039
+ };
23040
+ responses: {
23041
+ /** @description Validation result with findings and draft proposed files */
23042
+ 200: {
23043
+ headers: {
23044
+ [name: string]: unknown;
23045
+ };
23046
+ content: {
23047
+ "application/json": components["schemas"]["RulesSkillsValidateResponseDto"];
23048
+ };
23049
+ };
23050
+ /** @description Invalid body (e.g. malformed repoId) */
23051
+ 400: {
23052
+ headers: {
23053
+ [name: string]: unknown;
23054
+ };
23055
+ content: {
23056
+ "application/json": components["schemas"]["ErrorMessageDto"];
23057
+ };
23058
+ };
23059
+ 401: components["responses"]["Unauthorized"];
23060
+ 403: components["responses"]["Forbidden"];
23061
+ /** @description Workspace or repository not found / not connected */
23062
+ 404: {
23063
+ headers: {
23064
+ [name: string]: unknown;
23065
+ };
23066
+ content: {
23067
+ "application/json": components["schemas"]["ErrorMessageDto"];
23068
+ };
23069
+ };
23070
+ /** @description No succeeded readiness scan for the repo (`code: readiness_scan_required`), or repository is not a GitHub-connected readiness repo. */
23071
+ 422: {
23072
+ headers: {
23073
+ [name: string]: unknown;
23074
+ };
23075
+ content: {
23076
+ "application/json": components["schemas"]["ErrorMessageDto"];
23077
+ };
23078
+ };
23079
+ /** @description Clone or GitHub App configuration failed */
23080
+ 503: {
23081
+ headers: {
23082
+ [name: string]: unknown;
23083
+ };
23084
+ content: {
23085
+ "application/json": components["schemas"]["ErrorMessageDto"];
23086
+ };
23087
+ };
23088
+ };
23089
+ };
23090
+ postRulesSkillsPullRequest: {
23091
+ parameters: {
23092
+ query?: never;
23093
+ header?: never;
23094
+ path: {
23095
+ workspaceId: components["parameters"]["WorkspaceId"];
23096
+ };
23097
+ cookie?: never;
23098
+ };
23099
+ requestBody: {
23100
+ content: {
23101
+ "application/json": components["schemas"]["RulesSkillsOpenPullRequestRequestDto"];
23102
+ };
23103
+ };
23104
+ responses: {
23105
+ /** @description Pull request created */
23106
+ 200: {
23107
+ headers: {
23108
+ [name: string]: unknown;
23109
+ };
23110
+ content: {
23111
+ "application/json": components["schemas"]["RulesSkillsOpenPullRequestResponseDto"];
23112
+ };
23113
+ };
23114
+ /** @description Missing proposed files or invalid body (`code: proposed_files_required`). */
23115
+ 400: {
23116
+ headers: {
23117
+ [name: string]: unknown;
23118
+ };
23119
+ content: {
23120
+ "application/json": components["schemas"]["ErrorMessageDto"];
23121
+ };
23122
+ };
23123
+ 401: components["responses"]["Unauthorized"];
23124
+ 403: components["responses"]["Forbidden"];
23125
+ /** @description Workspace or repository not found */
23126
+ 404: {
23127
+ headers: {
23128
+ [name: string]: unknown;
23129
+ };
23130
+ content: {
23131
+ "application/json": components["schemas"]["ErrorMessageDto"];
23132
+ };
23133
+ };
23134
+ /** @description GitHub installation lacks write permissions required for automated PRs */
23135
+ 422: {
23136
+ headers: {
23137
+ [name: string]: unknown;
23138
+ };
23139
+ content: {
23140
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
23141
+ };
23142
+ };
23143
+ /** @description GitHub installation permissions could not be verified, or PR create failed */
23144
+ 503: {
23145
+ headers: {
23146
+ [name: string]: unknown;
23147
+ };
23148
+ content: {
23149
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"] | components["schemas"]["ErrorMessageDto"];
23150
+ };
23151
+ };
23152
+ };
23153
+ };
22871
23154
  getReadinessIssueFixGuide: {
22872
23155
  parameters: {
22873
23156
  query?: never;