@thinkai/tai-api-contract 2.189.0 → 2.190.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.
@@ -3363,6 +3363,26 @@ export interface paths {
3363
3363
  patch?: never;
3364
3364
  trace?: never;
3365
3365
  };
3366
+ "/workspaces/{workspaceId}/rules-skills/create": {
3367
+ parameters: {
3368
+ query?: never;
3369
+ header?: never;
3370
+ path?: never;
3371
+ cookie?: never;
3372
+ };
3373
+ get?: never;
3374
+ put?: never;
3375
+ /**
3376
+ * Draft Rules & Skills via agent execution
3377
+ * @description Generates hub (≥1 of `AGENTS.md` / `CLAUDE.md` per assessed tools) plus ≥1 rule and ≥1 skill with correct stack paths using workspace **agent execution** (`ThinkAiAgent` / same credential path as the fix processor — not Fix Processor enqueue). Runs the shared soft-quality gate from the validate engine. Soft failures block Open PR unless `overrideSoftQuality` + `overrideReason` (audited). Structural failures are never overridable. Requires workspace editor or admin. Assessed tools come from the latest succeeded readiness scan.
3378
+ */
3379
+ post: operations["postRulesSkillsCreate"];
3380
+ delete?: never;
3381
+ options?: never;
3382
+ head?: never;
3383
+ patch?: never;
3384
+ trace?: never;
3385
+ };
3366
3386
  "/workspaces/{workspaceId}/rules-skills/pull-requests": {
3367
3387
  parameters: {
3368
3388
  query?: never;
@@ -3374,7 +3394,7 @@ export interface paths {
3374
3394
  put?: never;
3375
3395
  /**
3376
3396
  * 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.
3397
+ * @description Applies `proposedFiles` (from validate or create drafts) 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. For create mode, pass the `drafts` returned by `POST .../rules-skills/create` as `proposedFiles` after soft-quality passes or a logged override.
3378
3398
  */
3379
3399
  post: operations["postRulesSkillsPullRequest"];
3380
3400
  delete?: never;
@@ -9366,6 +9386,29 @@ export interface components {
9366
9386
  /** @description Quiet-case note (e.g. empty tree under pathPrefixes). */
9367
9387
  note?: string;
9368
9388
  };
9389
+ RulesSkillsCreateRequestDto: {
9390
+ /** Format: uuid */
9391
+ repoId: string;
9392
+ /** @description Optional criterion targets. At least one of `intent` or non-empty `criterionIds` is required. */
9393
+ criterionIds?: ("A1" | "A2" | "A3" | "A3a" | "A3b" | "A3c" | "A11")[];
9394
+ /** @description Free-text create intent (required when criterionIds is empty). */
9395
+ intent?: string;
9396
+ notes?: string;
9397
+ /** @description When true, soft-quality fails are omitted from `blockingFailures` (structural fails always remain). Requires `overrideReason`; audited. */
9398
+ overrideSoftQuality?: boolean;
9399
+ /** @description Required when overrideSoftQuality is true. */
9400
+ overrideReason?: string;
9401
+ };
9402
+ RulesSkillsCreateResponseDto: {
9403
+ assessedTools: components["schemas"]["RulesSkillsAssessedTools"];
9404
+ /** @description Draft patches for review; pass to open-PR as proposedFiles. */
9405
+ drafts: components["schemas"]["RulesSkillsProposedFileDto"][];
9406
+ softQuality: components["schemas"]["RulesSkillsSoftQualitySummaryDto"];
9407
+ /** @description Structural fails always; soft fails unless softQualityOverridden. Open PR should wait until empty (or soft override was logged). */
9408
+ blockingFailures: components["schemas"]["RulesSkillsFindingDto"][];
9409
+ softQualityOverridden: boolean;
9410
+ note?: string;
9411
+ };
9369
9412
  RulesSkillsOpenPullRequestRequestDto: {
9370
9413
  /** Format: uuid */
9371
9414
  repoId: string;
@@ -9373,7 +9416,7 @@ export interface components {
9373
9416
  mode: "validate" | "create";
9374
9417
  /**
9375
9418
  * Format: uuid
9376
- * @description Reserved for Create-mode sessions; validate mode uses proposedFiles.
9419
+ * @description Reserved for persisted create sessions; currently pass proposedFiles.
9377
9420
  */
9378
9421
  sessionId?: string;
9379
9422
  proposedFiles?: components["schemas"]["RulesSkillsProposedFileDto"][];
@@ -9941,7 +9984,7 @@ export interface components {
9941
9984
  * @description Type of workspace lifecycle event.
9942
9985
  * @enum {string}
9943
9986
  */
9944
- 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" | "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.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";
9987
+ 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.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";
9945
9988
  /** @description Current legal-approved opt-in notice, or `unset` while opt-in is unavailable. */
9946
9989
  AggregateUseNoticeStatusDto: {
9947
9990
  /** @enum {string} */
@@ -13284,6 +13327,8 @@ export type RulesSkillsSoftQualityCheckDto = components['schemas']['RulesSkillsS
13284
13327
  export type RulesSkillsSoftQualitySummaryDto = components['schemas']['RulesSkillsSoftQualitySummaryDto'];
13285
13328
  export type RulesSkillsProposedFileDto = components['schemas']['RulesSkillsProposedFileDto'];
13286
13329
  export type RulesSkillsValidateResponseDto = components['schemas']['RulesSkillsValidateResponseDto'];
13330
+ export type RulesSkillsCreateRequestDto = components['schemas']['RulesSkillsCreateRequestDto'];
13331
+ export type RulesSkillsCreateResponseDto = components['schemas']['RulesSkillsCreateResponseDto'];
13287
13332
  export type RulesSkillsOpenPullRequestRequestDto = components['schemas']['RulesSkillsOpenPullRequestRequestDto'];
13288
13333
  export type RulesSkillsOpenPullRequestResponseDto = components['schemas']['RulesSkillsOpenPullRequestResponseDto'];
13289
13334
  export type PhaseRoleDto = components['schemas']['PhaseRoleDto'];
@@ -23086,6 +23131,79 @@ export interface operations {
23086
23131
  };
23087
23132
  };
23088
23133
  };
23134
+ postRulesSkillsCreate: {
23135
+ parameters: {
23136
+ query?: never;
23137
+ header?: never;
23138
+ path: {
23139
+ workspaceId: components["parameters"]["WorkspaceId"];
23140
+ };
23141
+ cookie?: never;
23142
+ };
23143
+ requestBody: {
23144
+ content: {
23145
+ "application/json": components["schemas"]["RulesSkillsCreateRequestDto"];
23146
+ };
23147
+ };
23148
+ responses: {
23149
+ /** @description Drafts generated (may include soft-quality blockingFailures) */
23150
+ 200: {
23151
+ headers: {
23152
+ [name: string]: unknown;
23153
+ };
23154
+ content: {
23155
+ "application/json": components["schemas"]["RulesSkillsCreateResponseDto"];
23156
+ };
23157
+ };
23158
+ /** @description Missing intent and criterionIds, or override without reason (`code: intent_or_criterion_required` | `override_reason_required`) */
23159
+ 400: {
23160
+ headers: {
23161
+ [name: string]: unknown;
23162
+ };
23163
+ content: {
23164
+ "application/json": components["schemas"]["ErrorMessageDto"];
23165
+ };
23166
+ };
23167
+ 401: components["responses"]["Unauthorized"];
23168
+ 403: components["responses"]["Forbidden"];
23169
+ /** @description Workspace, repository, or GitHub installation not found */
23170
+ 404: {
23171
+ headers: {
23172
+ [name: string]: unknown;
23173
+ };
23174
+ content: {
23175
+ "application/json": components["schemas"]["ErrorMessageDto"];
23176
+ };
23177
+ };
23178
+ /** @description No succeeded readiness scan (`readiness_scan_required`), non-GitHub repo, or agent drafts missing required hub/rule/skill coverage (`rules_skills_create_incomplete`) */
23179
+ 422: {
23180
+ headers: {
23181
+ [name: string]: unknown;
23182
+ };
23183
+ content: {
23184
+ "application/json": components["schemas"]["ErrorMessageDto"];
23185
+ };
23186
+ };
23187
+ /** @description Create rate limit exceeded */
23188
+ 429: {
23189
+ headers: {
23190
+ [name: string]: unknown;
23191
+ };
23192
+ content: {
23193
+ "application/json": components["schemas"]["ErrorMessageDto"];
23194
+ };
23195
+ };
23196
+ /** @description Agent execution credential missing (`agent_execution_unavailable`) or clone/agent run failed (`rules_skills_create_failed`) */
23197
+ 503: {
23198
+ headers: {
23199
+ [name: string]: unknown;
23200
+ };
23201
+ content: {
23202
+ "application/json": components["schemas"]["ErrorMessageDto"];
23203
+ };
23204
+ };
23205
+ };
23206
+ };
23089
23207
  postRulesSkillsPullRequest: {
23090
23208
  parameters: {
23091
23209
  query?: never;