@thinkai/tai-api-contract 2.231.2 → 2.233.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.
@@ -4527,6 +4527,26 @@ export interface paths {
4527
4527
  patch?: never;
4528
4528
  trace?: never;
4529
4529
  };
4530
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/arch-doc": {
4531
+ parameters: {
4532
+ query?: never;
4533
+ header?: never;
4534
+ path?: never;
4535
+ cookie?: never;
4536
+ };
4537
+ /**
4538
+ * Architecture document (.arch.md) for one repository index
4539
+ * @description The standard-shaped architecture document the last scan stored, beside how the document step ended. It is written during indexing from the code, and is the only architecture artifact: the short fields Ask searches are read out of it. Read-only; never calls a model. A repository scanned without documents returns status `missing` and a plain-words next step.
4540
+ */
4541
+ get: operations["getCodeChatArchDoc"];
4542
+ put?: never;
4543
+ post?: never;
4544
+ delete?: never;
4545
+ options?: never;
4546
+ head?: never;
4547
+ patch?: never;
4548
+ trace?: never;
4549
+ };
4530
4550
  "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki-config": {
4531
4551
  parameters: {
4532
4552
  query?: never;
@@ -7521,6 +7541,29 @@ export interface components {
7521
7541
  reason: components["schemas"]["AgentExecutionSkipReasonDto"];
7522
7542
  }[];
7523
7543
  };
7544
+ /** @description Model ids for one Code Intelligence task. A model id left out uses the platform default for the task (or, for `ask_explore`, the `ask_synthesize` pick). `useWorkspaceModel: true` runs the workspace-wide `cursorModel` / `claudeModel` instead and cannot be combined with a model id. */
7545
+ CodeIntelligenceTaskModelDto: {
7546
+ /** @description When true, the task runs the workspace-wide model instead of the platform default. */
7547
+ useWorkspaceModel?: boolean | null;
7548
+ cursorModel?: string | null;
7549
+ claudeModel?: string | null;
7550
+ };
7551
+ /** @description Platform default model ids per Code Intelligence task. */
7552
+ CodeIntelligenceTaskModelDefaultsDto: {
7553
+ index_bulk: components["schemas"]["CodeIntelligenceTaskModelDefaultDto"];
7554
+ ask_synthesize: components["schemas"]["CodeIntelligenceTaskModelDefaultDto"];
7555
+ ask_explore: components["schemas"]["CodeIntelligenceTaskModelDefaultDto"];
7556
+ };
7557
+ CodeIntelligenceTaskModelDefaultDto: {
7558
+ cursorModel: string;
7559
+ claudeModel: string;
7560
+ };
7561
+ /** @description Per-task model routing for Code Intelligence (ECG use cases). `index_bulk` is high-volume index-time work (rule-card describe, wiki outline and enrich). `ask_synthesize` writes the Ask answer. `ask_explore` is the Explore planner and inherits `ask_synthesize` when its cell is empty. A task with no cell runs the platform default for that task (see `codeIntelligenceTaskModelDefaults` on the workspace configuration). Set `useWorkspaceModel` on a task to run the workspace-wide `cursorModel` / `claudeModel` instead. Null clears every per-task model. Unknown task keys are rejected. */
7562
+ CodeIntelligenceModelsByTaskDto: {
7563
+ index_bulk?: components["schemas"]["CodeIntelligenceTaskModelDto"];
7564
+ ask_synthesize?: components["schemas"]["CodeIntelligenceTaskModelDto"];
7565
+ ask_explore?: components["schemas"]["CodeIntelligenceTaskModelDto"];
7566
+ } | null;
7524
7567
  /** @description Partial update for Code Intelligence workspace settings (admin-only). */
7525
7568
  PutCodeIntelligenceSettingsDto: {
7526
7569
  enabled?: boolean;
@@ -7529,6 +7572,7 @@ export interface components {
7529
7572
  provider?: components["schemas"]["AgentExecutionProviderDto"] | null;
7530
7573
  cursorModel?: string | null;
7531
7574
  claudeModel?: string | null;
7575
+ modelsByTask?: components["schemas"]["CodeIntelligenceModelsByTaskDto"] | null;
7532
7576
  /** @description When false, turning Engineering Context Graph on and the cadence tick do not enqueue index jobs. Stored graphs, wiki pages, and agent.md stay. Defaults to true. */
7533
7577
  indexingEnabled?: boolean;
7534
7578
  /**
@@ -7657,6 +7701,10 @@ export interface components {
7657
7701
  codeIntelligenceCursorModel?: string | null;
7658
7702
  /** @description Optional Claude model override for Code Intelligence (null/empty → env default). */
7659
7703
  codeIntelligenceClaudeModel?: string | null;
7704
+ /** @description Per-task model routing (`index_bulk`, `ask_synthesize`, `ask_explore`). Null when every task runs its platform default. */
7705
+ codeIntelligenceModelsByTask?: components["schemas"]["CodeIntelligenceModelsByTaskDto"] | null;
7706
+ /** @description The model each task runs when it has no cell of its own (the platform default), per provider. The screen reads this so it never states a model the server does not use. */
7707
+ readonly codeIntelligenceTaskModelDefaults?: components["schemas"]["CodeIntelligenceTaskModelDefaultsDto"];
7660
7708
  /** @description When false, enable-enqueue and the cadence tick do not start an index wave. Defaults to true. */
7661
7709
  codeIntelligenceIndexingEnabled?: boolean;
7662
7710
  /**
@@ -13289,6 +13337,48 @@ export interface components {
13289
13337
  updatedAt: string;
13290
13338
  /** @description True when the indexed graph stores durable code excerpts (required for useful chat answers). */
13291
13339
  hasCodeExcerpts?: boolean;
13340
+ /** @description How the decision-line card step ended on the last scan. Null when no card step has reported for this index (scanned before cards existed, or by an older worker). */
13341
+ ruleCards?: components["schemas"]["CodeChatIndexRuleCardsDto"] | null;
13342
+ /** @description How the architecture document step ended on the last scan. Null when no document step has reported for this index (documents off, or scanned by an older worker). */
13343
+ archDoc?: components["schemas"]["CodeChatIndexArchDocDto"] | null;
13344
+ };
13345
+ CodeChatIndexRuleCardsDto: {
13346
+ /**
13347
+ * @description ready: every card was embedded. partial: some cards have no description or were not embedded; the rest are searchable. failed: the step errored and cards from the last good scan are kept. skipped: the step did not run (turned off, or no model or embeddings key).
13348
+ * @enum {string}
13349
+ */
13350
+ status: "ready" | "partial" | "failed" | "skipped";
13351
+ /** @description Plain-words explanation and next step. Null when status is ready with cards written. */
13352
+ reason: string | null;
13353
+ /** @description Decision lines found in this repository. */
13354
+ cards: number;
13355
+ /** Format: date-time */
13356
+ updatedAt: string | null;
13357
+ };
13358
+ CodeChatIndexArchDocDto: {
13359
+ /**
13360
+ * @description ready: document stored for this commit. failed: the step errored and the earlier document is kept. skipped: the step did not run (no model key, or too little code).
13361
+ * @enum {string}
13362
+ */
13363
+ status: "ready" | "failed" | "skipped";
13364
+ /** @description Plain-words explanation and next step. */
13365
+ reason: string | null;
13366
+ /** Format: date-time */
13367
+ updatedAt: string | null;
13368
+ };
13369
+ CodeChatArchDocViewDto: {
13370
+ /**
13371
+ * @description missing means no step has reported and nothing is stored.
13372
+ * @enum {string}
13373
+ */
13374
+ status: "ready" | "failed" | "skipped" | "missing";
13375
+ reason: string | null;
13376
+ /** Format: date-time */
13377
+ updatedAt: string | null;
13378
+ /** @description The document was written for an earlier commit than the index now holds. */
13379
+ stale: boolean;
13380
+ /** @description The `.arch.md` file content. Standard headings, in the same order for every repository. */
13381
+ markdown: string | null;
13292
13382
  };
13293
13383
  CodeChatIndexLastChangeDto: {
13294
13384
  priorCommitSha: string;
@@ -13321,6 +13411,13 @@ export interface components {
13321
13411
  phase?: "cloning" | "indexing" | "track_a" | "track_b" | "completing" | null;
13322
13412
  /** @description Human-readable detail (e.g. enriching · page 3/8 · how-it-works). */
13323
13413
  phaseDetail?: string | null;
13414
+ /** @description The steps this scan runs, in order, with each step's status. Only planned steps appear (for example decision lines and the architecture document only when enabled, wiki only when the scan writes pages). Null for jobs queued before this field existed. */
13415
+ steps?: {
13416
+ /** @enum {string} */
13417
+ key: "acquire" | "extract" | "model" | "decision_lines" | "arch_doc" | "wiki";
13418
+ /** @enum {string} */
13419
+ status: "planned" | "running" | "done" | "skipped" | "failed";
13420
+ }[] | null;
13324
13421
  /** Format: date-time */
13325
13422
  phaseUpdatedAt?: string | null;
13326
13423
  trackAStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
@@ -15148,6 +15245,10 @@ export type AgentExecutionProviderDto = components['schemas']['AgentExecutionPro
15148
15245
  export type PutAgentExecutionProvidersDto = components['schemas']['PutAgentExecutionProvidersDto'];
15149
15246
  export type AgentExecutionSkipReasonDto = components['schemas']['AgentExecutionSkipReasonDto'];
15150
15247
  export type AgentExecutionFallbackDto = components['schemas']['AgentExecutionFallbackDto'];
15248
+ export type CodeIntelligenceTaskModelDto = components['schemas']['CodeIntelligenceTaskModelDto'];
15249
+ export type CodeIntelligenceTaskModelDefaultsDto = components['schemas']['CodeIntelligenceTaskModelDefaultsDto'];
15250
+ export type CodeIntelligenceTaskModelDefaultDto = components['schemas']['CodeIntelligenceTaskModelDefaultDto'];
15251
+ export type CodeIntelligenceModelsByTaskDto = components['schemas']['CodeIntelligenceModelsByTaskDto'];
15151
15252
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
15152
15253
  export type CodeWikiGuidanceTopicDto = components['schemas']['CodeWikiGuidanceTopicDto'];
15153
15254
  export type PutCodeIntelligenceAgentMdDto = components['schemas']['PutCodeIntelligenceAgentMdDto'];
@@ -15667,6 +15768,9 @@ export type InsightsRecommendationsPageBundleResponse = components['schemas']['I
15667
15768
  export type CodeChatIndexStatus = components['schemas']['CodeChatIndexStatus'];
15668
15769
  export type CodeChatIndexer = components['schemas']['CodeChatIndexer'];
15669
15770
  export type CodeChatIndexDto = components['schemas']['CodeChatIndexDto'];
15771
+ export type CodeChatIndexRuleCardsDto = components['schemas']['CodeChatIndexRuleCardsDto'];
15772
+ export type CodeChatIndexArchDocDto = components['schemas']['CodeChatIndexArchDocDto'];
15773
+ export type CodeChatArchDocViewDto = components['schemas']['CodeChatArchDocViewDto'];
15670
15774
  export type CodeChatIndexLastChangeDto = components['schemas']['CodeChatIndexLastChangeDto'];
15671
15775
  export type CodeKnowledgeJobDto = components['schemas']['CodeKnowledgeJobDto'];
15672
15776
  export type CodeKnowledgeTrackStatus = components['schemas']['CodeKnowledgeTrackStatus'];
@@ -28312,6 +28416,37 @@ export interface operations {
28312
28416
  };
28313
28417
  };
28314
28418
  };
28419
+ getCodeChatArchDoc: {
28420
+ parameters: {
28421
+ query?: never;
28422
+ header?: never;
28423
+ path: {
28424
+ workspaceId: components["parameters"]["WorkspaceId"];
28425
+ indexId: string;
28426
+ };
28427
+ cookie?: never;
28428
+ };
28429
+ requestBody?: never;
28430
+ responses: {
28431
+ /** @description Document and step outcome */
28432
+ 200: {
28433
+ headers: {
28434
+ [name: string]: unknown;
28435
+ };
28436
+ content: {
28437
+ "application/json": components["schemas"]["CodeChatArchDocViewDto"];
28438
+ };
28439
+ };
28440
+ 401: components["responses"]["Unauthorized"];
28441
+ /** @description Index not found */
28442
+ 404: {
28443
+ headers: {
28444
+ [name: string]: unknown;
28445
+ };
28446
+ content?: never;
28447
+ };
28448
+ };
28449
+ };
28315
28450
  getCodeChatEffectiveWikiConfig: {
28316
28451
  parameters: {
28317
28452
  query?: never;