@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.
- package/dist/generated/openapi.d.ts +287 -4
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +366 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +287 -4
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.189.0
|
|
5
5
|
description: >
|
|
6
6
|
Contract surface for the AI Driven SDLC backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
@@ -2755,6 +2755,7 @@ paths:
|
|
|
2755
2755
|
- $ref: "#/components/schemas/GrafanaSourceDto"
|
|
2756
2756
|
- $ref: "#/components/schemas/SonarQubeSourceDto"
|
|
2757
2757
|
- $ref: "#/components/schemas/PagerDutySourceDto"
|
|
2758
|
+
- $ref: "#/components/schemas/SentrySourceDto"
|
|
2758
2759
|
- $ref: "#/components/schemas/JiraSourceDto"
|
|
2759
2760
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
2760
2761
|
examples:
|
|
@@ -2877,6 +2878,7 @@ paths:
|
|
|
2877
2878
|
- $ref: "#/components/schemas/GrafanaSourceDto"
|
|
2878
2879
|
- $ref: "#/components/schemas/SonarQubeSourceDto"
|
|
2879
2880
|
- $ref: "#/components/schemas/PagerDutySourceDto"
|
|
2881
|
+
- $ref: "#/components/schemas/SentrySourceDto"
|
|
2880
2882
|
- $ref: "#/components/schemas/JiraSourceDto"
|
|
2881
2883
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
2882
2884
|
examples:
|
|
@@ -9326,6 +9328,143 @@ paths:
|
|
|
9326
9328
|
schema:
|
|
9327
9329
|
$ref: "#/components/schemas/GithubPermissionsCheckFailedErrorDto"
|
|
9328
9330
|
|
|
9331
|
+
/workspaces/{workspaceId}/rules-skills/validate:
|
|
9332
|
+
post:
|
|
9333
|
+
tags: [AgenticFoundation]
|
|
9334
|
+
summary: Validate agent rules and skills for a repository
|
|
9335
|
+
description: >
|
|
9336
|
+
Clones the connected GitHub repository via the workspace GitHub App installation
|
|
9337
|
+
and runs the shared Rules & Skills validate engine (structural + soft quality).
|
|
9338
|
+
Assessed tools come from the latest **succeeded** readiness scan
|
|
9339
|
+
(`agent_tool_assessed`: `cursor` | `claude-code` | `both`). Returns draft
|
|
9340
|
+
`proposedFiles` for review (not committed). Workspace member auth; write
|
|
9341
|
+
permissions are not required for validate-only.
|
|
9342
|
+
operationId: postRulesSkillsValidate
|
|
9343
|
+
parameters:
|
|
9344
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
9345
|
+
requestBody:
|
|
9346
|
+
required: true
|
|
9347
|
+
content:
|
|
9348
|
+
application/json:
|
|
9349
|
+
schema:
|
|
9350
|
+
$ref: "#/components/schemas/RulesSkillsValidateRequestDto"
|
|
9351
|
+
examples:
|
|
9352
|
+
validate:
|
|
9353
|
+
value:
|
|
9354
|
+
repoId: "11111111-1111-4111-8111-111111111111"
|
|
9355
|
+
pathPrefixes:
|
|
9356
|
+
- ".cursor"
|
|
9357
|
+
responses:
|
|
9358
|
+
"200":
|
|
9359
|
+
description: Validation result with findings and draft proposed files
|
|
9360
|
+
content:
|
|
9361
|
+
application/json:
|
|
9362
|
+
schema:
|
|
9363
|
+
$ref: "#/components/schemas/RulesSkillsValidateResponseDto"
|
|
9364
|
+
"400":
|
|
9365
|
+
description: Invalid body (e.g. malformed repoId)
|
|
9366
|
+
content:
|
|
9367
|
+
application/json:
|
|
9368
|
+
schema:
|
|
9369
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9370
|
+
"401":
|
|
9371
|
+
$ref: "#/components/responses/Unauthorized"
|
|
9372
|
+
"403":
|
|
9373
|
+
$ref: "#/components/responses/Forbidden"
|
|
9374
|
+
"404":
|
|
9375
|
+
description: Workspace or repository not found / not connected
|
|
9376
|
+
content:
|
|
9377
|
+
application/json:
|
|
9378
|
+
schema:
|
|
9379
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9380
|
+
"422":
|
|
9381
|
+
description: >
|
|
9382
|
+
No succeeded readiness scan for the repo (`code: readiness_scan_required`),
|
|
9383
|
+
or repository is not a GitHub-connected readiness repo.
|
|
9384
|
+
content:
|
|
9385
|
+
application/json:
|
|
9386
|
+
schema:
|
|
9387
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9388
|
+
examples:
|
|
9389
|
+
readiness_scan_required:
|
|
9390
|
+
value:
|
|
9391
|
+
error: Run an Agentic Foundation readiness scan before validating rules and skills
|
|
9392
|
+
code: readiness_scan_required
|
|
9393
|
+
"503":
|
|
9394
|
+
description: Clone or GitHub App configuration failed
|
|
9395
|
+
content:
|
|
9396
|
+
application/json:
|
|
9397
|
+
schema:
|
|
9398
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9399
|
+
|
|
9400
|
+
/workspaces/{workspaceId}/rules-skills/pull-requests:
|
|
9401
|
+
post:
|
|
9402
|
+
tags: [AgenticFoundation]
|
|
9403
|
+
summary: Open a Rules & Skills remediation pull request
|
|
9404
|
+
description: >
|
|
9405
|
+
Applies `proposedFiles` (or a future create-mode session) onto a non-default
|
|
9406
|
+
branch via the Automations GitHub App installation and opens a pull request.
|
|
9407
|
+
Never pushes to the default branch. PR title/body identify the change as
|
|
9408
|
+
platform-generated and link back to `/agentic-foundation/rules-skills`.
|
|
9409
|
+
Requires workspace editor or admin. Same write-permission gate as readiness fixes.
|
|
9410
|
+
operationId: postRulesSkillsPullRequest
|
|
9411
|
+
parameters:
|
|
9412
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
9413
|
+
requestBody:
|
|
9414
|
+
required: true
|
|
9415
|
+
content:
|
|
9416
|
+
application/json:
|
|
9417
|
+
schema:
|
|
9418
|
+
$ref: "#/components/schemas/RulesSkillsOpenPullRequestRequestDto"
|
|
9419
|
+
examples:
|
|
9420
|
+
validateMode:
|
|
9421
|
+
value:
|
|
9422
|
+
repoId: "11111111-1111-4111-8111-111111111111"
|
|
9423
|
+
mode: validate
|
|
9424
|
+
proposedFiles:
|
|
9425
|
+
- path: ".cursor/rules/foo.mdc"
|
|
9426
|
+
action: rename
|
|
9427
|
+
previousPath: ".cursor/rules/foo.md"
|
|
9428
|
+
content: "---\ndescription: example\nglobs: \"**/*\"\n---\n"
|
|
9429
|
+
responses:
|
|
9430
|
+
"200":
|
|
9431
|
+
description: Pull request created
|
|
9432
|
+
content:
|
|
9433
|
+
application/json:
|
|
9434
|
+
schema:
|
|
9435
|
+
$ref: "#/components/schemas/RulesSkillsOpenPullRequestResponseDto"
|
|
9436
|
+
"400":
|
|
9437
|
+
description: >
|
|
9438
|
+
Missing proposed files or invalid body (`code: proposed_files_required`).
|
|
9439
|
+
content:
|
|
9440
|
+
application/json:
|
|
9441
|
+
schema:
|
|
9442
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9443
|
+
"401":
|
|
9444
|
+
$ref: "#/components/responses/Unauthorized"
|
|
9445
|
+
"403":
|
|
9446
|
+
$ref: "#/components/responses/Forbidden"
|
|
9447
|
+
"404":
|
|
9448
|
+
description: Workspace or repository not found
|
|
9449
|
+
content:
|
|
9450
|
+
application/json:
|
|
9451
|
+
schema:
|
|
9452
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
9453
|
+
"422":
|
|
9454
|
+
description: GitHub installation lacks write permissions required for automated PRs
|
|
9455
|
+
content:
|
|
9456
|
+
application/json:
|
|
9457
|
+
schema:
|
|
9458
|
+
$ref: "#/components/schemas/GithubWritePermissionsRequiredErrorDto"
|
|
9459
|
+
"503":
|
|
9460
|
+
description: GitHub installation permissions could not be verified, or PR create failed
|
|
9461
|
+
content:
|
|
9462
|
+
application/json:
|
|
9463
|
+
schema:
|
|
9464
|
+
oneOf:
|
|
9465
|
+
- $ref: "#/components/schemas/GithubPermissionsCheckFailedErrorDto"
|
|
9466
|
+
- $ref: "#/components/schemas/ErrorMessageDto"
|
|
9467
|
+
|
|
9329
9468
|
/workspaces/{workspaceId}/readiness/issues/{issueId}/fix-guide:
|
|
9330
9469
|
get:
|
|
9331
9470
|
tags: [RepositoryReadiness]
|
|
@@ -15693,6 +15832,66 @@ components:
|
|
|
15693
15832
|
type: string
|
|
15694
15833
|
description: PagerDuty user email when known from the last successful verify.
|
|
15695
15834
|
|
|
15835
|
+
SentrySourceDto:
|
|
15836
|
+
type: object
|
|
15837
|
+
description: >
|
|
15838
|
+
Sentry incident and release source for `PUT /workspaces/{workspaceId}/sources` and
|
|
15839
|
+
`POST /workspaces/{workspaceId}/sources/test`. Requires an organization slug and an auth
|
|
15840
|
+
token with `org:read`, `event:read`, and `project:read`. Issues map to incident events and
|
|
15841
|
+
releases with a commit or environment map to deployment events.
|
|
15842
|
+
required: [type, orgSlug, token]
|
|
15843
|
+
additionalProperties: false
|
|
15844
|
+
properties:
|
|
15845
|
+
type:
|
|
15846
|
+
type: string
|
|
15847
|
+
enum: [sentry]
|
|
15848
|
+
orgSlug:
|
|
15849
|
+
type: string
|
|
15850
|
+
minLength: 1
|
|
15851
|
+
maxLength: 128
|
|
15852
|
+
description: Sentry organization slug (the `{slug}` in `sentry.io/organizations/{slug}/`).
|
|
15853
|
+
token:
|
|
15854
|
+
type: string
|
|
15855
|
+
minLength: 1
|
|
15856
|
+
maxLength: 512
|
|
15857
|
+
description: Sentry auth token (organization or internal integration token, write-only on PUT).
|
|
15858
|
+
baseUrl:
|
|
15859
|
+
type: string
|
|
15860
|
+
description: Optional API base URL for self-hosted Sentry. Default `https://sentry.io/api/0`.
|
|
15861
|
+
projectSlug:
|
|
15862
|
+
type: string
|
|
15863
|
+
description: Optional project slug. When set, only that project's issues and releases are ingested.
|
|
15864
|
+
orgName:
|
|
15865
|
+
type: string
|
|
15866
|
+
description: Optional organization display name from a successful connection test (echo-after-test).
|
|
15867
|
+
|
|
15868
|
+
SentrySourceConfigDto:
|
|
15869
|
+
type: object
|
|
15870
|
+
description: >
|
|
15871
|
+
Redacted Sentry source returned by `GET /workspaces/{workspaceId}/config`.
|
|
15872
|
+
Raw token is never returned.
|
|
15873
|
+
required: [type, hasToken, orgSlug]
|
|
15874
|
+
additionalProperties: false
|
|
15875
|
+
properties:
|
|
15876
|
+
type:
|
|
15877
|
+
type: string
|
|
15878
|
+
enum: [sentry]
|
|
15879
|
+
hasToken:
|
|
15880
|
+
type: boolean
|
|
15881
|
+
description: Whether an auth token is stored for this workspace.
|
|
15882
|
+
orgSlug:
|
|
15883
|
+
type: string
|
|
15884
|
+
description: Configured Sentry organization slug.
|
|
15885
|
+
baseUrl:
|
|
15886
|
+
type: string
|
|
15887
|
+
description: Configured API base URL override, when set.
|
|
15888
|
+
projectSlug:
|
|
15889
|
+
type: string
|
|
15890
|
+
description: Configured project filter, when set.
|
|
15891
|
+
orgName:
|
|
15892
|
+
type: string
|
|
15893
|
+
description: Sentry organization name when known from the last successful verify.
|
|
15894
|
+
|
|
15696
15895
|
JiraSourceDto:
|
|
15697
15896
|
type: object
|
|
15698
15897
|
description: >
|
|
@@ -15973,6 +16172,7 @@ components:
|
|
|
15973
16172
|
- $ref: "#/components/schemas/GrafanaSourceConfigDto"
|
|
15974
16173
|
- $ref: "#/components/schemas/SonarQubeSourceConfigDto"
|
|
15975
16174
|
- $ref: "#/components/schemas/PagerDutySourceConfigDto"
|
|
16175
|
+
- $ref: "#/components/schemas/SentrySourceConfigDto"
|
|
15976
16176
|
- $ref: "#/components/schemas/JiraSourceConfigDto"
|
|
15977
16177
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
15978
16178
|
orgChart:
|
|
@@ -16229,7 +16429,7 @@ components:
|
|
|
16229
16429
|
description: Present for New Relic or Jira verify success — resolved account ID.
|
|
16230
16430
|
orgName:
|
|
16231
16431
|
type: string
|
|
16232
|
-
description: Present for Grafana or
|
|
16432
|
+
description: Present for Grafana, Datadog, or Sentry verify success — resolved organization name.
|
|
16233
16433
|
clusterName:
|
|
16234
16434
|
type: string
|
|
16235
16435
|
description: Present for Prometheus verify success — Alertmanager cluster name.
|
|
@@ -22542,6 +22742,170 @@ components:
|
|
|
22542
22742
|
Required when the issue has unresolvedChoices. Must be one of those labels.
|
|
22543
22743
|
Stored on the fix row and stated in the worker prompt.
|
|
22544
22744
|
|
|
22745
|
+
RulesSkillsAssessedTools:
|
|
22746
|
+
type: string
|
|
22747
|
+
enum: [cursor, claude-code, both]
|
|
22748
|
+
description: >
|
|
22749
|
+
From the latest succeeded readiness scan (`agent_tool_assessed`). Never invent
|
|
22750
|
+
`both` without scan evidence.
|
|
22751
|
+
|
|
22752
|
+
RulesSkillsValidateRequestDto:
|
|
22753
|
+
type: object
|
|
22754
|
+
additionalProperties: false
|
|
22755
|
+
required: [repoId]
|
|
22756
|
+
properties:
|
|
22757
|
+
repoId:
|
|
22758
|
+
type: string
|
|
22759
|
+
format: uuid
|
|
22760
|
+
pathPrefixes:
|
|
22761
|
+
type: array
|
|
22762
|
+
maxItems: 32
|
|
22763
|
+
items:
|
|
22764
|
+
type: string
|
|
22765
|
+
maxLength: 512
|
|
22766
|
+
description: Optional relative path prefixes limiting the validate walk.
|
|
22767
|
+
|
|
22768
|
+
RulesSkillsFindingDto:
|
|
22769
|
+
type: object
|
|
22770
|
+
additionalProperties: false
|
|
22771
|
+
required: [id, kind, severity, code, path, message, criterionIds]
|
|
22772
|
+
properties:
|
|
22773
|
+
id:
|
|
22774
|
+
type: string
|
|
22775
|
+
kind:
|
|
22776
|
+
type: string
|
|
22777
|
+
enum: [structural, soft]
|
|
22778
|
+
severity:
|
|
22779
|
+
type: string
|
|
22780
|
+
enum: [fail, warn]
|
|
22781
|
+
code:
|
|
22782
|
+
type: string
|
|
22783
|
+
path:
|
|
22784
|
+
type: string
|
|
22785
|
+
message:
|
|
22786
|
+
type: string
|
|
22787
|
+
criterionIds:
|
|
22788
|
+
type: array
|
|
22789
|
+
items:
|
|
22790
|
+
type: string
|
|
22791
|
+
enum: [A1, A2, A3, A3a, A3b, A3c, A11]
|
|
22792
|
+
description: Empty when unmapped structural noise.
|
|
22793
|
+
|
|
22794
|
+
RulesSkillsSoftQualityCheckDto:
|
|
22795
|
+
type: object
|
|
22796
|
+
additionalProperties: false
|
|
22797
|
+
required: [code, status]
|
|
22798
|
+
properties:
|
|
22799
|
+
code:
|
|
22800
|
+
type: string
|
|
22801
|
+
status:
|
|
22802
|
+
type: string
|
|
22803
|
+
enum: [pass, fail, warn, skip]
|
|
22804
|
+
message:
|
|
22805
|
+
type: string
|
|
22806
|
+
path:
|
|
22807
|
+
type: string
|
|
22808
|
+
|
|
22809
|
+
RulesSkillsSoftQualitySummaryDto:
|
|
22810
|
+
type: object
|
|
22811
|
+
additionalProperties: false
|
|
22812
|
+
required: [passed, failCount, warnCount, checks]
|
|
22813
|
+
properties:
|
|
22814
|
+
passed:
|
|
22815
|
+
type: boolean
|
|
22816
|
+
description: True when there are no soft-quality fail findings (warns allowed).
|
|
22817
|
+
failCount:
|
|
22818
|
+
type: integer
|
|
22819
|
+
minimum: 0
|
|
22820
|
+
warnCount:
|
|
22821
|
+
type: integer
|
|
22822
|
+
minimum: 0
|
|
22823
|
+
checks:
|
|
22824
|
+
type: array
|
|
22825
|
+
items:
|
|
22826
|
+
$ref: "#/components/schemas/RulesSkillsSoftQualityCheckDto"
|
|
22827
|
+
|
|
22828
|
+
RulesSkillsProposedFileDto:
|
|
22829
|
+
type: object
|
|
22830
|
+
additionalProperties: false
|
|
22831
|
+
required: [path, action]
|
|
22832
|
+
properties:
|
|
22833
|
+
path:
|
|
22834
|
+
type: string
|
|
22835
|
+
maxLength: 1024
|
|
22836
|
+
action:
|
|
22837
|
+
type: string
|
|
22838
|
+
enum: [create, update, delete, rename]
|
|
22839
|
+
content:
|
|
22840
|
+
type: string
|
|
22841
|
+
description: Full file contents for create/update/rename target.
|
|
22842
|
+
previousPath:
|
|
22843
|
+
type: string
|
|
22844
|
+
maxLength: 1024
|
|
22845
|
+
description: Source path when action is rename.
|
|
22846
|
+
|
|
22847
|
+
RulesSkillsValidateResponseDto:
|
|
22848
|
+
type: object
|
|
22849
|
+
additionalProperties: false
|
|
22850
|
+
required: [assessedTools, findings, softQualitySummary, proposedFiles]
|
|
22851
|
+
properties:
|
|
22852
|
+
assessedTools:
|
|
22853
|
+
$ref: "#/components/schemas/RulesSkillsAssessedTools"
|
|
22854
|
+
findings:
|
|
22855
|
+
type: array
|
|
22856
|
+
items:
|
|
22857
|
+
$ref: "#/components/schemas/RulesSkillsFindingDto"
|
|
22858
|
+
softQualitySummary:
|
|
22859
|
+
$ref: "#/components/schemas/RulesSkillsSoftQualitySummaryDto"
|
|
22860
|
+
proposedFiles:
|
|
22861
|
+
type: array
|
|
22862
|
+
items:
|
|
22863
|
+
$ref: "#/components/schemas/RulesSkillsProposedFileDto"
|
|
22864
|
+
note:
|
|
22865
|
+
type: string
|
|
22866
|
+
description: Quiet-case note (e.g. empty tree under pathPrefixes).
|
|
22867
|
+
|
|
22868
|
+
RulesSkillsOpenPullRequestRequestDto:
|
|
22869
|
+
type: object
|
|
22870
|
+
additionalProperties: false
|
|
22871
|
+
required: [repoId, mode]
|
|
22872
|
+
properties:
|
|
22873
|
+
repoId:
|
|
22874
|
+
type: string
|
|
22875
|
+
format: uuid
|
|
22876
|
+
mode:
|
|
22877
|
+
type: string
|
|
22878
|
+
enum: [validate, create]
|
|
22879
|
+
sessionId:
|
|
22880
|
+
type: string
|
|
22881
|
+
format: uuid
|
|
22882
|
+
description: Reserved for Create-mode sessions; validate mode uses proposedFiles.
|
|
22883
|
+
proposedFiles:
|
|
22884
|
+
type: array
|
|
22885
|
+
minItems: 1
|
|
22886
|
+
maxItems: 200
|
|
22887
|
+
items:
|
|
22888
|
+
$ref: "#/components/schemas/RulesSkillsProposedFileDto"
|
|
22889
|
+
title:
|
|
22890
|
+
type: string
|
|
22891
|
+
maxLength: 200
|
|
22892
|
+
body:
|
|
22893
|
+
type: string
|
|
22894
|
+
maxLength: 8000
|
|
22895
|
+
|
|
22896
|
+
RulesSkillsOpenPullRequestResponseDto:
|
|
22897
|
+
type: object
|
|
22898
|
+
additionalProperties: false
|
|
22899
|
+
required: [prUrl, prNumber, branchName]
|
|
22900
|
+
properties:
|
|
22901
|
+
prUrl:
|
|
22902
|
+
type: string
|
|
22903
|
+
format: uri
|
|
22904
|
+
prNumber:
|
|
22905
|
+
type: integer
|
|
22906
|
+
branchName:
|
|
22907
|
+
type: string
|
|
22908
|
+
|
|
22545
22909
|
PhaseRoleDto:
|
|
22546
22910
|
type: object
|
|
22547
22911
|
required: [phase, assignment]
|