@thinkai/tai-api-contract 2.110.0 → 2.111.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.
@@ -2755,6 +2755,26 @@ export interface paths {
2755
2755
  patch?: never;
2756
2756
  trace?: never;
2757
2757
  };
2758
+ "/workspaces/{workspaceId}/code-intelligence/token-usage/summary": {
2759
+ parameters: {
2760
+ query?: never;
2761
+ header?: never;
2762
+ path?: never;
2763
+ cookie?: never;
2764
+ };
2765
+ /**
2766
+ * ECG token usage rollup for this workspace
2767
+ * @description Member-readable totals and per-operation breakdown from `tai_workspace_code_intelligence_token_usage` (Ask, wiki enrich, PRD, workspace KB, wiki.json outline). Default window is 30 days (max 90).
2768
+ */
2769
+ get: operations["getCodeIntelligenceTokenUsageSummary"];
2770
+ put?: never;
2771
+ post?: never;
2772
+ delete?: never;
2773
+ options?: never;
2774
+ head?: never;
2775
+ patch?: never;
2776
+ trace?: never;
2777
+ };
2758
2778
  "/workspaces/{workspaceId}/repo-eligibility": {
2759
2779
  parameters: {
2760
2780
  query?: never;
@@ -2994,6 +3014,118 @@ export interface paths {
2994
3014
  patch?: never;
2995
3015
  trace?: never;
2996
3016
  };
3017
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki-config": {
3018
+ parameters: {
3019
+ query?: never;
3020
+ header?: never;
3021
+ path?: never;
3022
+ cookie?: never;
3023
+ };
3024
+ /** Effective wiki.json for an index (server + repo + workspace) */
3025
+ get: operations["getCodeChatEffectiveWikiConfig"];
3026
+ put?: never;
3027
+ post?: never;
3028
+ delete?: never;
3029
+ options?: never;
3030
+ head?: never;
3031
+ patch?: never;
3032
+ trace?: never;
3033
+ };
3034
+ "/workspaces/{workspaceId}/knowledge-pages": {
3035
+ parameters: {
3036
+ query?: never;
3037
+ header?: never;
3038
+ path?: never;
3039
+ cookie?: never;
3040
+ };
3041
+ /** List workspace knowledge base pages (no repo pick) */
3042
+ get: operations["listWorkspaceKnowledgePages"];
3043
+ put?: never;
3044
+ post?: never;
3045
+ delete?: never;
3046
+ options?: never;
3047
+ head?: never;
3048
+ patch?: never;
3049
+ trace?: never;
3050
+ };
3051
+ "/workspaces/{workspaceId}/knowledge-pages/generate": {
3052
+ parameters: {
3053
+ query?: never;
3054
+ header?: never;
3055
+ path?: never;
3056
+ cookie?: never;
3057
+ };
3058
+ get?: never;
3059
+ put?: never;
3060
+ /**
3061
+ * Generate the cross-repo workspace knowledge base
3062
+ * @description Synthesizes workspace-level pages from the repository wikis that already exist. Does not clone or re-index. Replaces the whole workspace knowledge base.
3063
+ */
3064
+ post: operations["generateWorkspaceKnowledgePages"];
3065
+ delete?: never;
3066
+ options?: never;
3067
+ head?: never;
3068
+ patch?: never;
3069
+ trace?: never;
3070
+ };
3071
+ "/workspaces/{workspaceId}/knowledge-pages/prd/generate": {
3072
+ parameters: {
3073
+ query?: never;
3074
+ header?: never;
3075
+ path?: never;
3076
+ cookie?: never;
3077
+ };
3078
+ get?: never;
3079
+ put?: never;
3080
+ /**
3081
+ * Generate a workspace-scoped PRD draft
3082
+ * @description Builds a PRD draft from ready repository wikis, code graphs, and platform evidence (readiness, quality, delivery, AI adoption, monitoring). Upserts one workspace knowledge page (`prd-<slug>` / `prd-draft`) without replacing the whole knowledge base.
3083
+ */
3084
+ post: operations["generatePrdDraft"];
3085
+ delete?: never;
3086
+ options?: never;
3087
+ head?: never;
3088
+ patch?: never;
3089
+ trace?: never;
3090
+ };
3091
+ "/workspaces/{workspaceId}/code-intelligence/repo-wiki-json": {
3092
+ parameters: {
3093
+ query?: never;
3094
+ header?: never;
3095
+ path?: never;
3096
+ cookie?: never;
3097
+ };
3098
+ /** List repositories with an admin wiki.json override (admin only) */
3099
+ get: operations["listRepoWikiJsonSummaries"];
3100
+ put?: never;
3101
+ post?: never;
3102
+ delete?: never;
3103
+ options?: never;
3104
+ head?: never;
3105
+ patch?: never;
3106
+ trace?: never;
3107
+ };
3108
+ "/workspaces/{workspaceId}/code-intelligence/repos/{repoId}/wiki-json": {
3109
+ parameters: {
3110
+ query?: never;
3111
+ header?: never;
3112
+ path?: never;
3113
+ cookie?: never;
3114
+ };
3115
+ /** Get the admin wiki.json override for a repository (admin only) */
3116
+ get: operations["getRepoWikiJson"];
3117
+ /**
3118
+ * Write or clear the admin wiki.json override for a repository (admin only)
3119
+ * @description Sits between workspace guidance and the in-repo `.aidrivensdlc/wiki.json`, so a file committed to the repository still wins.
3120
+ */
3121
+ put: operations["putRepoWikiJson"];
3122
+ post?: never;
3123
+ delete?: never;
3124
+ options?: never;
3125
+ head?: never;
3126
+ patch?: never;
3127
+ trace?: never;
3128
+ };
2997
3129
  "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/export": {
2998
3130
  parameters: {
2999
3131
  query?: never;
@@ -4316,6 +4448,23 @@ export interface components {
4316
4448
  provider?: components["schemas"]["AgentExecutionProviderDto"] | null;
4317
4449
  cursorModel?: string | null;
4318
4450
  claudeModel?: string | null;
4451
+ /** @description Deep Wiki documentation focus for this workspace. Steers topic planning when generating Engineering Context wiki pages. Optional in-repo `.aidrivensdlc/wiki.json` still overrides the topic outline when present. */
4452
+ wikiGuidance?: components["schemas"]["CodeWikiGuidanceDto"] | null;
4453
+ };
4454
+ CodeWikiGuidanceTopicDto: {
4455
+ title: string;
4456
+ purpose: string;
4457
+ /** @description Title of the parent topic for hierarchy (must match another topic title). */
4458
+ parentTitle?: string | null;
4459
+ };
4460
+ CodeWikiGuidanceDto: {
4461
+ /**
4462
+ * @description Free-form notes describing what the wiki should emphasize.
4463
+ * @default
4464
+ */
4465
+ guidance: string;
4466
+ /** @description Preferred topic outline for Deep Wiki pages. */
4467
+ topics?: components["schemas"]["CodeWikiGuidanceTopicDto"][];
4319
4468
  };
4320
4469
  WorkspaceConfigDto: {
4321
4470
  sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["JiraSourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
@@ -4346,6 +4495,8 @@ export interface components {
4346
4495
  hasCodeIntelligenceExecutionToken?: boolean;
4347
4496
  /** @description Federated-readiness delivery topology: which connected repos hold terraform / gitops / ci_templates / api_contracts truth for this workspace. Null when not configured. Change via `PUT /workspaces/{workspaceId}/delivery-topology`. */
4348
4497
  deliveryTopology?: components["schemas"]["DeliveryTopologyDto"] | null;
4498
+ /** @description Deep Wiki documentation focus for this workspace (guidance notes + optional topic outline). Saved via `PUT /workspaces/{workspaceId}/code-intelligence` (`wikiGuidance`). */
4499
+ codeWikiGuidance?: components["schemas"]["CodeWikiGuidanceDto"];
4349
4500
  };
4350
4501
  DeliveryRoleConfigDto: {
4351
4502
  /** @description Connected workspace repo (`owner/repo`) that holds this role's artifacts. */
@@ -7892,6 +8043,8 @@ export interface components {
7892
8043
  errorMessage?: string | null;
7893
8044
  /** @description Human-readable indexing stage while a job is running (queued, clone, graph, save, wiki). Cleared when the index is ready or failed. */
7894
8045
  progressMessage?: string | null;
8046
+ /** @description Active knowledge job for this repo when status is queued/running — phase, tracks, and token/cost rollups for SPA transparency (Wave 1). */
8047
+ knowledgeJob?: components["schemas"]["CodeKnowledgeJobDto"] | null;
7895
8048
  /** Format: date-time */
7896
8049
  indexedAt?: string | null;
7897
8050
  /** Format: date-time */
@@ -7901,6 +8054,47 @@ export interface components {
7901
8054
  /** @description True when the indexed graph stores durable code excerpts (required for useful chat answers). */
7902
8055
  hasCodeExcerpts?: boolean;
7903
8056
  };
8057
+ CodeKnowledgeJobDto: {
8058
+ /** Format: uuid */
8059
+ id: string;
8060
+ /** Format: uuid */
8061
+ workspaceId: string;
8062
+ /** Format: uuid */
8063
+ repoId: string;
8064
+ /** Format: uuid */
8065
+ indexId?: string | null;
8066
+ /** @enum {string} */
8067
+ status: "queued" | "running" | "completed" | "failed";
8068
+ /**
8069
+ * @description Coarse UX phase while status=running.
8070
+ * @enum {string|null}
8071
+ */
8072
+ phase?: "cloning" | "indexing" | "track_a" | "track_b" | "completing" | null;
8073
+ /** @description Human-readable detail (e.g. enriching · page 3/8 · how-it-works). */
8074
+ phaseDetail?: string | null;
8075
+ /** Format: date-time */
8076
+ phaseUpdatedAt?: string | null;
8077
+ trackAStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8078
+ trackBStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8079
+ graphStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8080
+ inputTokensTotal: number;
8081
+ outputTokensTotal: number;
8082
+ estimatedCostUsdTotal: number;
8083
+ llmInvocationCount: number;
8084
+ lastProvider?: string | null;
8085
+ lastModel?: string | null;
8086
+ lastKeySource?: string | null;
8087
+ errorMessage?: string | null;
8088
+ /** Format: date-time */
8089
+ createdAt: string;
8090
+ /** Format: date-time */
8091
+ updatedAt: string;
8092
+ };
8093
+ /**
8094
+ * @description Per-track status for dual-track Deep Wiki (Track A skeleton, Track B enrich, graph index).
8095
+ * @enum {string|null}
8096
+ */
8097
+ CodeKnowledgeTrackStatus: "pending" | "running" | "completed" | "skipped" | "failed" | null;
7904
8098
  CodeChatIndexListDto: {
7905
8099
  items: components["schemas"]["CodeChatIndexDto"][];
7906
8100
  };
@@ -7992,6 +8186,11 @@ export interface components {
7992
8186
  };
7993
8187
  CodeChatPostMessageBodyDto: {
7994
8188
  content: string;
8189
+ /**
8190
+ * @description Optional Ask tone preference (FE localStorage / request — not a DB role)
8191
+ * @enum {string}
8192
+ */
8193
+ persona?: "engineer" | "lead" | "pm";
7995
8194
  };
7996
8195
  CodeChatMessageReplyDto: components["schemas"]["CodeChatMessageDto"] & {
7997
8196
  /**
@@ -8005,6 +8204,16 @@ export interface components {
8005
8204
  groundedInWiki?: boolean;
8006
8205
  /** @description Repository names whose wiki pages grounded the answer */
8007
8206
  wikiRepos?: string[];
8207
+ /** @description True when platform evidence tools P–U contributed facts */
8208
+ groundedInPlatform?: boolean;
8209
+ /** @description Tool ids that returned data (e.g. readiness_summary) */
8210
+ platformToolIds?: string[];
8211
+ /**
8212
+ * @description Classified Ask intent for the turn
8213
+ * @enum {string}
8214
+ */
8215
+ intent?: "inventory_apis" | "inventory_modules" | "explain" | "platform_ops" | "feature_impact" | "prd_request";
8216
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8008
8217
  };
8009
8218
  CodeChatApiRouteRowDto: {
8010
8219
  method: string;
@@ -8050,10 +8259,181 @@ export interface components {
8050
8259
  sortOrder: number;
8051
8260
  sourcePaths: string[];
8052
8261
  diagramMermaid?: string | null;
8262
+ /**
8263
+ * @description Deep Wiki page quality chip (D6 / D12).
8264
+ * @enum {string}
8265
+ */
8266
+ enrichmentStatus?: "skeleton" | "enriched" | "shallow" | "needs_review";
8267
+ /** Format: date-time */
8268
+ createdAt: string;
8269
+ /** Format: date-time */
8270
+ updatedAt: string;
8271
+ };
8272
+ EffectiveWikiConfigDto: {
8273
+ /** @description Layers that contributed, in applied order. Later layers win: server_default → workspace_guidance → admin_repo → repo_override. */
8274
+ sources: ("server_default" | "workspace_guidance" | "admin_repo" | "repo_override")[];
8275
+ repoOverridePath?: string | null;
8276
+ /** @description Effective wiki.json document (version, pages, slugAllowlist, diagramPolicies). */
8277
+ document: {
8278
+ [key: string]: unknown;
8279
+ };
8280
+ };
8281
+ /** @description Admin-authored wiki.json override stored for a single repository. */
8282
+ RepoWikiJsonDto: {
8283
+ /** Format: uuid */
8284
+ repoId: string;
8285
+ repoName: string;
8286
+ providerSlug: string;
8287
+ /** @description Stored wiki.json document, or null when no override is set. */
8288
+ document: {
8289
+ [key: string]: unknown;
8290
+ } | null;
8291
+ hasOverride: boolean;
8292
+ /** Format: date-time */
8293
+ updatedAt: string | null;
8294
+ /** Format: uuid */
8295
+ updatedBy: string | null;
8296
+ };
8297
+ /** @description Wiki.json override to store. Send `document: null`, or a document with no usable pages, notes, allowlist, or diagram policies, to clear the override. */
8298
+ PutRepoWikiJsonDto: {
8299
+ document?: {
8300
+ [key: string]: unknown;
8301
+ } | null;
8302
+ };
8303
+ RepoWikiJsonSummaryDto: {
8304
+ /** Format: uuid */
8305
+ repoId: string;
8306
+ repoName: string;
8307
+ providerSlug: string;
8308
+ hasOverride: boolean;
8309
+ /** Format: date-time */
8310
+ updatedAt: string | null;
8311
+ /** Format: uuid */
8312
+ updatedBy: string | null;
8313
+ };
8314
+ RepoWikiJsonSummaryListDto: {
8315
+ items: components["schemas"]["RepoWikiJsonSummaryDto"][];
8316
+ };
8317
+ GenerateWorkspaceKnowledgePagesBodyDto: {
8318
+ /** @description Ready repository indexes to synthesize from. Omit or send empty for all ready indexes. */
8319
+ repoIds?: string[];
8320
+ };
8321
+ GenerateWorkspaceKnowledgePagesResultDto: {
8322
+ items: components["schemas"]["WorkspaceKnowledgePageDto"][];
8323
+ /**
8324
+ * @description llm when a model produced page bodies; deterministic when synthesized from wiki text alone.
8325
+ * @enum {string}
8326
+ */
8327
+ mode: "deterministic" | "llm";
8328
+ repoIds: string[];
8329
+ /** @description Platform evidence tool ids that contributed facts (P–U) */
8330
+ platformToolIds?: string[];
8331
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8332
+ };
8333
+ GeneratePrdDraftBodyDto: {
8334
+ /** @description Feature or change the PRD should describe */
8335
+ featureIntent: string;
8336
+ /** @description Ready repository indexes to analyze. Omit or send empty for all ready indexes. */
8337
+ repoIds?: string[];
8338
+ /**
8339
+ * @description Draft voice preference (FE localStorage / request)
8340
+ * @enum {string}
8341
+ */
8342
+ persona?: "engineer" | "lead" | "pm";
8343
+ };
8344
+ GeneratePrdDraftResultDto: {
8345
+ item: components["schemas"]["WorkspaceKnowledgePageDto"];
8346
+ /** @enum {string} */
8347
+ mode: "deterministic" | "llm";
8348
+ repoIds: string[];
8349
+ /** @description Persisted workspace knowledge page slug (prd-draft or prd-<safe-slug>) */
8350
+ slug: string;
8351
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8352
+ };
8353
+ WorkspaceKnowledgePageDto: {
8354
+ /** Format: uuid */
8355
+ id: string;
8356
+ /** Format: uuid */
8357
+ workspaceId: string;
8358
+ slug: string;
8359
+ title: string;
8360
+ bodyMd: string;
8361
+ sortOrder: number;
8362
+ sourceRepoIds: string[];
8363
+ /** @enum {string} */
8364
+ status: "draft" | "published" | "needs_review";
8053
8365
  /** Format: date-time */
8054
8366
  createdAt: string;
8055
8367
  /** Format: date-time */
8056
8368
  updatedAt: string;
8369
+ /** @description First readable prose sentence for list previews */
8370
+ excerpt?: string;
8371
+ /** @description Display names for sourceRepoIds when resolvable */
8372
+ sourceRepoNames?: string[];
8373
+ };
8374
+ WorkspaceKnowledgeSystemContextDto: {
8375
+ indexes: {
8376
+ /** Format: uuid */
8377
+ repoId: string;
8378
+ repoName: string;
8379
+ /** Format: uuid */
8380
+ indexId: string;
8381
+ nodeCount: number;
8382
+ edgeCount: number;
8383
+ commitSha?: string | null;
8384
+ indexer?: string | null;
8385
+ knowledgeJobPhase?: string | null;
8386
+ knowledgeJobStatus?: string | null;
8387
+ }[];
8388
+ platformToolIds: string[];
8389
+ platformMissingToolIds: string[];
8390
+ /** @description Bounded markdown summary of platform evidence for the system panel */
8391
+ platformSnippet?: string;
8392
+ };
8393
+ WorkspaceKnowledgePageListDto: {
8394
+ items: components["schemas"]["WorkspaceKnowledgePageDto"][];
8395
+ systemContext?: components["schemas"]["WorkspaceKnowledgeSystemContextDto"];
8396
+ };
8397
+ CodeIntelligenceUsageDto: {
8398
+ /** @description Ledger operation key (code_chat, prd_generate, workspace_kb, wiki_json_outline, wiki_enrich, …) */
8399
+ operation: string;
8400
+ provider: string;
8401
+ model?: string | null;
8402
+ inputTokens: number;
8403
+ outputTokens: number;
8404
+ estimatedCostUsd?: number | null;
8405
+ estimated?: boolean;
8406
+ };
8407
+ CodeIntelligenceTokenUsageByOperationDto: {
8408
+ operation: string;
8409
+ inputTokens: number;
8410
+ outputTokens: number;
8411
+ estimatedCostUsd: number;
8412
+ invocationCount: number;
8413
+ };
8414
+ CodeIntelligenceTokenUsageByRepoDto: {
8415
+ /** Format: uuid */
8416
+ repoId: string;
8417
+ repoName?: string | null;
8418
+ inputTokens: number;
8419
+ outputTokens: number;
8420
+ estimatedCostUsd: number;
8421
+ invocationCount: number;
8422
+ byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
8423
+ };
8424
+ CodeIntelligenceTokenUsageSummaryDto: {
8425
+ days: number;
8426
+ inputTokensTotal: number;
8427
+ outputTokensTotal: number;
8428
+ estimatedCostUsdTotal: number;
8429
+ invocationCountTotal: number;
8430
+ /** @description True when any cost was derived from published model rates because the provider reported tokens without a price (for example the Cursor agent CLI). */
8431
+ costEstimated?: boolean;
8432
+ /** @description Rate basis used for the derived cost, for display in tooltips. */
8433
+ costBasis?: string | null;
8434
+ byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
8435
+ /** @description Per-repository split (wiki generation, conversations, outline). Only rows with repository attribution appear here; workspace-wide operations stay in totals. */
8436
+ byRepo: components["schemas"]["CodeIntelligenceTokenUsageByRepoDto"][];
8057
8437
  };
8058
8438
  CodeChatWikiPageListDto: {
8059
8439
  items: components["schemas"]["CodeChatWikiPageDto"][];
@@ -8179,7 +8559,7 @@ export interface components {
8179
8559
  * @description Omit or send `auto` to let the server pick the most informative view for the repository. `blast` traces `query` as a symbol and falls back to a focused subgraph, or to impact hotspots when `query` is empty.
8180
8560
  * @enum {string}
8181
8561
  */
8182
- kind?: "auto" | "dependency" | "module" | "focus" | "impact" | "blast" | "atlas";
8562
+ kind?: "auto" | "dependency" | "module" | "focus" | "impact" | "blast" | "atlas" | "call_graph" | "cfg_lite" | "dataflow" | "ssa" | "terraform_deps" | "layers" | "domain" | "runtime" | "communication" | "delivery";
8183
8563
  /** @description Symbol, path, or plain-language request ("how does billing reach the ledger"). Free text is resolved against the graph to seed a focused view. */
8184
8564
  query?: string;
8185
8565
  /** @description Deprecated alias for `query`. */
@@ -8203,9 +8583,45 @@ export interface components {
8203
8583
  * @description Which reading of the repository this diagram is. `module` rolls files up into source groups when too few file dependencies resolved for a file map, `focus` answers a plain-language request, `impact` shows the most depended-on files, and `blast` traces one symbol.
8204
8584
  * @enum {string}
8205
8585
  */
8206
- kind?: "dependency" | "module" | "focus" | "impact" | "blast";
8586
+ kind?: "dependency" | "module" | "focus" | "impact" | "blast" | "call_graph" | "cfg_lite" | "dataflow" | "ssa" | "terraform_deps" | "layers" | "domain" | "runtime" | "communication" | "delivery";
8207
8587
  /** @description Measured facts about the graph — hubs, dependency coverage, test share, route count. */
8208
8588
  insights?: string[];
8589
+ /** @description Deterministic reading beside the canvas for layers, domains, dataflow, and SSA. Coverage, heatmaps, and ledgers are derived from the indexed graph — no LLM. */
8590
+ structurePanel?: {
8591
+ /** @enum {string} */
8592
+ kind: "layers" | "domain" | "dataflow" | "ssa";
8593
+ coverage?: {
8594
+ totalFiles: number;
8595
+ connectedFiles: number;
8596
+ dependencyEdges: number;
8597
+ connectedShare: number;
8598
+ /** @description Cross-bucket edges in this roll-up, or relation edges shown for dataflow/SSA. */
8599
+ rollupEdges: number;
8600
+ };
8601
+ /** @description Ordered axis labels for the heatmap. */
8602
+ axes?: string[];
8603
+ matrix?: {
8604
+ from: string;
8605
+ to: string;
8606
+ weight: number;
8607
+ }[];
8608
+ /** @description Layers or domains that own the selected node / query, so roll-up views still answer a selection instead of silently ignoring it. */
8609
+ focusBuckets?: string[];
8610
+ /** @description Layer-stack edges that climb the usual API → Service → Data → UI order. */
8611
+ violations?: {
8612
+ from: string;
8613
+ to: string;
8614
+ weight: number;
8615
+ reason: string;
8616
+ }[];
8617
+ /** @description Top dataflow / SSA flows with relation and certainty. */
8618
+ ledger?: {
8619
+ from: string;
8620
+ to: string;
8621
+ relation?: string;
8622
+ certainty?: string;
8623
+ }[];
8624
+ };
8209
8625
  /** @description Present when free text drove the view. */
8210
8626
  focus?: {
8211
8627
  query: string;
@@ -8641,6 +9057,8 @@ export type JiraSourceDto = components['schemas']['JiraSourceDto'];
8641
9057
  export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
8642
9058
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
8643
9059
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
9060
+ export type CodeWikiGuidanceTopicDto = components['schemas']['CodeWikiGuidanceTopicDto'];
9061
+ export type CodeWikiGuidanceDto = components['schemas']['CodeWikiGuidanceDto'];
8644
9062
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
8645
9063
  export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto'];
8646
9064
  export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
@@ -8964,6 +9382,8 @@ export type InsightsRecommendationsPageBundleResponse = components['schemas']['I
8964
9382
  export type CodeChatIndexStatus = components['schemas']['CodeChatIndexStatus'];
8965
9383
  export type CodeChatIndexer = components['schemas']['CodeChatIndexer'];
8966
9384
  export type CodeChatIndexDto = components['schemas']['CodeChatIndexDto'];
9385
+ export type CodeKnowledgeJobDto = components['schemas']['CodeKnowledgeJobDto'];
9386
+ export type CodeKnowledgeTrackStatus = components['schemas']['CodeKnowledgeTrackStatus'];
8967
9387
  export type CodeChatIndexListDto = components['schemas']['CodeChatIndexListDto'];
8968
9388
  export type CodeChatCreateIndexBodyDto = components['schemas']['CodeChatCreateIndexBodyDto'];
8969
9389
  export type CodeChatSyncIndexesBodyDto = components['schemas']['CodeChatSyncIndexesBodyDto'];
@@ -8981,6 +9401,22 @@ export type CodeChatApiRouteRowDto = components['schemas']['CodeChatApiRouteRowD
8981
9401
  export type CodeChatModuleInventoryRowDto = components['schemas']['CodeChatModuleInventoryRowDto'];
8982
9402
  export type CodeChatStructuredBlockDto = components['schemas']['CodeChatStructuredBlockDto'];
8983
9403
  export type CodeChatWikiPageDto = components['schemas']['CodeChatWikiPageDto'];
9404
+ export type EffectiveWikiConfigDto = components['schemas']['EffectiveWikiConfigDto'];
9405
+ export type RepoWikiJsonDto = components['schemas']['RepoWikiJsonDto'];
9406
+ export type PutRepoWikiJsonDto = components['schemas']['PutRepoWikiJsonDto'];
9407
+ export type RepoWikiJsonSummaryDto = components['schemas']['RepoWikiJsonSummaryDto'];
9408
+ export type RepoWikiJsonSummaryListDto = components['schemas']['RepoWikiJsonSummaryListDto'];
9409
+ export type GenerateWorkspaceKnowledgePagesBodyDto = components['schemas']['GenerateWorkspaceKnowledgePagesBodyDto'];
9410
+ export type GenerateWorkspaceKnowledgePagesResultDto = components['schemas']['GenerateWorkspaceKnowledgePagesResultDto'];
9411
+ export type GeneratePrdDraftBodyDto = components['schemas']['GeneratePrdDraftBodyDto'];
9412
+ export type GeneratePrdDraftResultDto = components['schemas']['GeneratePrdDraftResultDto'];
9413
+ export type WorkspaceKnowledgePageDto = components['schemas']['WorkspaceKnowledgePageDto'];
9414
+ export type WorkspaceKnowledgeSystemContextDto = components['schemas']['WorkspaceKnowledgeSystemContextDto'];
9415
+ export type WorkspaceKnowledgePageListDto = components['schemas']['WorkspaceKnowledgePageListDto'];
9416
+ export type CodeIntelligenceUsageDto = components['schemas']['CodeIntelligenceUsageDto'];
9417
+ export type CodeIntelligenceTokenUsageByOperationDto = components['schemas']['CodeIntelligenceTokenUsageByOperationDto'];
9418
+ export type CodeIntelligenceTokenUsageByRepoDto = components['schemas']['CodeIntelligenceTokenUsageByRepoDto'];
9419
+ export type CodeIntelligenceTokenUsageSummaryDto = components['schemas']['CodeIntelligenceTokenUsageSummaryDto'];
8984
9420
  export type CodeChatWikiPageListDto = components['schemas']['CodeChatWikiPageListDto'];
8985
9421
  export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExportDto'];
8986
9422
  export type CodeChatSymbolQueryBodyDto = components['schemas']['CodeChatSymbolQueryBodyDto'];
@@ -16310,6 +16746,32 @@ export interface operations {
16310
16746
  403: components["responses"]["Forbidden"];
16311
16747
  };
16312
16748
  };
16749
+ getCodeIntelligenceTokenUsageSummary: {
16750
+ parameters: {
16751
+ query?: {
16752
+ days?: number;
16753
+ };
16754
+ header?: never;
16755
+ path: {
16756
+ workspaceId: components["parameters"]["WorkspaceId"];
16757
+ };
16758
+ cookie?: never;
16759
+ };
16760
+ requestBody?: never;
16761
+ responses: {
16762
+ /** @description Token usage summary */
16763
+ 200: {
16764
+ headers: {
16765
+ [name: string]: unknown;
16766
+ };
16767
+ content: {
16768
+ "application/json": components["schemas"]["CodeIntelligenceTokenUsageSummaryDto"];
16769
+ };
16770
+ };
16771
+ 401: components["responses"]["Unauthorized"];
16772
+ 403: components["responses"]["Forbidden"];
16773
+ };
16774
+ };
16313
16775
  getWorkspaceRepoEligibility: {
16314
16776
  parameters: {
16315
16777
  query?: never;
@@ -16924,6 +17386,266 @@ export interface operations {
16924
17386
  };
16925
17387
  };
16926
17388
  };
17389
+ getCodeChatEffectiveWikiConfig: {
17390
+ parameters: {
17391
+ query?: never;
17392
+ header?: never;
17393
+ path: {
17394
+ workspaceId: components["parameters"]["WorkspaceId"];
17395
+ indexId: string;
17396
+ };
17397
+ cookie?: never;
17398
+ };
17399
+ requestBody?: never;
17400
+ responses: {
17401
+ /** @description Effective wiki config */
17402
+ 200: {
17403
+ headers: {
17404
+ [name: string]: unknown;
17405
+ };
17406
+ content: {
17407
+ "application/json": components["schemas"]["EffectiveWikiConfigDto"];
17408
+ };
17409
+ };
17410
+ 401: components["responses"]["Unauthorized"];
17411
+ /** @description Graph not ready */
17412
+ 404: {
17413
+ headers: {
17414
+ [name: string]: unknown;
17415
+ };
17416
+ content?: never;
17417
+ };
17418
+ };
17419
+ };
17420
+ listWorkspaceKnowledgePages: {
17421
+ parameters: {
17422
+ query?: never;
17423
+ header?: never;
17424
+ path: {
17425
+ workspaceId: components["parameters"]["WorkspaceId"];
17426
+ };
17427
+ cookie?: never;
17428
+ };
17429
+ requestBody?: never;
17430
+ responses: {
17431
+ /** @description Workspace knowledge pages */
17432
+ 200: {
17433
+ headers: {
17434
+ [name: string]: unknown;
17435
+ };
17436
+ content: {
17437
+ "application/json": components["schemas"]["WorkspaceKnowledgePageListDto"];
17438
+ };
17439
+ };
17440
+ 401: components["responses"]["Unauthorized"];
17441
+ };
17442
+ };
17443
+ generateWorkspaceKnowledgePages: {
17444
+ parameters: {
17445
+ query?: never;
17446
+ header?: never;
17447
+ path: {
17448
+ workspaceId: components["parameters"]["WorkspaceId"];
17449
+ };
17450
+ cookie?: never;
17451
+ };
17452
+ requestBody?: {
17453
+ content: {
17454
+ "application/json": components["schemas"]["GenerateWorkspaceKnowledgePagesBodyDto"];
17455
+ };
17456
+ };
17457
+ responses: {
17458
+ /** @description Generated workspace knowledge pages */
17459
+ 200: {
17460
+ headers: {
17461
+ [name: string]: unknown;
17462
+ };
17463
+ content: {
17464
+ "application/json": components["schemas"]["GenerateWorkspaceKnowledgePagesResultDto"];
17465
+ };
17466
+ };
17467
+ 401: components["responses"]["Unauthorized"];
17468
+ /** @description Code Intelligence is disabled for this workspace */
17469
+ 403: {
17470
+ headers: {
17471
+ [name: string]: unknown;
17472
+ };
17473
+ content?: never;
17474
+ };
17475
+ /** @description No ready repository index in scope */
17476
+ 409: {
17477
+ headers: {
17478
+ [name: string]: unknown;
17479
+ };
17480
+ content?: never;
17481
+ };
17482
+ };
17483
+ };
17484
+ generatePrdDraft: {
17485
+ parameters: {
17486
+ query?: never;
17487
+ header?: never;
17488
+ path: {
17489
+ workspaceId: components["parameters"]["WorkspaceId"];
17490
+ };
17491
+ cookie?: never;
17492
+ };
17493
+ requestBody: {
17494
+ content: {
17495
+ "application/json": components["schemas"]["GeneratePrdDraftBodyDto"];
17496
+ };
17497
+ };
17498
+ responses: {
17499
+ /** @description Generated PRD draft page */
17500
+ 200: {
17501
+ headers: {
17502
+ [name: string]: unknown;
17503
+ };
17504
+ content: {
17505
+ "application/json": components["schemas"]["GeneratePrdDraftResultDto"];
17506
+ };
17507
+ };
17508
+ /** @description Missing or invalid featureIntent */
17509
+ 400: {
17510
+ headers: {
17511
+ [name: string]: unknown;
17512
+ };
17513
+ content?: never;
17514
+ };
17515
+ 401: components["responses"]["Unauthorized"];
17516
+ /** @description Code Intelligence is disabled for this workspace */
17517
+ 403: {
17518
+ headers: {
17519
+ [name: string]: unknown;
17520
+ };
17521
+ content?: never;
17522
+ };
17523
+ /** @description No ready repository index in scope */
17524
+ 409: {
17525
+ headers: {
17526
+ [name: string]: unknown;
17527
+ };
17528
+ content?: never;
17529
+ };
17530
+ };
17531
+ };
17532
+ listRepoWikiJsonSummaries: {
17533
+ parameters: {
17534
+ query?: never;
17535
+ header?: never;
17536
+ path: {
17537
+ workspaceId: components["parameters"]["WorkspaceId"];
17538
+ };
17539
+ cookie?: never;
17540
+ };
17541
+ requestBody?: never;
17542
+ responses: {
17543
+ /** @description Override summaries */
17544
+ 200: {
17545
+ headers: {
17546
+ [name: string]: unknown;
17547
+ };
17548
+ content: {
17549
+ "application/json": components["schemas"]["RepoWikiJsonSummaryListDto"];
17550
+ };
17551
+ };
17552
+ 401: components["responses"]["Unauthorized"];
17553
+ /** @description Workspace admin required */
17554
+ 403: {
17555
+ headers: {
17556
+ [name: string]: unknown;
17557
+ };
17558
+ content?: never;
17559
+ };
17560
+ };
17561
+ };
17562
+ getRepoWikiJson: {
17563
+ parameters: {
17564
+ query?: never;
17565
+ header?: never;
17566
+ path: {
17567
+ workspaceId: components["parameters"]["WorkspaceId"];
17568
+ repoId: string;
17569
+ };
17570
+ cookie?: never;
17571
+ };
17572
+ requestBody?: never;
17573
+ responses: {
17574
+ /** @description Stored override (document is null when unset) */
17575
+ 200: {
17576
+ headers: {
17577
+ [name: string]: unknown;
17578
+ };
17579
+ content: {
17580
+ "application/json": components["schemas"]["RepoWikiJsonDto"];
17581
+ };
17582
+ };
17583
+ 401: components["responses"]["Unauthorized"];
17584
+ /** @description Workspace admin required */
17585
+ 403: {
17586
+ headers: {
17587
+ [name: string]: unknown;
17588
+ };
17589
+ content?: never;
17590
+ };
17591
+ /** @description Repository not found */
17592
+ 404: {
17593
+ headers: {
17594
+ [name: string]: unknown;
17595
+ };
17596
+ content?: never;
17597
+ };
17598
+ };
17599
+ };
17600
+ putRepoWikiJson: {
17601
+ parameters: {
17602
+ query?: never;
17603
+ header?: never;
17604
+ path: {
17605
+ workspaceId: components["parameters"]["WorkspaceId"];
17606
+ repoId: string;
17607
+ };
17608
+ cookie?: never;
17609
+ };
17610
+ requestBody: {
17611
+ content: {
17612
+ "application/json": components["schemas"]["PutRepoWikiJsonDto"];
17613
+ };
17614
+ };
17615
+ responses: {
17616
+ /** @description Stored override */
17617
+ 200: {
17618
+ headers: {
17619
+ [name: string]: unknown;
17620
+ };
17621
+ content: {
17622
+ "application/json": components["schemas"]["RepoWikiJsonDto"];
17623
+ };
17624
+ };
17625
+ /** @description Invalid document */
17626
+ 400: {
17627
+ headers: {
17628
+ [name: string]: unknown;
17629
+ };
17630
+ content?: never;
17631
+ };
17632
+ 401: components["responses"]["Unauthorized"];
17633
+ /** @description Workspace admin required */
17634
+ 403: {
17635
+ headers: {
17636
+ [name: string]: unknown;
17637
+ };
17638
+ content?: never;
17639
+ };
17640
+ /** @description Repository not found */
17641
+ 404: {
17642
+ headers: {
17643
+ [name: string]: unknown;
17644
+ };
17645
+ content?: never;
17646
+ };
17647
+ };
17648
+ };
16927
17649
  exportCodeChatWikiOkf: {
16928
17650
  parameters: {
16929
17651
  query?: {