@thinkai/tai-api-contract 2.110.0 → 2.112.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. */
@@ -7795,6 +7946,10 @@ export interface components {
7795
7946
  InsightsRecommendationsCostPerPr: {
7796
7947
  orgAvgCostUsd: number;
7797
7948
  orgAvgPrevUsd: number;
7949
+ /** @description Total scoped AI spend (USD) underlying orgAvgCostUsd. */
7950
+ orgSpendUsd: number;
7951
+ /** @description Total scoped merged PRs underlying orgAvgCostUsd. */
7952
+ orgMergedPrs: number;
7798
7953
  teams: components["schemas"]["InsightsCostPerPrTeam"][];
7799
7954
  };
7800
7955
  InsightsRecommendationsCostPerPrResponse: components["schemas"]["InsightsRecommendationsCostPerPr"] & {
@@ -7893,6 +8048,8 @@ export interface components {
7893
8048
  errorMessage?: string | null;
7894
8049
  /** @description Human-readable indexing stage while a job is running (queued, clone, graph, save, wiki). Cleared when the index is ready or failed. */
7895
8050
  progressMessage?: string | null;
8051
+ /** @description Active knowledge job for this repo when status is queued/running — phase, tracks, and token/cost rollups for SPA transparency (Wave 1). */
8052
+ knowledgeJob?: components["schemas"]["CodeKnowledgeJobDto"] | null;
7896
8053
  /** Format: date-time */
7897
8054
  indexedAt?: string | null;
7898
8055
  /** Format: date-time */
@@ -7902,6 +8059,47 @@ export interface components {
7902
8059
  /** @description True when the indexed graph stores durable code excerpts (required for useful chat answers). */
7903
8060
  hasCodeExcerpts?: boolean;
7904
8061
  };
8062
+ CodeKnowledgeJobDto: {
8063
+ /** Format: uuid */
8064
+ id: string;
8065
+ /** Format: uuid */
8066
+ workspaceId: string;
8067
+ /** Format: uuid */
8068
+ repoId: string;
8069
+ /** Format: uuid */
8070
+ indexId?: string | null;
8071
+ /** @enum {string} */
8072
+ status: "queued" | "running" | "completed" | "failed";
8073
+ /**
8074
+ * @description Coarse UX phase while status=running.
8075
+ * @enum {string|null}
8076
+ */
8077
+ phase?: "cloning" | "indexing" | "track_a" | "track_b" | "completing" | null;
8078
+ /** @description Human-readable detail (e.g. enriching · page 3/8 · how-it-works). */
8079
+ phaseDetail?: string | null;
8080
+ /** Format: date-time */
8081
+ phaseUpdatedAt?: string | null;
8082
+ trackAStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8083
+ trackBStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8084
+ graphStatus?: components["schemas"]["CodeKnowledgeTrackStatus"];
8085
+ inputTokensTotal: number;
8086
+ outputTokensTotal: number;
8087
+ estimatedCostUsdTotal: number;
8088
+ llmInvocationCount: number;
8089
+ lastProvider?: string | null;
8090
+ lastModel?: string | null;
8091
+ lastKeySource?: string | null;
8092
+ errorMessage?: string | null;
8093
+ /** Format: date-time */
8094
+ createdAt: string;
8095
+ /** Format: date-time */
8096
+ updatedAt: string;
8097
+ };
8098
+ /**
8099
+ * @description Per-track status for dual-track Deep Wiki (Track A skeleton, Track B enrich, graph index).
8100
+ * @enum {string|null}
8101
+ */
8102
+ CodeKnowledgeTrackStatus: "pending" | "running" | "completed" | "skipped" | "failed" | null;
7905
8103
  CodeChatIndexListDto: {
7906
8104
  items: components["schemas"]["CodeChatIndexDto"][];
7907
8105
  };
@@ -7993,6 +8191,11 @@ export interface components {
7993
8191
  };
7994
8192
  CodeChatPostMessageBodyDto: {
7995
8193
  content: string;
8194
+ /**
8195
+ * @description Optional Ask tone preference (FE localStorage / request — not a DB role)
8196
+ * @enum {string}
8197
+ */
8198
+ persona?: "engineer" | "lead" | "pm";
7996
8199
  };
7997
8200
  CodeChatMessageReplyDto: components["schemas"]["CodeChatMessageDto"] & {
7998
8201
  /**
@@ -8006,6 +8209,16 @@ export interface components {
8006
8209
  groundedInWiki?: boolean;
8007
8210
  /** @description Repository names whose wiki pages grounded the answer */
8008
8211
  wikiRepos?: string[];
8212
+ /** @description True when platform evidence tools P–U contributed facts */
8213
+ groundedInPlatform?: boolean;
8214
+ /** @description Tool ids that returned data (e.g. readiness_summary) */
8215
+ platformToolIds?: string[];
8216
+ /**
8217
+ * @description Classified Ask intent for the turn
8218
+ * @enum {string}
8219
+ */
8220
+ intent?: "inventory_apis" | "inventory_modules" | "explain" | "platform_ops" | "feature_impact" | "prd_request";
8221
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8009
8222
  };
8010
8223
  CodeChatApiRouteRowDto: {
8011
8224
  method: string;
@@ -8051,10 +8264,181 @@ export interface components {
8051
8264
  sortOrder: number;
8052
8265
  sourcePaths: string[];
8053
8266
  diagramMermaid?: string | null;
8267
+ /**
8268
+ * @description Deep Wiki page quality chip (D6 / D12).
8269
+ * @enum {string}
8270
+ */
8271
+ enrichmentStatus?: "skeleton" | "enriched" | "shallow" | "needs_review";
8272
+ /** Format: date-time */
8273
+ createdAt: string;
8274
+ /** Format: date-time */
8275
+ updatedAt: string;
8276
+ };
8277
+ EffectiveWikiConfigDto: {
8278
+ /** @description Layers that contributed, in applied order. Later layers win: server_default → workspace_guidance → admin_repo → repo_override. */
8279
+ sources: ("server_default" | "workspace_guidance" | "admin_repo" | "repo_override")[];
8280
+ repoOverridePath?: string | null;
8281
+ /** @description Effective wiki.json document (version, pages, slugAllowlist, diagramPolicies). */
8282
+ document: {
8283
+ [key: string]: unknown;
8284
+ };
8285
+ };
8286
+ /** @description Admin-authored wiki.json override stored for a single repository. */
8287
+ RepoWikiJsonDto: {
8288
+ /** Format: uuid */
8289
+ repoId: string;
8290
+ repoName: string;
8291
+ providerSlug: string;
8292
+ /** @description Stored wiki.json document, or null when no override is set. */
8293
+ document: {
8294
+ [key: string]: unknown;
8295
+ } | null;
8296
+ hasOverride: boolean;
8297
+ /** Format: date-time */
8298
+ updatedAt: string | null;
8299
+ /** Format: uuid */
8300
+ updatedBy: string | null;
8301
+ };
8302
+ /** @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. */
8303
+ PutRepoWikiJsonDto: {
8304
+ document?: {
8305
+ [key: string]: unknown;
8306
+ } | null;
8307
+ };
8308
+ RepoWikiJsonSummaryDto: {
8309
+ /** Format: uuid */
8310
+ repoId: string;
8311
+ repoName: string;
8312
+ providerSlug: string;
8313
+ hasOverride: boolean;
8314
+ /** Format: date-time */
8315
+ updatedAt: string | null;
8316
+ /** Format: uuid */
8317
+ updatedBy: string | null;
8318
+ };
8319
+ RepoWikiJsonSummaryListDto: {
8320
+ items: components["schemas"]["RepoWikiJsonSummaryDto"][];
8321
+ };
8322
+ GenerateWorkspaceKnowledgePagesBodyDto: {
8323
+ /** @description Ready repository indexes to synthesize from. Omit or send empty for all ready indexes. */
8324
+ repoIds?: string[];
8325
+ };
8326
+ GenerateWorkspaceKnowledgePagesResultDto: {
8327
+ items: components["schemas"]["WorkspaceKnowledgePageDto"][];
8328
+ /**
8329
+ * @description llm when a model produced page bodies; deterministic when synthesized from wiki text alone.
8330
+ * @enum {string}
8331
+ */
8332
+ mode: "deterministic" | "llm";
8333
+ repoIds: string[];
8334
+ /** @description Platform evidence tool ids that contributed facts (P–U) */
8335
+ platformToolIds?: string[];
8336
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8337
+ };
8338
+ GeneratePrdDraftBodyDto: {
8339
+ /** @description Feature or change the PRD should describe */
8340
+ featureIntent: string;
8341
+ /** @description Ready repository indexes to analyze. Omit or send empty for all ready indexes. */
8342
+ repoIds?: string[];
8343
+ /**
8344
+ * @description Draft voice preference (FE localStorage / request)
8345
+ * @enum {string}
8346
+ */
8347
+ persona?: "engineer" | "lead" | "pm";
8348
+ };
8349
+ GeneratePrdDraftResultDto: {
8350
+ item: components["schemas"]["WorkspaceKnowledgePageDto"];
8351
+ /** @enum {string} */
8352
+ mode: "deterministic" | "llm";
8353
+ repoIds: string[];
8354
+ /** @description Persisted workspace knowledge page slug (prd-draft or prd-<safe-slug>) */
8355
+ slug: string;
8356
+ usage?: components["schemas"]["CodeIntelligenceUsageDto"];
8357
+ };
8358
+ WorkspaceKnowledgePageDto: {
8359
+ /** Format: uuid */
8360
+ id: string;
8361
+ /** Format: uuid */
8362
+ workspaceId: string;
8363
+ slug: string;
8364
+ title: string;
8365
+ bodyMd: string;
8366
+ sortOrder: number;
8367
+ sourceRepoIds: string[];
8368
+ /** @enum {string} */
8369
+ status: "draft" | "published" | "needs_review";
8054
8370
  /** Format: date-time */
8055
8371
  createdAt: string;
8056
8372
  /** Format: date-time */
8057
8373
  updatedAt: string;
8374
+ /** @description First readable prose sentence for list previews */
8375
+ excerpt?: string;
8376
+ /** @description Display names for sourceRepoIds when resolvable */
8377
+ sourceRepoNames?: string[];
8378
+ };
8379
+ WorkspaceKnowledgeSystemContextDto: {
8380
+ indexes: {
8381
+ /** Format: uuid */
8382
+ repoId: string;
8383
+ repoName: string;
8384
+ /** Format: uuid */
8385
+ indexId: string;
8386
+ nodeCount: number;
8387
+ edgeCount: number;
8388
+ commitSha?: string | null;
8389
+ indexer?: string | null;
8390
+ knowledgeJobPhase?: string | null;
8391
+ knowledgeJobStatus?: string | null;
8392
+ }[];
8393
+ platformToolIds: string[];
8394
+ platformMissingToolIds: string[];
8395
+ /** @description Bounded markdown summary of platform evidence for the system panel */
8396
+ platformSnippet?: string;
8397
+ };
8398
+ WorkspaceKnowledgePageListDto: {
8399
+ items: components["schemas"]["WorkspaceKnowledgePageDto"][];
8400
+ systemContext?: components["schemas"]["WorkspaceKnowledgeSystemContextDto"];
8401
+ };
8402
+ CodeIntelligenceUsageDto: {
8403
+ /** @description Ledger operation key (code_chat, prd_generate, workspace_kb, wiki_json_outline, wiki_enrich, …) */
8404
+ operation: string;
8405
+ provider: string;
8406
+ model?: string | null;
8407
+ inputTokens: number;
8408
+ outputTokens: number;
8409
+ estimatedCostUsd?: number | null;
8410
+ estimated?: boolean;
8411
+ };
8412
+ CodeIntelligenceTokenUsageByOperationDto: {
8413
+ operation: string;
8414
+ inputTokens: number;
8415
+ outputTokens: number;
8416
+ estimatedCostUsd: number;
8417
+ invocationCount: number;
8418
+ };
8419
+ CodeIntelligenceTokenUsageByRepoDto: {
8420
+ /** Format: uuid */
8421
+ repoId: string;
8422
+ repoName?: string | null;
8423
+ inputTokens: number;
8424
+ outputTokens: number;
8425
+ estimatedCostUsd: number;
8426
+ invocationCount: number;
8427
+ byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
8428
+ };
8429
+ CodeIntelligenceTokenUsageSummaryDto: {
8430
+ days: number;
8431
+ inputTokensTotal: number;
8432
+ outputTokensTotal: number;
8433
+ estimatedCostUsdTotal: number;
8434
+ invocationCountTotal: number;
8435
+ /** @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). */
8436
+ costEstimated?: boolean;
8437
+ /** @description Rate basis used for the derived cost, for display in tooltips. */
8438
+ costBasis?: string | null;
8439
+ byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
8440
+ /** @description Per-repository split (wiki generation, conversations, outline). Only rows with repository attribution appear here; workspace-wide operations stay in totals. */
8441
+ byRepo: components["schemas"]["CodeIntelligenceTokenUsageByRepoDto"][];
8058
8442
  };
8059
8443
  CodeChatWikiPageListDto: {
8060
8444
  items: components["schemas"]["CodeChatWikiPageDto"][];
@@ -8180,7 +8564,7 @@ export interface components {
8180
8564
  * @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
8565
  * @enum {string}
8182
8566
  */
8183
- kind?: "auto" | "dependency" | "module" | "focus" | "impact" | "blast" | "atlas";
8567
+ kind?: "auto" | "dependency" | "module" | "focus" | "impact" | "blast" | "atlas" | "call_graph" | "cfg_lite" | "dataflow" | "ssa" | "terraform_deps" | "layers" | "domain" | "runtime" | "communication" | "delivery";
8184
8568
  /** @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
8569
  query?: string;
8186
8570
  /** @description Deprecated alias for `query`. */
@@ -8204,9 +8588,45 @@ export interface components {
8204
8588
  * @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
8589
  * @enum {string}
8206
8590
  */
8207
- kind?: "dependency" | "module" | "focus" | "impact" | "blast";
8591
+ kind?: "dependency" | "module" | "focus" | "impact" | "blast" | "call_graph" | "cfg_lite" | "dataflow" | "ssa" | "terraform_deps" | "layers" | "domain" | "runtime" | "communication" | "delivery";
8208
8592
  /** @description Measured facts about the graph — hubs, dependency coverage, test share, route count. */
8209
8593
  insights?: string[];
8594
+ /** @description Deterministic reading beside the canvas for layers, domains, dataflow, and SSA. Coverage, heatmaps, and ledgers are derived from the indexed graph — no LLM. */
8595
+ structurePanel?: {
8596
+ /** @enum {string} */
8597
+ kind: "layers" | "domain" | "dataflow" | "ssa";
8598
+ coverage?: {
8599
+ totalFiles: number;
8600
+ connectedFiles: number;
8601
+ dependencyEdges: number;
8602
+ connectedShare: number;
8603
+ /** @description Cross-bucket edges in this roll-up, or relation edges shown for dataflow/SSA. */
8604
+ rollupEdges: number;
8605
+ };
8606
+ /** @description Ordered axis labels for the heatmap. */
8607
+ axes?: string[];
8608
+ matrix?: {
8609
+ from: string;
8610
+ to: string;
8611
+ weight: number;
8612
+ }[];
8613
+ /** @description Layers or domains that own the selected node / query, so roll-up views still answer a selection instead of silently ignoring it. */
8614
+ focusBuckets?: string[];
8615
+ /** @description Layer-stack edges that climb the usual API → Service → Data → UI order. */
8616
+ violations?: {
8617
+ from: string;
8618
+ to: string;
8619
+ weight: number;
8620
+ reason: string;
8621
+ }[];
8622
+ /** @description Top dataflow / SSA flows with relation and certainty. */
8623
+ ledger?: {
8624
+ from: string;
8625
+ to: string;
8626
+ relation?: string;
8627
+ certainty?: string;
8628
+ }[];
8629
+ };
8210
8630
  /** @description Present when free text drove the view. */
8211
8631
  focus?: {
8212
8632
  query: string;
@@ -8642,6 +9062,8 @@ export type JiraSourceDto = components['schemas']['JiraSourceDto'];
8642
9062
  export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
8643
9063
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
8644
9064
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
9065
+ export type CodeWikiGuidanceTopicDto = components['schemas']['CodeWikiGuidanceTopicDto'];
9066
+ export type CodeWikiGuidanceDto = components['schemas']['CodeWikiGuidanceDto'];
8645
9067
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
8646
9068
  export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto'];
8647
9069
  export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
@@ -8965,6 +9387,8 @@ export type InsightsRecommendationsPageBundleResponse = components['schemas']['I
8965
9387
  export type CodeChatIndexStatus = components['schemas']['CodeChatIndexStatus'];
8966
9388
  export type CodeChatIndexer = components['schemas']['CodeChatIndexer'];
8967
9389
  export type CodeChatIndexDto = components['schemas']['CodeChatIndexDto'];
9390
+ export type CodeKnowledgeJobDto = components['schemas']['CodeKnowledgeJobDto'];
9391
+ export type CodeKnowledgeTrackStatus = components['schemas']['CodeKnowledgeTrackStatus'];
8968
9392
  export type CodeChatIndexListDto = components['schemas']['CodeChatIndexListDto'];
8969
9393
  export type CodeChatCreateIndexBodyDto = components['schemas']['CodeChatCreateIndexBodyDto'];
8970
9394
  export type CodeChatSyncIndexesBodyDto = components['schemas']['CodeChatSyncIndexesBodyDto'];
@@ -8982,6 +9406,22 @@ export type CodeChatApiRouteRowDto = components['schemas']['CodeChatApiRouteRowD
8982
9406
  export type CodeChatModuleInventoryRowDto = components['schemas']['CodeChatModuleInventoryRowDto'];
8983
9407
  export type CodeChatStructuredBlockDto = components['schemas']['CodeChatStructuredBlockDto'];
8984
9408
  export type CodeChatWikiPageDto = components['schemas']['CodeChatWikiPageDto'];
9409
+ export type EffectiveWikiConfigDto = components['schemas']['EffectiveWikiConfigDto'];
9410
+ export type RepoWikiJsonDto = components['schemas']['RepoWikiJsonDto'];
9411
+ export type PutRepoWikiJsonDto = components['schemas']['PutRepoWikiJsonDto'];
9412
+ export type RepoWikiJsonSummaryDto = components['schemas']['RepoWikiJsonSummaryDto'];
9413
+ export type RepoWikiJsonSummaryListDto = components['schemas']['RepoWikiJsonSummaryListDto'];
9414
+ export type GenerateWorkspaceKnowledgePagesBodyDto = components['schemas']['GenerateWorkspaceKnowledgePagesBodyDto'];
9415
+ export type GenerateWorkspaceKnowledgePagesResultDto = components['schemas']['GenerateWorkspaceKnowledgePagesResultDto'];
9416
+ export type GeneratePrdDraftBodyDto = components['schemas']['GeneratePrdDraftBodyDto'];
9417
+ export type GeneratePrdDraftResultDto = components['schemas']['GeneratePrdDraftResultDto'];
9418
+ export type WorkspaceKnowledgePageDto = components['schemas']['WorkspaceKnowledgePageDto'];
9419
+ export type WorkspaceKnowledgeSystemContextDto = components['schemas']['WorkspaceKnowledgeSystemContextDto'];
9420
+ export type WorkspaceKnowledgePageListDto = components['schemas']['WorkspaceKnowledgePageListDto'];
9421
+ export type CodeIntelligenceUsageDto = components['schemas']['CodeIntelligenceUsageDto'];
9422
+ export type CodeIntelligenceTokenUsageByOperationDto = components['schemas']['CodeIntelligenceTokenUsageByOperationDto'];
9423
+ export type CodeIntelligenceTokenUsageByRepoDto = components['schemas']['CodeIntelligenceTokenUsageByRepoDto'];
9424
+ export type CodeIntelligenceTokenUsageSummaryDto = components['schemas']['CodeIntelligenceTokenUsageSummaryDto'];
8985
9425
  export type CodeChatWikiPageListDto = components['schemas']['CodeChatWikiPageListDto'];
8986
9426
  export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExportDto'];
8987
9427
  export type CodeChatSymbolQueryBodyDto = components['schemas']['CodeChatSymbolQueryBodyDto'];
@@ -16311,6 +16751,32 @@ export interface operations {
16311
16751
  403: components["responses"]["Forbidden"];
16312
16752
  };
16313
16753
  };
16754
+ getCodeIntelligenceTokenUsageSummary: {
16755
+ parameters: {
16756
+ query?: {
16757
+ days?: number;
16758
+ };
16759
+ header?: never;
16760
+ path: {
16761
+ workspaceId: components["parameters"]["WorkspaceId"];
16762
+ };
16763
+ cookie?: never;
16764
+ };
16765
+ requestBody?: never;
16766
+ responses: {
16767
+ /** @description Token usage summary */
16768
+ 200: {
16769
+ headers: {
16770
+ [name: string]: unknown;
16771
+ };
16772
+ content: {
16773
+ "application/json": components["schemas"]["CodeIntelligenceTokenUsageSummaryDto"];
16774
+ };
16775
+ };
16776
+ 401: components["responses"]["Unauthorized"];
16777
+ 403: components["responses"]["Forbidden"];
16778
+ };
16779
+ };
16314
16780
  getWorkspaceRepoEligibility: {
16315
16781
  parameters: {
16316
16782
  query?: never;
@@ -16925,6 +17391,266 @@ export interface operations {
16925
17391
  };
16926
17392
  };
16927
17393
  };
17394
+ getCodeChatEffectiveWikiConfig: {
17395
+ parameters: {
17396
+ query?: never;
17397
+ header?: never;
17398
+ path: {
17399
+ workspaceId: components["parameters"]["WorkspaceId"];
17400
+ indexId: string;
17401
+ };
17402
+ cookie?: never;
17403
+ };
17404
+ requestBody?: never;
17405
+ responses: {
17406
+ /** @description Effective wiki config */
17407
+ 200: {
17408
+ headers: {
17409
+ [name: string]: unknown;
17410
+ };
17411
+ content: {
17412
+ "application/json": components["schemas"]["EffectiveWikiConfigDto"];
17413
+ };
17414
+ };
17415
+ 401: components["responses"]["Unauthorized"];
17416
+ /** @description Graph not ready */
17417
+ 404: {
17418
+ headers: {
17419
+ [name: string]: unknown;
17420
+ };
17421
+ content?: never;
17422
+ };
17423
+ };
17424
+ };
17425
+ listWorkspaceKnowledgePages: {
17426
+ parameters: {
17427
+ query?: never;
17428
+ header?: never;
17429
+ path: {
17430
+ workspaceId: components["parameters"]["WorkspaceId"];
17431
+ };
17432
+ cookie?: never;
17433
+ };
17434
+ requestBody?: never;
17435
+ responses: {
17436
+ /** @description Workspace knowledge pages */
17437
+ 200: {
17438
+ headers: {
17439
+ [name: string]: unknown;
17440
+ };
17441
+ content: {
17442
+ "application/json": components["schemas"]["WorkspaceKnowledgePageListDto"];
17443
+ };
17444
+ };
17445
+ 401: components["responses"]["Unauthorized"];
17446
+ };
17447
+ };
17448
+ generateWorkspaceKnowledgePages: {
17449
+ parameters: {
17450
+ query?: never;
17451
+ header?: never;
17452
+ path: {
17453
+ workspaceId: components["parameters"]["WorkspaceId"];
17454
+ };
17455
+ cookie?: never;
17456
+ };
17457
+ requestBody?: {
17458
+ content: {
17459
+ "application/json": components["schemas"]["GenerateWorkspaceKnowledgePagesBodyDto"];
17460
+ };
17461
+ };
17462
+ responses: {
17463
+ /** @description Generated workspace knowledge pages */
17464
+ 200: {
17465
+ headers: {
17466
+ [name: string]: unknown;
17467
+ };
17468
+ content: {
17469
+ "application/json": components["schemas"]["GenerateWorkspaceKnowledgePagesResultDto"];
17470
+ };
17471
+ };
17472
+ 401: components["responses"]["Unauthorized"];
17473
+ /** @description Code Intelligence is disabled for this workspace */
17474
+ 403: {
17475
+ headers: {
17476
+ [name: string]: unknown;
17477
+ };
17478
+ content?: never;
17479
+ };
17480
+ /** @description No ready repository index in scope */
17481
+ 409: {
17482
+ headers: {
17483
+ [name: string]: unknown;
17484
+ };
17485
+ content?: never;
17486
+ };
17487
+ };
17488
+ };
17489
+ generatePrdDraft: {
17490
+ parameters: {
17491
+ query?: never;
17492
+ header?: never;
17493
+ path: {
17494
+ workspaceId: components["parameters"]["WorkspaceId"];
17495
+ };
17496
+ cookie?: never;
17497
+ };
17498
+ requestBody: {
17499
+ content: {
17500
+ "application/json": components["schemas"]["GeneratePrdDraftBodyDto"];
17501
+ };
17502
+ };
17503
+ responses: {
17504
+ /** @description Generated PRD draft page */
17505
+ 200: {
17506
+ headers: {
17507
+ [name: string]: unknown;
17508
+ };
17509
+ content: {
17510
+ "application/json": components["schemas"]["GeneratePrdDraftResultDto"];
17511
+ };
17512
+ };
17513
+ /** @description Missing or invalid featureIntent */
17514
+ 400: {
17515
+ headers: {
17516
+ [name: string]: unknown;
17517
+ };
17518
+ content?: never;
17519
+ };
17520
+ 401: components["responses"]["Unauthorized"];
17521
+ /** @description Code Intelligence is disabled for this workspace */
17522
+ 403: {
17523
+ headers: {
17524
+ [name: string]: unknown;
17525
+ };
17526
+ content?: never;
17527
+ };
17528
+ /** @description No ready repository index in scope */
17529
+ 409: {
17530
+ headers: {
17531
+ [name: string]: unknown;
17532
+ };
17533
+ content?: never;
17534
+ };
17535
+ };
17536
+ };
17537
+ listRepoWikiJsonSummaries: {
17538
+ parameters: {
17539
+ query?: never;
17540
+ header?: never;
17541
+ path: {
17542
+ workspaceId: components["parameters"]["WorkspaceId"];
17543
+ };
17544
+ cookie?: never;
17545
+ };
17546
+ requestBody?: never;
17547
+ responses: {
17548
+ /** @description Override summaries */
17549
+ 200: {
17550
+ headers: {
17551
+ [name: string]: unknown;
17552
+ };
17553
+ content: {
17554
+ "application/json": components["schemas"]["RepoWikiJsonSummaryListDto"];
17555
+ };
17556
+ };
17557
+ 401: components["responses"]["Unauthorized"];
17558
+ /** @description Workspace admin required */
17559
+ 403: {
17560
+ headers: {
17561
+ [name: string]: unknown;
17562
+ };
17563
+ content?: never;
17564
+ };
17565
+ };
17566
+ };
17567
+ getRepoWikiJson: {
17568
+ parameters: {
17569
+ query?: never;
17570
+ header?: never;
17571
+ path: {
17572
+ workspaceId: components["parameters"]["WorkspaceId"];
17573
+ repoId: string;
17574
+ };
17575
+ cookie?: never;
17576
+ };
17577
+ requestBody?: never;
17578
+ responses: {
17579
+ /** @description Stored override (document is null when unset) */
17580
+ 200: {
17581
+ headers: {
17582
+ [name: string]: unknown;
17583
+ };
17584
+ content: {
17585
+ "application/json": components["schemas"]["RepoWikiJsonDto"];
17586
+ };
17587
+ };
17588
+ 401: components["responses"]["Unauthorized"];
17589
+ /** @description Workspace admin required */
17590
+ 403: {
17591
+ headers: {
17592
+ [name: string]: unknown;
17593
+ };
17594
+ content?: never;
17595
+ };
17596
+ /** @description Repository not found */
17597
+ 404: {
17598
+ headers: {
17599
+ [name: string]: unknown;
17600
+ };
17601
+ content?: never;
17602
+ };
17603
+ };
17604
+ };
17605
+ putRepoWikiJson: {
17606
+ parameters: {
17607
+ query?: never;
17608
+ header?: never;
17609
+ path: {
17610
+ workspaceId: components["parameters"]["WorkspaceId"];
17611
+ repoId: string;
17612
+ };
17613
+ cookie?: never;
17614
+ };
17615
+ requestBody: {
17616
+ content: {
17617
+ "application/json": components["schemas"]["PutRepoWikiJsonDto"];
17618
+ };
17619
+ };
17620
+ responses: {
17621
+ /** @description Stored override */
17622
+ 200: {
17623
+ headers: {
17624
+ [name: string]: unknown;
17625
+ };
17626
+ content: {
17627
+ "application/json": components["schemas"]["RepoWikiJsonDto"];
17628
+ };
17629
+ };
17630
+ /** @description Invalid document */
17631
+ 400: {
17632
+ headers: {
17633
+ [name: string]: unknown;
17634
+ };
17635
+ content?: never;
17636
+ };
17637
+ 401: components["responses"]["Unauthorized"];
17638
+ /** @description Workspace admin required */
17639
+ 403: {
17640
+ headers: {
17641
+ [name: string]: unknown;
17642
+ };
17643
+ content?: never;
17644
+ };
17645
+ /** @description Repository not found */
17646
+ 404: {
17647
+ headers: {
17648
+ [name: string]: unknown;
17649
+ };
17650
+ content?: never;
17651
+ };
17652
+ };
17653
+ };
16928
17654
  exportCodeChatWikiOkf: {
16929
17655
  parameters: {
16930
17656
  query?: {