@huawei-iac-tools/landingzone-workbench 0.0.0-stage → 0.0.1

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.
Files changed (246) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +85 -2
  3. package/cordis.patch.yml +21 -0
  4. package/knowledge/account-qualification.md +128 -0
  5. package/knowledge/blueprints/_base/blueprint.json +481 -0
  6. package/knowledge/blueprints/_base/defaults.json +127 -0
  7. package/knowledge/blueprints/foundation-lz/blueprint.json +43 -0
  8. package/knowledge/blueprints/foundation-lz/defaults.json +47 -0
  9. package/knowledge/blueprints/full-lz/blueprint.json +11 -0
  10. package/knowledge/blueprints/full-lz/defaults.json +8 -0
  11. package/knowledge/config.json +43 -0
  12. package/knowledge/error-rules.json +14 -0
  13. package/knowledge/ic-policies.json +21 -0
  14. package/knowledge/modules/account-structure.md +101 -0
  15. package/knowledge/modules/compliance/config-rms.md +212 -0
  16. package/knowledge/modules/compliance/cts.md +179 -0
  17. package/knowledge/modules/compliance/obs-lts.md +155 -0
  18. package/knowledge/modules/ic-policies.json +21 -0
  19. package/knowledge/modules/identity-center.md +603 -0
  20. package/knowledge/modules/module-layers.md +169 -0
  21. package/knowledge/modules/network/er.md +222 -0
  22. package/knowledge/modules/network/nat-eip.md +123 -0
  23. package/knowledge/modules/network/ram-share.md +92 -0
  24. package/knowledge/modules/network/vpc-subnet.md +142 -0
  25. package/knowledge/modules/organization-security/scp.md +122 -0
  26. package/knowledge/modules/organizations.md +212 -0
  27. package/knowledge/modules/recommended-config.md +157 -0
  28. package/knowledge/modules/recommended-rules.json +175 -0
  29. package/knowledge/modules/scp-policies.json +111 -0
  30. package/knowledge/modules/security/aad.md +94 -0
  31. package/knowledge/modules/security/cfw.md +105 -0
  32. package/knowledge/modules/security/waf.md +110 -0
  33. package/knowledge/param-mappings.json +133 -0
  34. package/knowledge/prompts.md +83 -0
  35. package/knowledge/resource-types.json +1162 -0
  36. package/knowledge/scp-policies.json +111 -0
  37. package/knowledge/state-machine.md +33 -0
  38. package/lib/client.js +21 -0
  39. package/lib/index.js +28592 -0
  40. package/lib/types/account-role.d.ts +19 -0
  41. package/lib/types/account-scope.d.ts +10 -0
  42. package/lib/types/agency.d.ts +38 -0
  43. package/lib/types/client/DropdownSelect.d.ts +49 -0
  44. package/lib/types/client/LoginGate.d.ts +20 -0
  45. package/lib/types/client/PanelIcon.d.ts +11 -0
  46. package/lib/types/client/WorkbenchShell.d.ts +21 -0
  47. package/lib/types/client/account-role.d.ts +15 -0
  48. package/lib/types/client/credential-status.d.ts +15 -0
  49. package/lib/types/client/huawei-mark.d.ts +37 -0
  50. package/lib/types/client/index.d.ts +26 -0
  51. package/lib/types/client/layout-ref.d.ts +23 -0
  52. package/lib/types/client/pages/ConfigPage/AdviceCard.d.ts +26 -0
  53. package/lib/types/client/pages/ConfigPage/AuditBar.d.ts +21 -0
  54. package/lib/types/client/pages/ConfigPage/ChangeSummaryCard.d.ts +22 -0
  55. package/lib/types/client/pages/ConfigPage/ChangesCard.d.ts +27 -0
  56. package/lib/types/client/pages/ConfigPage/ComplianceDetail.d.ts +25 -0
  57. package/lib/types/client/pages/ConfigPage/ComplianceSummaryCard.d.ts +31 -0
  58. package/lib/types/client/pages/ConfigPage/FindingsCard.d.ts +21 -0
  59. package/lib/types/client/pages/ConfigPage/GlossaryDrawer.d.ts +17 -0
  60. package/lib/types/client/pages/ConfigPage/OrgComplianceDetail.d.ts +15 -0
  61. package/lib/types/client/pages/ConfigPage/Pager.d.ts +32 -0
  62. package/lib/types/client/pages/ConfigPage/ResourceDrawer.d.ts +26 -0
  63. package/lib/types/client/pages/ConfigPage/ResourcesTable.d.ts +35 -0
  64. package/lib/types/client/pages/ConfigPage/RollupPanel.d.ts +17 -0
  65. package/lib/types/client/pages/ConfigPage/RuleDetailDrawer.d.ts +23 -0
  66. package/lib/types/client/pages/ConfigPage/StatusCards.d.ts +26 -0
  67. package/lib/types/client/pages/ConfigPage/UncoveredDialog.d.ts +22 -0
  68. package/lib/types/client/pages/ConfigPage/config-api.d.ts +101 -0
  69. package/lib/types/client/pages/ConfigPage/config-store.d.ts +57 -0
  70. package/lib/types/client/pages/ConfigPage/index.d.ts +21 -0
  71. package/lib/types/client/pages/ConfigPage/paging.d.ts +46 -0
  72. package/lib/types/client/pages/ConfigPage/scope-options.d.ts +51 -0
  73. package/lib/types/client/pages/CostPage/AccountAllocation.d.ts +24 -0
  74. package/lib/types/client/pages/CostPage/AccountBars.d.ts +20 -0
  75. package/lib/types/client/pages/CostPage/AccountColumns.d.ts +24 -0
  76. package/lib/types/client/pages/CostPage/AccountDonut.d.ts +18 -0
  77. package/lib/types/client/pages/CostPage/AccountSwitcher.d.ts +25 -0
  78. package/lib/types/client/pages/CostPage/AdviceCard.d.ts +43 -0
  79. package/lib/types/client/pages/CostPage/AdviceFindings.d.ts +43 -0
  80. package/lib/types/client/pages/CostPage/BillingPanels.d.ts +23 -0
  81. package/lib/types/client/pages/CostPage/BudgetCard.d.ts +36 -0
  82. package/lib/types/client/pages/CostPage/GlossaryDrawer.d.ts +16 -0
  83. package/lib/types/client/pages/CostPage/KpiRow.d.ts +23 -0
  84. package/lib/types/client/pages/CostPage/MarkdownBlock.d.ts +16 -0
  85. package/lib/types/client/pages/CostPage/ReportView.d.ts +17 -0
  86. package/lib/types/client/pages/CostPage/ResourceColumns.d.ts +19 -0
  87. package/lib/types/client/pages/CostPage/ResourceDonut.d.ts +18 -0
  88. package/lib/types/client/pages/CostPage/ResourcesCard.d.ts +40 -0
  89. package/lib/types/client/pages/CostPage/RuleDetailDrawer.d.ts +23 -0
  90. package/lib/types/client/pages/CostPage/SavingView.d.ts +38 -0
  91. package/lib/types/client/pages/CostPage/ServiceDonut.d.ts +17 -0
  92. package/lib/types/client/pages/CostPage/TrendChart.d.ts +24 -0
  93. package/lib/types/client/pages/CostPage/budget-input.d.ts +30 -0
  94. package/lib/types/client/pages/CostPage/cost-api.d.ts +266 -0
  95. package/lib/types/client/pages/CostPage/cost-store.d.ts +25 -0
  96. package/lib/types/client/pages/CostPage/format.d.ts +37 -0
  97. package/lib/types/client/pages/CostPage/index.d.ts +34 -0
  98. package/lib/types/client/pages/CostPage/trend-fold.d.ts +32 -0
  99. package/lib/types/client/pages/CostPage/useEcharts.d.ts +70 -0
  100. package/lib/types/client/pages/OrgStructurePage/AccountStatsCard.d.ts +22 -0
  101. package/lib/types/client/pages/OrgStructurePage/CoreAccountsCard.d.ts +18 -0
  102. package/lib/types/client/pages/OrgStructurePage/CreateAccountDialog.d.ts +28 -0
  103. package/lib/types/client/pages/OrgStructurePage/ManageUsersDialog.d.ts +28 -0
  104. package/lib/types/client/pages/OrgStructurePage/MemberAccountsTable.d.ts +32 -0
  105. package/lib/types/client/pages/OrgStructurePage/MoveAccountDialog.d.ts +29 -0
  106. package/lib/types/client/pages/OrgStructurePage/OrgGlossaryDrawer.d.ts +13 -0
  107. package/lib/types/client/pages/OrgStructurePage/OrgTreeCard.d.ts +31 -0
  108. package/lib/types/client/pages/OrgStructurePage/index.d.ts +21 -0
  109. package/lib/types/client/pages/OrgStructurePage/org-api.d.ts +166 -0
  110. package/lib/types/client/pages/OverviewPage/AnchorRow.d.ts +24 -0
  111. package/lib/types/client/pages/OverviewPage/AttentionList.d.ts +29 -0
  112. package/lib/types/client/pages/OverviewPage/OverviewCharts.d.ts +79 -0
  113. package/lib/types/client/pages/OverviewPage/OverviewGlossaryDrawer.d.ts +15 -0
  114. package/lib/types/client/pages/OverviewPage/index.d.ts +22 -0
  115. package/lib/types/client/pages/OverviewPage/overview-api.d.ts +115 -0
  116. package/lib/types/client/pages/ResourcePage/AccountResourceList.d.ts +21 -0
  117. package/lib/types/client/pages/ResourcePage/components/GlossaryDrawer.d.ts +20 -0
  118. package/lib/types/client/pages/ResourcePage/components/MetricCards.d.ts +19 -0
  119. package/lib/types/client/pages/ResourcePage/components/MultiSelect.d.ts +27 -0
  120. package/lib/types/client/pages/ResourcePage/components/PanelPager.d.ts +26 -0
  121. package/lib/types/client/pages/ResourcePage/components/RankBars.d.ts +25 -0
  122. package/lib/types/client/pages/ResourcePage/components/ScopeSelect.d.ts +27 -0
  123. package/lib/types/client/pages/ResourcePage/components/SourceConfigModal.d.ts +21 -0
  124. package/lib/types/client/pages/ResourcePage/components/SyncControls.d.ts +18 -0
  125. package/lib/types/client/pages/ResourcePage/components/TrendChart.d.ts +14 -0
  126. package/lib/types/client/pages/ResourcePage/components/useColumnWidths.d.ts +12 -0
  127. package/lib/types/client/pages/ResourcePage/format.d.ts +9 -0
  128. package/lib/types/client/pages/ResourcePage/index.d.ts +20 -0
  129. package/lib/types/client/pages/ResourcePage/summary-api.d.ts +205 -0
  130. package/lib/types/client/pages/SetupPage/AskPanel.d.ts +21 -0
  131. package/lib/types/client/pages/SetupPage/ChatEmbed.d.ts +40 -0
  132. package/lib/types/client/pages/SetupPage/ChatTab.d.ts +17 -0
  133. package/lib/types/client/pages/SetupPage/FormTab.d.ts +12 -0
  134. package/lib/types/client/pages/SetupPage/FormTabV2.d.ts +14 -0
  135. package/lib/types/client/pages/SetupPage/ProgressTreeView.d.ts +15 -0
  136. package/lib/types/client/pages/SetupPage/StageFlow.d.ts +16 -0
  137. package/lib/types/client/pages/SetupPage/index.d.ts +10 -0
  138. package/lib/types/client/pages/SetupPage/progress-types.d.ts +36 -0
  139. package/lib/types/client/pages/SetupPage/session-binding.d.ts +38 -0
  140. package/lib/types/client/pages/SetupPage/session-store.d.ts +57 -0
  141. package/lib/types/client/pages/SetupPage/sessions-ref.d.ts +5 -0
  142. package/lib/types/client/pages/SetupPage/setup-replan.d.ts +13 -0
  143. package/lib/types/client/pages/SetupPage/wb-api.d.ts +192 -0
  144. package/lib/types/client/pages/list-preview.d.ts +36 -0
  145. package/lib/types/client/permission-mode.d.ts +53 -0
  146. package/lib/types/client/store.d.ts +22 -0
  147. package/lib/types/collect.d.ts +78 -0
  148. package/lib/types/config/account-scope.d.ts +61 -0
  149. package/lib/types/config/advice-findings.d.ts +31 -0
  150. package/lib/types/config/advice-prompt.d.ts +60 -0
  151. package/lib/types/config/advice.d.ts +116 -0
  152. package/lib/types/config/cts.d.ts +30 -0
  153. package/lib/types/config/evidence/rules.d.ts +31 -0
  154. package/lib/types/config/evidence/types.d.ts +103 -0
  155. package/lib/types/config/failure-note.d.ts +46 -0
  156. package/lib/types/config/fingerprint-cache.d.ts +45 -0
  157. package/lib/types/config/identity.d.ts +67 -0
  158. package/lib/types/config/query.d.ts +49 -0
  159. package/lib/types/config/rms.d.ts +412 -0
  160. package/lib/types/config/routes.d.ts +32 -0
  161. package/lib/types/config/types.d.ts +785 -0
  162. package/lib/types/config/views.d.ts +158 -0
  163. package/lib/types/cost/accounts.d.ts +29 -0
  164. package/lib/types/cost/advice-findings.d.ts +77 -0
  165. package/lib/types/cost/advice-model.d.ts +19 -0
  166. package/lib/types/cost/advice-prompt.d.ts +73 -0
  167. package/lib/types/cost/advice-subagent-types.d.ts +6 -0
  168. package/lib/types/cost/advice-subagent.d.ts +116 -0
  169. package/lib/types/cost/advice-types.d.ts +63 -0
  170. package/lib/types/cost/advice.d.ts +125 -0
  171. package/lib/types/cost/aggregate.d.ts +157 -0
  172. package/lib/types/cost/assume.d.ts +43 -0
  173. package/lib/types/cost/bss.d.ts +166 -0
  174. package/lib/types/cost/budget-overview.d.ts +38 -0
  175. package/lib/types/cost/budget.d.ts +56 -0
  176. package/lib/types/cost/cache.d.ts +58 -0
  177. package/lib/types/cost/caliber.d.ts +40 -0
  178. package/lib/types/cost/console-links.d.ts +27 -0
  179. package/lib/types/cost/credentials.d.ts +38 -0
  180. package/lib/types/cost/data-window.d.ts +38 -0
  181. package/lib/types/cost/evidence/catalog.d.ts +35 -0
  182. package/lib/types/cost/evidence/index.d.ts +70 -0
  183. package/lib/types/cost/evidence/inventory.d.ts +44 -0
  184. package/lib/types/cost/evidence/pricing.d.ts +72 -0
  185. package/lib/types/cost/evidence/projects.d.ts +18 -0
  186. package/lib/types/cost/evidence/rules.d.ts +66 -0
  187. package/lib/types/cost/evidence/state.d.ts +38 -0
  188. package/lib/types/cost/evidence/thresholds.d.ts +68 -0
  189. package/lib/types/cost/evidence/types.d.ts +288 -0
  190. package/lib/types/cost/evidence/utilization.d.ts +37 -0
  191. package/lib/types/cost/history.d.ts +36 -0
  192. package/lib/types/cost/ledger.d.ts +97 -0
  193. package/lib/types/cost/normalize.d.ts +37 -0
  194. package/lib/types/cost/period-projection.d.ts +57 -0
  195. package/lib/types/cost/plan-check.d.ts +102 -0
  196. package/lib/types/cost/plan-db.d.ts +73 -0
  197. package/lib/types/cost/plan-types.d.ts +183 -0
  198. package/lib/types/cost/plan.d.ts +63 -0
  199. package/lib/types/cost/quote.d.ts +45 -0
  200. package/lib/types/cost/report.d.ts +136 -0
  201. package/lib/types/cost/resources.d.ts +108 -0
  202. package/lib/types/cost/routes.d.ts +38 -0
  203. package/lib/types/cost/scope.d.ts +42 -0
  204. package/lib/types/cost/types.d.ts +335 -0
  205. package/lib/types/cost/unit-prices-derive.d.ts +19 -0
  206. package/lib/types/cost/unit-prices.d.ts +23 -0
  207. package/lib/types/db.d.ts +228 -0
  208. package/lib/types/host-log.d.ts +7 -0
  209. package/lib/types/http.d.ts +42 -0
  210. package/lib/types/index.d.ts +30 -0
  211. package/lib/types/inventory.d.ts +286 -0
  212. package/lib/types/obs.d.ts +16 -0
  213. package/lib/types/org/aggregate.d.ts +36 -0
  214. package/lib/types/org/churn.d.ts +10 -0
  215. package/lib/types/org/orgs.d.ts +258 -0
  216. package/lib/types/org/routes.d.ts +28 -0
  217. package/lib/types/org-types.d.ts +156 -0
  218. package/lib/types/per-service.d.ts +39 -0
  219. package/lib/types/setup/blueprint-loader.d.ts +81 -0
  220. package/lib/types/setup/caller.d.ts +105 -0
  221. package/lib/types/setup/engine.d.ts +41 -0
  222. package/lib/types/setup/form-store.d.ts +13 -0
  223. package/lib/types/setup/nodes/n1-check.d.ts +14 -0
  224. package/lib/types/setup/nodes/n10-governance.d.ts +6 -0
  225. package/lib/types/setup/nodes/n11-infra.d.ts +6 -0
  226. package/lib/types/setup/nodes/n12-reconcile.d.ts +6 -0
  227. package/lib/types/setup/nodes/n2-region.d.ts +6 -0
  228. package/lib/types/setup/nodes/n3-blueprint.d.ts +6 -0
  229. package/lib/types/setup/nodes/n4-modules.d.ts +6 -0
  230. package/lib/types/setup/nodes/n5-details.d.ts +6 -0
  231. package/lib/types/setup/nodes/n6-plan.d.ts +6 -0
  232. package/lib/types/setup/nodes/n7-verify.d.ts +6 -0
  233. package/lib/types/setup/nodes/n8-approve.d.ts +6 -0
  234. package/lib/types/setup/nodes/n9-buildmode.d.ts +6 -0
  235. package/lib/types/setup/plan-state.d.ts +10 -0
  236. package/lib/types/setup/prompt-loader.d.ts +16 -0
  237. package/lib/types/setup/routes.d.ts +22 -0
  238. package/lib/types/setup/session-notify.d.ts +30 -0
  239. package/lib/types/setup/tools.d.ts +19 -0
  240. package/lib/types/setup/types.d.ts +157 -0
  241. package/lib/types/sse-bus.d.ts +23 -0
  242. package/lib/types/tools/config-facts.d.ts +16 -0
  243. package/lib/types/tools/cost-facts.d.ts +10 -0
  244. package/lib/types/tools/register.d.ts +18 -0
  245. package/lib/types/wb-conventions.d.ts +140 -0
  246. package/package.json +77 -4
@@ -0,0 +1,19 @@
1
+ export type AccountRole = 'management' | 'member';
2
+ export interface AccountRoleResult {
3
+ readonly role: AccountRole;
4
+ /** 当前登录账号 domain_id(IAM 校验所得)。 */
5
+ readonly account_id: string;
6
+ /** 组织管理账号 domain_id;探测失败时为 null。 */
7
+ readonly management_account_id: string | null;
8
+ /** 判定依据:show_organization=接口对比 / probe_failed=探测失败按主账号兜底。 */
9
+ readonly basis: 'show_organization' | 'probe_failed';
10
+ }
11
+ /**
12
+ * 判定当前凭据的账号角色。
13
+ *
14
+ * @throws NotAuthenticatedError 无凭据(路由层登录守卫先行,正常走不到)
15
+ */
16
+ export declare function resolveAccountRole(): Promise<AccountRoleResult>;
17
+ /** 供测试/凭据变更场景手动失效缓存。 */
18
+ export declare function forgetAccountRoleCache(): void;
19
+ //# sourceMappingURL=account-role.d.ts.map
@@ -0,0 +1,10 @@
1
+ /** 固定账号的根目录。 */
2
+ export declare function accountRootFor(domainId: string): string;
3
+ /**
4
+ * 当前登录账号的根目录(所有账号隔离数据的父目录)。
5
+ *
6
+ * domain_id 经 loadAccount() 解析(按 AK 指纹缓存,同一凭据进程内只验一次);
7
+ * 凭据未配置时抛 NotAuthenticatedError——调用方都在登录闸之后,正常走不到。
8
+ */
9
+ export declare function currentAccountRoot(): Promise<string>;
10
+ //# sourceMappingURL=account-scope.d.ts.map
@@ -0,0 +1,38 @@
1
+ /** 委托换来的子账号域内临时凭据(签名 RMS 请求用)。 */
2
+ interface AgencySts {
3
+ readonly ak: string;
4
+ readonly sk: string;
5
+ readonly securityToken: string;
6
+ readonly expiresAt: string;
7
+ }
8
+ /** 委托清单一行(与入库形态对齐)。 */
9
+ export interface AgencyResourceRow {
10
+ readonly id: string;
11
+ readonly name: string;
12
+ readonly provider: string;
13
+ readonly type: string;
14
+ readonly region_id: string;
15
+ readonly ep_id: string;
16
+ readonly created: string;
17
+ readonly tags_json: string;
18
+ }
19
+ /** assume 用途:决定 STS 的 policy 下放范围(凭据权限 = 委托授权 ∩ policy)。 */
20
+ export type AgencyScope = 'rms' | 'eps';
21
+ /**
22
+ * 通过委托获取子账号域内临时凭据。
23
+ * POST /v3.0/OS-CREDENTIAL/securitytokens(治理账号凭据签名,assume_role
24
+ * 指定子账号委托;policy 按 scope 下放:RMS 直查给 rms 只读,查企业项目
25
+ * 名称给 eps 列表只读)。委托候选链:约定名不存在(400)自动回退组织自动
26
+ * 委托;两个都没有、或非"不存在"类失败(403 等)时抛 UpstreamHttpError,
27
+ * 由调用方按账号隔离处理。
28
+ */
29
+ export declare function assumeAgency(trustorDomainId: string, scope?: AgencyScope): Promise<AgencySts>;
30
+ /**
31
+ * 以子账号临时凭据直查其全量资源清单(带 ep_id/tags)。
32
+ * next_marker 规范化与 ② 相同(末页 null 不续页);分页有界。
33
+ */
34
+ export declare function fetchAgencyInventory(trustorDomainId: string, sts: AgencySts): Promise<AgencyResourceRow[]>;
35
+ /** 测试用/调用方提示:当前委托名。 */
36
+ export declare function agencyName(): string;
37
+ export {};
38
+ //# sourceMappingURL=agency.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * 通用下拉选择(自定义 listbox,客户端根级共享件)。
3
+ *
4
+ * 为什么不用原生 <select>:option 只能放纯文本——放不了徽标(如资源页「未开通」),
5
+ * 也做不了悬停提示。费用页与资源页的账号/范围下拉统一用这一套,样式同源
6
+ * (dropdown.module.css),高度天然一致(2026-11-07)。
7
+ *
8
+ * 层级约定见 dropdown.module.css 头注释:控件根 z-index 10,低于各页弹层。
9
+ *
10
+ * 交互:点触发表展开/收起;点项选中并收起;点浮层外部或 Esc 收起。无新依赖。
11
+ *
12
+ * @module @huaweidevtools/landingzone-workbench/client/DropdownSelect
13
+ */
14
+ import { type ReactNode } from 'react';
15
+ /** 一个选项。disabled 行置灰不可选,可带徽标与悬停提示。 */
16
+ export interface DropdownOption {
17
+ readonly value: string;
18
+ readonly label: string;
19
+ readonly disabled?: boolean;
20
+ /** 置灰行名后的徽标文字(需同时给 badgeTip 才有提示)。 */
21
+ readonly badge?: string;
22
+ /** 置灰行与徽标的悬停提示。 */
23
+ readonly badgeTip?: string;
24
+ }
25
+ interface DropdownSelectProps {
26
+ readonly value: string;
27
+ readonly options: readonly DropdownOption[];
28
+ readonly onChange: (v: string) => void;
29
+ /** 菜单的无障碍标签。 */
30
+ readonly ariaLabel?: string;
31
+ /** 触发器的悬浮提示。 */
32
+ readonly title?: string;
33
+ /** 菜单底部的提示行(如"名单不完整:组织接口不可用")。 */
34
+ readonly footer?: ReactNode;
35
+ /** 触发器最小宽度(px)。缺省 180:账号/范围这类长文案用默认;账期这种短值往下压窄。 */
36
+ readonly minWidth?: number;
37
+ /** 菜单最小宽度(px)。缺省 240;与压窄的触发器配套时一起收窄,免得弹出比触发框宽一倍。 */
38
+ readonly menuMinWidth?: number;
39
+ /**
40
+ * 可搜索(2026-11-23):展开菜单顶部出搜索框,输入即过滤选项(label/value 子串、
41
+ * 大小写不敏感)。账号多的下拉(配置/资源/费用)开启;账期等短下拉不开,行为零变化。
42
+ */
43
+ readonly searchable?: boolean;
44
+ /** searchable 的搜索框占位文案。 */
45
+ readonly searchPlaceholder?: string;
46
+ }
47
+ export declare function DropdownSelect({ value, options, onChange, ariaLabel, title, footer, minWidth, menuMinWidth, searchable, searchPlaceholder }: DropdownSelectProps): ReactNode;
48
+ export {};
49
+ //# sourceMappingURL=DropdownSelect.d.ts.map
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 未登录门禁屏 —— 工作台「完全不给用」的锁定态内容区。
3
+ *
4
+ * 设计定稿(2026-11-18):
5
+ * - 登录是会话页面的能力,工作台只做只读消费:本屏没有表单、没有任何输入
6
+ * 控件,唯一动作是把人送回对话面板(selectPanel(null))。凭据的采集、
7
+ * IAM 校验、存储全部留在会话页面的凭据体系里。
8
+ * - 导航服务缺席时隐藏按钮、保留三步文字指引——绝不渲染点了没反应的死按钮。
9
+ * - lastError 非空时显示上次校验失败原因:门上写着为什么没开,不用再试一次。
10
+ * - 解锁由 configForms 订阅推送(credentialsStored 翻 true 即刻开门),
11
+ * 本组件不轮询、不判登录,只管把 locked 态渲染好。
12
+ *
13
+ * @module @huaweidevtools/landingzone-workbench/client/LoginGate
14
+ */
15
+ import { type ReactNode } from 'react';
16
+ /** 门禁屏:替代整个详情区,直到 configForms 订阅推送登录成功。 */
17
+ export declare function LoginGate(props: {
18
+ readonly lastError: string;
19
+ }): ReactNode;
20
+ //# sourceMappingURL=LoginGate.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Workbench panel icon — the glyph shown in the left-sidebar menu row.
3
+ *
4
+ * Size matches DSH panel glyphs (the sidebar passes `size` to the slot
5
+ * component).
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ export declare function WorkbenchPanelIcon({ size }: {
9
+ size?: number;
10
+ }): ReactNode;
11
+ //# sourceMappingURL=PanelIcon.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 工作台外壳 — 左菜单 + 右详情(上下:叶头+内容)。
3
+ *
4
+ * 布局:
5
+ * ┌─────────────┬──────────────────────────────────────────────┐
6
+ * │Landing Zone │ 初始搭建 [华为logo 账号名] [只读] │ ← 叶头
7
+ * │Workbench ├──────────────────────────────────────────────┤
8
+ * │ │ │
9
+ * │ 治理总览 │ 详情区 │
10
+ * │ 组织架构 │ (选中菜单对应的内容) │
11
+ * │ 资源管理 │ │
12
+ * │ 费用管理 │ │
13
+ * │ 初始搭建 ● │ │
14
+ * └─────────────┴──────────────────────────────────────────────┘
15
+ *
16
+ * @module @huaweidevtools/landingzone-workbench/client/WorkbenchShell
17
+ */
18
+ import { type ReactNode } from 'react';
19
+ /** 工作台主面板。 */
20
+ export declare function WorkbenchShell(): ReactNode;
21
+ //# sourceMappingURL=WorkbenchShell.d.ts.map
@@ -0,0 +1,15 @@
1
+ export type AccountRole = 'management' | 'member';
2
+ export interface RoleSnapshot {
3
+ /** checking=未拉到(打开后首次/凭据已换)/ ready=已判定 / failed=拉取失败(按主账号兜底展示)。 */
4
+ readonly state: 'checking' | 'ready' | 'failed';
5
+ readonly role?: AccountRole;
6
+ /** 本判定对应的账号 hint——与当前凭据不符时快照作废(视同 checking)。 */
7
+ readonly hint?: string;
8
+ }
9
+ export declare const accountRoleStore: import("@deepseek-ai/dsh-client-store").SnapshotStore<RoleSnapshot>;
10
+ /**
11
+ * 订阅账号角色。登录门开(gateOpen)即拉取;快照与当前凭据不符(换账号)重拉;
12
+ * 门关(登出)一切视为未定——下次开门必拿最新身份。
13
+ */
14
+ export declare function useAccountRole(gateOpen: boolean, accountHint: string): RoleSnapshot;
15
+ //# sourceMappingURL=account-role.d.ts.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Credential status fields the browser reads from the Host entry.
3
+ *
4
+ * Secrets never appear here — they live in the credential store. This mirrors
5
+ * aishell-credentials' CredentialStatus exactly so the two surfaces stay
6
+ * compatible with the same Host-written configForms namespace.
7
+ */
8
+ export interface CredentialStatus {
9
+ readonly hasAccessKey: boolean;
10
+ readonly hasSecretKey: boolean;
11
+ readonly hasSecurityToken: boolean;
12
+ readonly accessKeyIdHint: string;
13
+ readonly lastError: string;
14
+ }
15
+ //# sourceMappingURL=credential-status.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The Huawei mark and its brand colour, shared by both credential chips.
3
+ *
4
+ * Extracted so the composer chip and the hero chip cannot drift apart: they
5
+ * report the same thing, and a colour or path change in one must not leave the
6
+ * other behind.
7
+ *
8
+ * @module @huaweidevtools/aishell-dsh-client-credentials/client/huawei-mark
9
+ */
10
+ /** Huawei logo path (from simple-icons/huawei), drawn in a 24×24 viewBox. */
11
+ export declare const HUAWEI_LOGO_PATH = "M3.67 6.14S1.82 7.91 1.72 9.78v.35c.08 1.51 1.22 2.4 1.22 2.4 1.83 1.79 6.26 4.04 7.3 4.55 0 0 .06.03.1-.01l.02-.04v-.04C7.52 10.8 3.67 6.14 3.67 6.14zM9.65 18.6c-.02-.08-.1-.08-.1-.08l-7.38.26c.8 1.43 2.15 2.53 3.56 2.2.96-.25 3.16-1.78 3.88-2.3.06-.05.04-.09.04-.09zm.08-.78C6.49 15.63.21 12.28.21 12.28c-.15.46-.2.9-.21 1.3v.07c0 1.07.4 1.82.4 1.82.8 1.69 2.34 2.2 2.34 2.2.7.3 1.4.31 1.4.31.12.02 4.4 0 5.54 0 .05 0 .08-.05.08-.05v-.06c0-.03-.03-.05-.03-.05zM9.06 3.19a3.42 3.42 0 00-2.57 3.15v.41c.03.6.16 1.05.16 1.05.66 2.9 3.86 7.65 4.55 8.65.05.05.1.03.1.03a.1.1 0 00.06-.1c1.06-10.6-1.11-13.42-1.11-13.42-.32.02-1.19.23-1.19.23zm8.299 2.27s-.49-1.8-2.44-2.28c0 0-.57-.14-1.17-.22 0 0-2.18 2.81-1.12 13.43.01.07.06.08.06.08.07.03.1-.03.1-.03.72-1.03 3.9-5.76 4.55-8.64 0 0 .36-1.4.02-2.34zm-2.92 13.07s-.07 0-.09.05c0 0-.01.07.03.1.7.51 2.85 2 3.88 2.3 0 0 .16.05.43.06h.14c.69-.02 1.9-.37 3-2.26l-7.4-.25zm7.83-8.41c.14-2.06-1.94-3.97-1.94-3.98 0 0-3.85 4.66-6.67 10.8 0 0-.03.08.02.13l.04.01h.06c1.06-.53 5.46-2.77 7.28-4.54 0 0 1.15-.93 1.21-2.42zm1.52 2.14s-6.28 3.37-9.52 5.55c0 0-.05.04-.03.11 0 0 .03.06.07.06 1.16 0 5.56 0 5.67-.02 0 0 .57-.02 1.27-.29 0 0 1.56-.5 2.37-2.27 0 0 .73-1.45.17-3.14z";
12
+ /**
13
+ * Huawei brand red, rgb(207, 10, 44).
14
+ *
15
+ * A literal rather than a theme token: the theme's alias set carries no brand
16
+ * or danger colour (checked — no `danger`/`error`/`critical` alias exists), so
17
+ * there is nothing to reference and the value does not follow light/dark. It
18
+ * is the brand mark's own colour, so it is meant to stay fixed.
19
+ */
20
+ export declare const HUAWEI_RED = "rgb(207, 10, 44)";
21
+ /**
22
+ * Class carried by the clickable account-name control on both chips.
23
+ *
24
+ * A class rather than inline styles because `:hover` and `:focus-visible`
25
+ * cannot be expressed inline, and the two chips must look identical on both.
26
+ */
27
+ export declare const CHIP_CLASS = "aishell-account-hint";
28
+ /**
29
+ * Inject the hover/focus rule once per document.
30
+ *
31
+ * The background token matches what the ContextMeter trigger and the sidebar
32
+ * gear pill use on hover, so the affordance reads the same as the rest of the
33
+ * chrome. Guarded by an id check so a second mount (or the other chip) does
34
+ * not duplicate the rule.
35
+ */
36
+ export declare function ensureChipStyles(): void;
37
+ //# sourceMappingURL=huawei-mark.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * landingzone-workbench browser half — registers a main panel + a left-sidebar
3
+ * menu entry that switches to it.
4
+ *
5
+ * The workbench is a MAIN panel (same level as "conversation" and "plugins").
6
+ * Two-step registration (DSH main-panel standard, same as
7
+ * dsh-client-ui-plugin-manager):
8
+ * 1. slots.inject('main', register({name:'main', key:PANEL_ID}, Panel))
9
+ * 2. slots.inject('sidebar.panellist', register({id:PANEL_ID, order, label}, Icon))
10
+ *
11
+ * Account info + permission mode are read from the same sources as the chat
12
+ * composer's account chip:
13
+ * - accessKeyIdHint: ctx.configForms.get('aishell-client-credentials')
14
+ * (Host-written non-secret field; secrets never reach the browser).
15
+ * - permission mode: fetch('api/aishell/permission') via usePermissionMode.
16
+ *
17
+ * @module @huaweidevtools/landingzone-workbench/client
18
+ */
19
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
20
+ import './tokens.module.css';
21
+ /** Panel identity: the main-slot key AND the sidebar.panellist entry id. */
22
+ export declare const PANEL_ID = "workbench";
23
+ /** Required services: slot registry + configForms + sessions + uiSession. */
24
+ export declare const inject: string[];
25
+ export declare function apply(ctx: ClientContext): void;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 宿主 layout 服务的模块级引用(登录门禁导航用)。
3
+ *
4
+ * 与 sessions-ref.ts 同一模式:client/index.ts 的 apply() 里经 ctx.inject 注入
5
+ * 存这里,LoginGate / WorkbenchShell 读取,避免 ES module live binding 在打包后失效。
6
+ *
7
+ * goConversation = selectPanel(null):dsh-client-ui-layout 契约原文
8
+ * "null to show the Conversation"——不硬编码面板 id,宿主改 id 也不受影响。
9
+ *
10
+ * @module @huaweidevtools/landingzone-workbench/client/layout-ref
11
+ */
12
+ /** ctx.layout 的最小面(dsh-client-ui-layout LayoutController 子集)。 */
13
+ interface LayoutLike {
14
+ readonly selectPanel: (panelId: unknown) => void;
15
+ }
16
+ export declare function setLayoutService(s: unknown): void;
17
+ export declare function getLayoutService(): LayoutLike | null;
18
+ /** 导航服务是否可用(决定门禁「去登录」按钮渲染与否——不可用绝不渲染死按钮)。 */
19
+ export declare function hasConversationNavigation(): boolean;
20
+ /** 回到对话面板(登录入口所在地)。返回 false 表示服务缺席、本次未跳转。 */
21
+ export declare function goConversation(): boolean;
22
+ export {};
23
+ //# sourceMappingURL=layout-ref.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 「分析建议」卡片 —— 渲染宿主算好的规则发现,模型只提供叙述。
3
+ *
4
+ * 与费用页 `CostPage/AdviceFindings` 同一套编码,刻意保持一致:
5
+ * · **色块 = 严重度**(红高 / 黄中 / 绿低);
6
+ * · **序号 = 优先级**(层 → 严重度 → 对象数,由宿主排好);
7
+ * · **层写在文字里**(可立即执行 / 需先补数据 / 无法判定)。
8
+ *
9
+ * 为什么不再渲染模型原文:旧卡片直接展示模型写的 evidence,于是出现
10
+ * 「25 个未覆盖账号」「主账号 0 条规则」这类和事实打架的数字。现在每条都带
11
+ * `finding_ref`,数字来自 `record.findings`,模型改不动。
12
+ *
13
+ * 老存档(没有 findings)仍按旧字段渲染,不丢历史。
14
+ *
15
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/AdviceCard
16
+ */
17
+ import { type ReactNode } from 'react';
18
+ interface AdviceCardProps {
19
+ readonly account: string;
20
+ readonly scopeLabel: string;
21
+ /** 当前事实的指纹:与建议存档里的不同 = 数字变了。 */
22
+ readonly fingerprint: string | undefined;
23
+ }
24
+ export declare function AdviceCard({ account, scopeLabel, fingerprint }: AdviceCardProps): ReactNode;
25
+ export {};
26
+ //# sourceMappingURL=AdviceCard.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 审计结论卡 —— 这一页的抬头。
3
+ *
4
+ * 2026-11-25 用户定稿:5 个事实改成独立卡片块(治理总览锚点卡同款视觉),
5
+ * 一句话结论(headline)与可信范围(caveat)放到卡片**下面**——数字先看,句子解释。
6
+ * 结论与数字全部由宿主用同一份快照推导(`buildAuditSummary`),与下面各卡
7
+ * 不可能打架。
8
+ *
9
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/AuditBar
10
+ */
11
+ import { type ReactNode } from 'react';
12
+ import type { ConfigAuditSummary, ConfigFactKey } from '../../../config/types.ts';
13
+ interface AuditBarProps {
14
+ readonly audit: ConfigAuditSummary | null | undefined;
15
+ readonly loading: boolean;
16
+ /** 点某一格 → 去对应的卡片/位置看细节。 */
17
+ readonly onFact?: (key: ConfigFactKey) => void;
18
+ }
19
+ export declare function AuditBar({ audit, loading, onFact }: AuditBarProps): ReactNode;
20
+ export {};
21
+ //# sourceMappingURL=AuditBar.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 「最近变更」—— 概览里的前 3 条;全量流在详情页。
3
+ *
4
+ * 默认就会扫描并展示(用户要求):先用 `changes?peek=1` 只读宿主缓存 ——
5
+ * 命中就直接显示;未命中则**自动触发一次扫描**(回看最近 20 个资源的时间线,约数秒),
6
+ * 期间显示骨架屏。宿主侧缓存 6 小时,所以只会"第一次慢"。
7
+ * 卡脚保留「重新扫描」,需要强制刷新时用。
8
+ *
9
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ChangeSummaryCard
10
+ */
11
+ import { type ReactNode } from 'react';
12
+ import type { ConfigResourceRow } from '../../../config/types.ts';
13
+ interface ChangeSummaryCardProps {
14
+ readonly account: string;
15
+ readonly scopeLabel: string;
16
+ readonly onGoDetail: () => void;
17
+ /** 点某条事件打开该资源的详情抽屉(与详情页变更事件流同一行为)。 */
18
+ readonly onOpen: (row: ConfigResourceRow) => void;
19
+ }
20
+ export declare function ChangeSummaryCard({ account, scopeLabel, onGoDetail, onOpen }: ChangeSummaryCardProps): ReactNode;
21
+ export {};
22
+ //# sourceMappingURL=ChangeSummaryCard.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 变更事件流 —— "最近改了什么"。
3
+ *
4
+ * 这张卡先天带着一条限制,所以它把限制写在自己脸上:配置审计**没有跨资源的变更流接口**
5
+ * (`/resources/history` 等路径实测全 404),ResourceQL 的日期比较又静默失效,
6
+ * 所以"最近 7 天全部变更"是做不到的。能做的是**回看最近变更的 N 个资源**,
7
+ * 把它们各自的时间线合成一条流 —— 页面上写清楚"这是这 N 个资源的事件"。
8
+ *
9
+ * 每条事件尽量回答"改了哪个字段":比较相邻两条历史快照的 `properties` 顶层键,
10
+ * 关系变更单列成「关系」。这就是从"什么变了"到"怎么变的"的那一步。
11
+ *
12
+ * 触发策略(成本差异很大):
13
+ * · 账号视角 → 打开就自动跑(该账号的清单已在缓存里,20 个资源约 1–2 秒);
14
+ * · 组织视角 → 手动点(每条事件都要跨账号 assume,成本高一个量级)。
15
+ *
16
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ChangesCard
17
+ */
18
+ import { type ReactNode } from 'react';
19
+ import type { ConfigResourceRow } from '../../../config/types.ts';
20
+ interface ChangesCardProps {
21
+ readonly account: string;
22
+ readonly scopeAccountName: string;
23
+ readonly onOpen: (row: ConfigResourceRow) => void;
24
+ }
25
+ export declare function ChangesCard({ account, scopeAccountName, onOpen }: ChangesCardProps): ReactNode;
26
+ export {};
27
+ //# sourceMappingURL=ChangesCard.d.ts.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 合规明细(账号视角):规则清单 → 不合规资源清单 → 资源详情。
3
+ *
4
+ * 这是把「合规率 62%」变成「哪条规则、把哪些资源、在什么时候判成了不合规」的那一步 ——
5
+ * 配置审计真正能落地的价值在这儿,而不是百分比。
6
+ *
7
+ * 两个刻意的选择:
8
+ * · **规则行可点**:点一条规则就只看它的不合规资源(服务端用
9
+ * `policy_assignment_id` 过滤,不是前端筛已取到的行);
10
+ * · **只给账号视角**:组织视角的聚合器合规接口在云上未发布(404 APIGW.0101),
11
+ * 所以这里没有"全组织合规明细"可给 —— 宿主会返回明确的 unavailable 说明。
12
+ *
13
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ComplianceDetail
14
+ */
15
+ import { type ReactNode } from 'react';
16
+ import type { ConfigResourceRow } from '../../../config/types.ts';
17
+ interface ComplianceDetailProps {
18
+ readonly account: string;
19
+ readonly accountName: string;
20
+ /** 点一行不合规资源 → 打开资源抽屉(证据链的另一半)。 */
21
+ readonly onOpen: (row: ConfigResourceRow) => void;
22
+ }
23
+ export declare function ComplianceDetail({ account, accountName, onOpen }: ComplianceDetailProps): ReactNode;
24
+ export {};
25
+ //# sourceMappingURL=ComplianceDetail.d.ts.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 「合规摘要」—— 概览里的小卡:合规状态直接给结论,不必先跳详情页。
3
+ *
4
+ * 两种视角的数据来源不同,这里如实分开:
5
+ * · 账号视角:规则数 / 不合规资源 / 合规率,来自该账号自己的判定(快照里就有);
6
+ * · 组织视角:聚合器**不聚合合规**(实测 `/aggregators/{id}/policy-states` 未发布),
7
+ * 所以**进页面就自动做一次逐账号汇总**(宿主缓存 6 小时),把合计直接摆在卡里 ——
8
+ * 不再要求用户先点"逐账号汇总"跳去详情页才看得到数字。
9
+ *
10
+ * 汇总的诚实边界照旧:只合计**取数成功**的账号,并写明尝试了几个、成功几个;
11
+ * 主账号自己的数另外单列一行 —— 不能拿它冒充组织总账。
12
+ *
13
+ * 卡片下半截给「Top5 不合规规则」(与详情页「合规判定」卡同一条信息):
14
+ * · 账号视角直接取快照里的 compliance.top;
15
+ * · 组织视角取汇总里的 top_rules(逐账号 policy-states 按规则名合并)。
16
+ *
17
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ComplianceSummaryCard
18
+ */
19
+ import { type ReactNode } from 'react';
20
+ import type { ConfigComplianceView } from '../../../config/types.ts';
21
+ interface ComplianceSummaryCardProps {
22
+ readonly compliance: ConfigComplianceView;
23
+ /** 组织视角没有"本账号合规"这回事,需要逐账号汇总。 */
24
+ readonly scope: 'organization' | 'account';
25
+ readonly accountName: string;
26
+ /** 跳到详情页对应位置(账号视角的规则明细 / 组织视角的逐账号表)。 */
27
+ readonly onGoDetail: () => void;
28
+ }
29
+ export declare function ComplianceSummaryCard(props: ComplianceSummaryCardProps): ReactNode;
30
+ export {};
31
+ //# sourceMappingURL=ComplianceSummaryCard.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 审计发现清单 —— "现在该做什么"的那张表。
3
+ *
4
+ * 三条设计约束:
5
+ * · **严重度只分三档**(高 / 中 / 低),不做加权打分:分数会掩盖"哪件事更该先做";
6
+ * · **每条都有量值与证据**(`30 / 35`、`按最近 200 个资源抽样`),不给"建议关注"这种空话;
7
+ * · `action: 'none'` 的条目**也照实显示**,按钮位置写明"需在控制台创建" ——
8
+ * 看板只读这件事本身就该让用户知道,而不是藏掉一条它解决不了的发现。
9
+ *
10
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/FindingsCard
11
+ */
12
+ import { type ReactNode } from 'react';
13
+ import type { ConfigFinding } from '../../../config/types.ts';
14
+ interface FindingsCardProps {
15
+ readonly findings: readonly ConfigFinding[];
16
+ readonly loading: boolean;
17
+ readonly onAction: (finding: ConfigFinding) => void;
18
+ }
19
+ export declare function FindingsCard({ findings, loading, onAction }: FindingsCardProps): ReactNode;
20
+ export {};
21
+ //# sourceMappingURL=FindingsCard.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 「口径」抽屉 —— 这一页每个数字是怎么来的。
3
+ *
4
+ * 与费用页的口径抽屉同一个目的:**把"这个数凭什么"写在该看到的距离内**。
5
+ * 配置审计尤其需要它,因为这里的"资源总数""覆盖""合规率"都有口径歧义,
6
+ * 而歧义一旦不留说明,就会被当成错误。
7
+ *
8
+ * 每条给三样东西:结论(标题)、算法/来源(formula)、以及需要注意的边界(note)。
9
+ *
10
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/GlossaryDrawer
11
+ */
12
+ import { type ReactNode } from 'react';
13
+ export declare function GlossaryDrawer({ open, onClose }: {
14
+ readonly open: boolean;
15
+ readonly onClose: () => void;
16
+ }): ReactNode;
17
+ //# sourceMappingURL=GlossaryDrawer.d.ts.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 组织视角的「合规明细(规则 → 不合规资源)」—— 跨账号按规则名合计。
3
+ *
4
+ * 账号视角那张表能一路下钻到资源(点规则筛资源、点资源开抽屉);
5
+ * 组织视角做不到:每一行的资源属于不同账号,拼成一张资源表会把"谁的资源"抹掉。
6
+ * 所以这里只给**规则维度**的合计,并明说资源级明细要切到具体账号看。
7
+ *
8
+ * 数据来自 `/api/wb/config/compliance-rollup`(宿主缓存 6 小时,与合规摘要、
9
+ * 组织合规汇总共用同一份),不额外取数。
10
+ *
11
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/OrgComplianceDetail
12
+ */
13
+ import { type ReactNode } from 'react';
14
+ export declare function OrgComplianceDetail(): ReactNode;
15
+ //# sourceMappingURL=OrgComplianceDetail.d.ts.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 分页控件(三张表共用:资源明细 / 变更事件流 / 合规判定的不合规资源)。
3
+ *
4
+ * 样式参照「资源管理」页的面板分页:**左侧计数、右侧控件** ——
5
+ * `共 200 条 每页 10 ▾ 上一页 [2] [3] … [20] 下一页`。
6
+ * 选它的理由:页码按钮能直接跳页,且计数与控件各归一侧,扫读时不用在中间找页码。
7
+ *
8
+ * 页码序列规则与资源页一致:≤7 页全显;更多时显示 `1 2 … cur-1 cur cur+1 … last`。
9
+ *
10
+ * 三个刻意的行为:
11
+ * · **始终渲染**(哪怕只有一页):只有一页时也要能改"每页条数",
12
+ * 否则设成 100 之后筛到 10 条就再也回不去;
13
+ * · 到头就禁用而不是隐藏按钮:按钮的消失会让人以为列表到底了;
14
+ * · 计数文案由调用方给(`count`),因为三张表的单位不同(条 / 条事件 / 条资源)。
15
+ *
16
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/Pager
17
+ */
18
+ import { type ReactNode } from 'react';
19
+ interface PagerProps {
20
+ readonly page: number;
21
+ readonly pageCount: number;
22
+ readonly pageSize: number;
23
+ readonly onPage: (page: number) => void;
24
+ readonly onPageSize: (size: number) => void;
25
+ /** 是否显示"每页 N 条"下拉(数据量小的表可以关掉,少一个控件)。 */
26
+ readonly showSize?: boolean;
27
+ /** 左侧计数文案,如「共 200 条」。 */
28
+ readonly count?: string;
29
+ }
30
+ export declare function Pager({ page, pageCount, pageSize, onPage, onPageSize, showSize, count }: PagerProps): ReactNode;
31
+ export {};
32
+ //# sourceMappingURL=Pager.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 资源详情抽屉(右侧滑出)。
3
+ *
4
+ * 一条必须说清的限制:**组织视角下点开的资源,详情是取不到的。**
5
+ * 实测主账号凭据读别的 domain 的详情直接 403(`RMS.00010006`),
6
+ * 所以这里不是"加载失败",而是一个确定的边界 —— 抽屉里直接给个按钮
7
+ * 「切到这个账号看」,比让用户自己回顶栏换视角顺手。
8
+ *
9
+ * 时间线(资源历史)是这一页最"配置审计"的东西:它记录每次上报的
10
+ * capture_time,也就是"这个资源什么时候被改成了什么样"的审计线索。
11
+ *
12
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ResourceDrawer
13
+ */
14
+ import { type ReactNode } from 'react';
15
+ import type { ConfigResourceRow, ConfigScope } from '../../../config/types.ts';
16
+ interface ResourceDrawerProps {
17
+ readonly open: boolean;
18
+ readonly scope: ConfigScope;
19
+ readonly account: string;
20
+ readonly row: ConfigResourceRow | null;
21
+ readonly onClose: () => void;
22
+ readonly onSwitchAccount: (account: string) => void;
23
+ }
24
+ export declare function ResourceDrawer(props: ResourceDrawerProps): ReactNode;
25
+ export {};
26
+ //# sourceMappingURL=ResourceDrawer.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 资源明细表。
3
+ *
4
+ * 两种视角的"能拿到多少"不一样,必须在表头就写清楚,否则用户会以为看的是全部:
5
+ * · 组织视角:走聚合器 ResourceQL,**取不全会**(不支持 offset 翻页),
6
+ * 所以只能是"最近更新的 200 条",并用服务/区域筛选缩小范围;
7
+ * · 账号视角:走该账号自己的 all-resources,翻页取全,这里就是全部。
8
+ *
9
+ * 关键字搜索放在**客户端**做:资源名五花八门(桶名、UUID、实例名),
10
+ * 拼进 ResourceQL 就要处理转义与注入;行本来就在手里,过一遍更简单也更安全。
11
+ *
12
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/ResourcesTable
13
+ */
14
+ import { type ReactNode } from 'react';
15
+ import type { ConfigFacets, ConfigResourceRow, ConfigResourcesView, ConfigScope } from '../../../config/types.ts';
16
+ interface ResourcesTableProps {
17
+ /** 筛选项(服务 / 区域),来自快照的 facets。 */
18
+ readonly facets?: ConfigFacets;
19
+ readonly provider: string;
20
+ readonly region: string;
21
+ readonly onProvider: (value: string) => void;
22
+ readonly onRegion: (value: string) => void;
23
+ readonly resources: ConfigResourcesView | null | undefined;
24
+ readonly loading: boolean;
25
+ readonly scope: ConfigScope;
26
+ readonly keyword: string;
27
+ readonly onKeyword: (value: string) => void;
28
+ readonly onOpen: (row: ConfigResourceRow) => void;
29
+ /** 治理维度筛选(从「审计发现」跳过来时带):untagged / defaultEp / badState / ''。 */
30
+ readonly resFilter: string;
31
+ readonly onResFilter: (value: string) => void;
32
+ }
33
+ export declare function ResourcesTable(props: ResourcesTableProps): ReactNode;
34
+ export {};
35
+ //# sourceMappingURL=ResourcesTable.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 组织级合规汇总(仅组织视角)—— 手动触发。
3
+ *
4
+ * 为什么手动:聚合器**不聚合合规**(`/aggregators/{id}/policy-states` 实测 404),
5
+ * 只能逐账号 assume 读它自己的规则与评估结果。5 个账号约 2 秒、宿主缓存 6 小时,
6
+ * 所以做成"点一下",而不是每次打开页面先等两秒。
7
+ *
8
+ * 一条必须坚持的口径:**合计只算取数成功的账号**,失败的单独列为一行并标注原因。
9
+ * 把失败账号当 0 混进合计,会让组织合规率看起来比实际更好 —— 审计里最危险的那种错。
10
+ *
11
+ * @module @huaweidevtools/landingzone-workbench/client/pages/ConfigPage/RollupPanel
12
+ */
13
+ import { type ReactNode } from 'react';
14
+ export declare function RollupPanel({ onOpenAccount }: {
15
+ readonly onOpenAccount: (accountId: string) => void;
16
+ }): ReactNode;
17
+ //# sourceMappingURL=RollupPanel.d.ts.map