@thinkai/tai-api-contract 2.187.0 → 2.188.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.
@@ -3343,6 +3343,46 @@ export interface paths {
3343
3343
  patch?: never;
3344
3344
  trace?: never;
3345
3345
  };
3346
+ "/workspaces/{workspaceId}/rules-skills/validate": {
3347
+ parameters: {
3348
+ query?: never;
3349
+ header?: never;
3350
+ path?: never;
3351
+ cookie?: never;
3352
+ };
3353
+ get?: never;
3354
+ put?: never;
3355
+ /**
3356
+ * Validate agent rules and skills for a repository
3357
+ * @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.
3358
+ */
3359
+ post: operations["postRulesSkillsValidate"];
3360
+ delete?: never;
3361
+ options?: never;
3362
+ head?: never;
3363
+ patch?: never;
3364
+ trace?: never;
3365
+ };
3366
+ "/workspaces/{workspaceId}/rules-skills/pull-requests": {
3367
+ parameters: {
3368
+ query?: never;
3369
+ header?: never;
3370
+ path?: never;
3371
+ cookie?: never;
3372
+ };
3373
+ get?: never;
3374
+ put?: never;
3375
+ /**
3376
+ * Open a Rules & Skills remediation pull request
3377
+ * @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.
3378
+ */
3379
+ post: operations["postRulesSkillsPullRequest"];
3380
+ delete?: never;
3381
+ options?: never;
3382
+ head?: never;
3383
+ patch?: never;
3384
+ trace?: never;
3385
+ };
3346
3386
  "/workspaces/{workspaceId}/readiness/issues/{issueId}/fix-guide": {
3347
3387
  parameters: {
3348
3388
  query?: never;
@@ -9242,6 +9282,80 @@ export interface components {
9242
9282
  /** @description Required when the issue has unresolvedChoices. Must be one of those labels. Stored on the fix row and stated in the worker prompt. */
9243
9283
  patternChoice?: string;
9244
9284
  };
9285
+ /**
9286
+ * @description From the latest succeeded readiness scan (`agent_tool_assessed`). Never invent `both` without scan evidence.
9287
+ * @enum {string}
9288
+ */
9289
+ RulesSkillsAssessedTools: "cursor" | "claude-code" | "both";
9290
+ RulesSkillsValidateRequestDto: {
9291
+ /** Format: uuid */
9292
+ repoId: string;
9293
+ /** @description Optional relative path prefixes limiting the validate walk. */
9294
+ pathPrefixes?: string[];
9295
+ };
9296
+ RulesSkillsFindingDto: {
9297
+ id: string;
9298
+ /** @enum {string} */
9299
+ kind: "structural" | "soft";
9300
+ /** @enum {string} */
9301
+ severity: "fail" | "warn";
9302
+ code: string;
9303
+ path: string;
9304
+ message: string;
9305
+ /** @description Empty when unmapped structural noise. */
9306
+ criterionIds: ("A1" | "A2" | "A3" | "A3a" | "A3b" | "A3c" | "A11")[];
9307
+ };
9308
+ RulesSkillsSoftQualityCheckDto: {
9309
+ code: string;
9310
+ /** @enum {string} */
9311
+ status: "pass" | "fail" | "warn" | "skip";
9312
+ message?: string;
9313
+ path?: string;
9314
+ };
9315
+ RulesSkillsSoftQualitySummaryDto: {
9316
+ /** @description True when there are no soft-quality fail findings (warns allowed). */
9317
+ passed: boolean;
9318
+ failCount: number;
9319
+ warnCount: number;
9320
+ checks: components["schemas"]["RulesSkillsSoftQualityCheckDto"][];
9321
+ };
9322
+ RulesSkillsProposedFileDto: {
9323
+ path: string;
9324
+ /** @enum {string} */
9325
+ action: "create" | "update" | "delete" | "rename";
9326
+ /** @description Full file contents for create/update/rename target. */
9327
+ content?: string;
9328
+ /** @description Source path when action is rename. */
9329
+ previousPath?: string;
9330
+ };
9331
+ RulesSkillsValidateResponseDto: {
9332
+ assessedTools: components["schemas"]["RulesSkillsAssessedTools"];
9333
+ findings: components["schemas"]["RulesSkillsFindingDto"][];
9334
+ softQualitySummary: components["schemas"]["RulesSkillsSoftQualitySummaryDto"];
9335
+ proposedFiles: components["schemas"]["RulesSkillsProposedFileDto"][];
9336
+ /** @description Quiet-case note (e.g. empty tree under pathPrefixes). */
9337
+ note?: string;
9338
+ };
9339
+ RulesSkillsOpenPullRequestRequestDto: {
9340
+ /** Format: uuid */
9341
+ repoId: string;
9342
+ /** @enum {string} */
9343
+ mode: "validate" | "create";
9344
+ /**
9345
+ * Format: uuid
9346
+ * @description Reserved for Create-mode sessions; validate mode uses proposedFiles.
9347
+ */
9348
+ sessionId?: string;
9349
+ proposedFiles?: components["schemas"]["RulesSkillsProposedFileDto"][];
9350
+ title?: string;
9351
+ body?: string;
9352
+ };
9353
+ RulesSkillsOpenPullRequestResponseDto: {
9354
+ /** Format: uri */
9355
+ prUrl: string;
9356
+ prNumber: number;
9357
+ branchName: string;
9358
+ };
9245
9359
  PhaseRoleDto: {
9246
9360
  phase: string;
9247
9361
  /** @enum {string} */
@@ -13131,6 +13245,15 @@ export type ReadinessFixGuideDto = components['schemas']['ReadinessFixGuideDto']
13131
13245
  export type FixRetryableErrorCode = components['schemas']['FixRetryableErrorCode'];
13132
13246
  export type FixNonRetryableErrorCode = components['schemas']['FixNonRetryableErrorCode'];
13133
13247
  export type CreateFixRequestBodyDto = components['schemas']['CreateFixRequestBodyDto'];
13248
+ export type RulesSkillsAssessedTools = components['schemas']['RulesSkillsAssessedTools'];
13249
+ export type RulesSkillsValidateRequestDto = components['schemas']['RulesSkillsValidateRequestDto'];
13250
+ export type RulesSkillsFindingDto = components['schemas']['RulesSkillsFindingDto'];
13251
+ export type RulesSkillsSoftQualityCheckDto = components['schemas']['RulesSkillsSoftQualityCheckDto'];
13252
+ export type RulesSkillsSoftQualitySummaryDto = components['schemas']['RulesSkillsSoftQualitySummaryDto'];
13253
+ export type RulesSkillsProposedFileDto = components['schemas']['RulesSkillsProposedFileDto'];
13254
+ export type RulesSkillsValidateResponseDto = components['schemas']['RulesSkillsValidateResponseDto'];
13255
+ export type RulesSkillsOpenPullRequestRequestDto = components['schemas']['RulesSkillsOpenPullRequestRequestDto'];
13256
+ export type RulesSkillsOpenPullRequestResponseDto = components['schemas']['RulesSkillsOpenPullRequestResponseDto'];
13134
13257
  export type PhaseRoleDto = components['schemas']['PhaseRoleDto'];
13135
13258
  export type SquadMemberDto = components['schemas']['SquadMemberDto'];
13136
13259
  export type CustomWorkStreamTaskDto = components['schemas']['CustomWorkStreamTaskDto'];
@@ -22867,6 +22990,134 @@ export interface operations {
22867
22990
  };
22868
22991
  };
22869
22992
  };
22993
+ postRulesSkillsValidate: {
22994
+ parameters: {
22995
+ query?: never;
22996
+ header?: never;
22997
+ path: {
22998
+ workspaceId: components["parameters"]["WorkspaceId"];
22999
+ };
23000
+ cookie?: never;
23001
+ };
23002
+ requestBody: {
23003
+ content: {
23004
+ "application/json": components["schemas"]["RulesSkillsValidateRequestDto"];
23005
+ };
23006
+ };
23007
+ responses: {
23008
+ /** @description Validation result with findings and draft proposed files */
23009
+ 200: {
23010
+ headers: {
23011
+ [name: string]: unknown;
23012
+ };
23013
+ content: {
23014
+ "application/json": components["schemas"]["RulesSkillsValidateResponseDto"];
23015
+ };
23016
+ };
23017
+ /** @description Invalid body (e.g. malformed repoId) */
23018
+ 400: {
23019
+ headers: {
23020
+ [name: string]: unknown;
23021
+ };
23022
+ content: {
23023
+ "application/json": components["schemas"]["ErrorMessageDto"];
23024
+ };
23025
+ };
23026
+ 401: components["responses"]["Unauthorized"];
23027
+ 403: components["responses"]["Forbidden"];
23028
+ /** @description Workspace or repository not found / not connected */
23029
+ 404: {
23030
+ headers: {
23031
+ [name: string]: unknown;
23032
+ };
23033
+ content: {
23034
+ "application/json": components["schemas"]["ErrorMessageDto"];
23035
+ };
23036
+ };
23037
+ /** @description No succeeded readiness scan for the repo (`code: readiness_scan_required`), or repository is not a GitHub-connected readiness repo. */
23038
+ 422: {
23039
+ headers: {
23040
+ [name: string]: unknown;
23041
+ };
23042
+ content: {
23043
+ "application/json": components["schemas"]["ErrorMessageDto"];
23044
+ };
23045
+ };
23046
+ /** @description Clone or GitHub App configuration failed */
23047
+ 503: {
23048
+ headers: {
23049
+ [name: string]: unknown;
23050
+ };
23051
+ content: {
23052
+ "application/json": components["schemas"]["ErrorMessageDto"];
23053
+ };
23054
+ };
23055
+ };
23056
+ };
23057
+ postRulesSkillsPullRequest: {
23058
+ parameters: {
23059
+ query?: never;
23060
+ header?: never;
23061
+ path: {
23062
+ workspaceId: components["parameters"]["WorkspaceId"];
23063
+ };
23064
+ cookie?: never;
23065
+ };
23066
+ requestBody: {
23067
+ content: {
23068
+ "application/json": components["schemas"]["RulesSkillsOpenPullRequestRequestDto"];
23069
+ };
23070
+ };
23071
+ responses: {
23072
+ /** @description Pull request created */
23073
+ 200: {
23074
+ headers: {
23075
+ [name: string]: unknown;
23076
+ };
23077
+ content: {
23078
+ "application/json": components["schemas"]["RulesSkillsOpenPullRequestResponseDto"];
23079
+ };
23080
+ };
23081
+ /** @description Missing proposed files or invalid body (`code: proposed_files_required`). */
23082
+ 400: {
23083
+ headers: {
23084
+ [name: string]: unknown;
23085
+ };
23086
+ content: {
23087
+ "application/json": components["schemas"]["ErrorMessageDto"];
23088
+ };
23089
+ };
23090
+ 401: components["responses"]["Unauthorized"];
23091
+ 403: components["responses"]["Forbidden"];
23092
+ /** @description Workspace or repository not found */
23093
+ 404: {
23094
+ headers: {
23095
+ [name: string]: unknown;
23096
+ };
23097
+ content: {
23098
+ "application/json": components["schemas"]["ErrorMessageDto"];
23099
+ };
23100
+ };
23101
+ /** @description GitHub installation lacks write permissions required for automated PRs */
23102
+ 422: {
23103
+ headers: {
23104
+ [name: string]: unknown;
23105
+ };
23106
+ content: {
23107
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
23108
+ };
23109
+ };
23110
+ /** @description GitHub installation permissions could not be verified, or PR create failed */
23111
+ 503: {
23112
+ headers: {
23113
+ [name: string]: unknown;
23114
+ };
23115
+ content: {
23116
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"] | components["schemas"]["ErrorMessageDto"];
23117
+ };
23118
+ };
23119
+ };
23120
+ };
22870
23121
  getReadinessIssueFixGuide: {
22871
23122
  parameters: {
22872
23123
  query?: never;