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