@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined in Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is derived from (or based upon) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Huawei Cloud AI Shell
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
200
+ implied. See the License for the specific language governing
201
+ permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,86 @@
1
- # Temporary Holding Version
1
+ # landingzone-workbench
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A DSH (DeepSeek Harness) plugin that adds a **workbench panel** to the right sidebar.
4
+
5
+ ## What is this
6
+
7
+ A double-half DSH plugin package:
8
+
9
+ - **Host half** (`src/index.ts`) — minimal mount point. Registers no tools yet.
10
+ When real cloud operations are needed, this is where `ctx.tools.execute`
11
+ bridges to the ops-deploy MCP (same pattern as `aishell-landing-zone`).
12
+ - **Client half** (`src/client/index.ts`) — registers a right-sidebar tab and
13
+ renders the workbench panel (`WorkbenchPanel`) into the
14
+ `sidebar.right.pane.tab` slot.
15
+
16
+ The panel currently contains a **calculator** — a trivial first occupant that
17
+ validates the full bundle → slot → React → CSS-module pipeline without needing
18
+ any cloud API. Later panels (environment list, architecture diagram, pipeline
19
+ stages) replace the calculator in `WorkbenchPanel` while the tab registration
20
+ stays unchanged.
21
+
22
+ ## Layout
23
+
24
+ ```
25
+ packages/landingzone-workbench/
26
+ ├── package.json @huaweidevtools/landingzone-workbench
27
+ ├── cordis.patch.yml bundle patch (one insert row)
28
+ ├── tsconfig.json extends ../../tsconfig.base.json
29
+ ├── tsdown.config.ts clientBundle('<pkg>', ['src/index.ts'])
30
+ └── src/
31
+ ├── index.ts host half: name / inject / apply
32
+ └── client/
33
+ ├── index.ts client half: register right-sidebar tab + body + title
34
+ ├── Calculator.tsx panel content (calculator) + tab title + glyph
35
+ ├── panel.module.css styles (DSW CSS aliases for theme integration)
36
+ └── css-modules.d.ts *.module.css type declarations
37
+ ```
38
+
39
+ ## Build
40
+
41
+ ```sh
42
+ pnpm install
43
+ pnpm run build # tsdown bundles host + client, then tsc -b (types)
44
+ ```
45
+
46
+ Output: `lib/index.js` (host ESM), `lib/client.js` (browser CJS closure),
47
+ `lib/types/**/*.d.ts`.
48
+
49
+ ## Install into DSH
50
+
51
+ ```sh
52
+ dsh plugin --profile <name> add @huaweidevtools/landingzone-workbench
53
+ dsh web --profile <name>
54
+ ```
55
+
56
+ Open `http://127.0.0.1:3080` — the right sidebar shows a "工作台" tab.
57
+
58
+ ## How the panel mounts (DSH slot system)
59
+
60
+ The client half uses the three-step right-sidebar registration (same as
61
+ `aishell-landing-zone`):
62
+
63
+ 1. `ctx.sidebarRightTabs.register({ id, kind, title, guide })` — declare the
64
+ tab type so it appears in the sidebar guide.
65
+ 2. `ctx.slots.inject('sidebar.right.pane.tab', register({ name, key: id }, WorkbenchPanel))`
66
+ — render the panel body into the keyed slot.
67
+ 3. `ctx.slots.inject('sidebar.right.pane.tab.title', register({ name, key: id }, WorkbenchTabTitle))`
68
+ — render the tab chip (icon + label).
69
+
70
+ `@deepseek-ai/dsh-client-ui-sidebar-right` is loaded by the shell
71
+ (`dsh-web-app` cordis.patch.yml), so it is **not** listed in `dsh.client.inject`
72
+ — listing it makes the shell resolve it as a third-party path, which fails.
73
+
74
+ ## Next steps
75
+
76
+ Replace `WorkbenchPanel`'s calculator with real workbench views:
77
+
78
+ - **EnvironmentView** — environment list + detail (port of `environment.js`)
79
+ - **StagesView** — 8-step pipeline (port of `stages.js`)
80
+ - **ArchDiagram** — architecture SVG (port of `renderArch`)
81
+ - Host half gains `makeOpsDeployBridge(ctx)` + REST routes + SSE bus (port of
82
+ `aishell-landing-zone/src/index.ts` patterns)
83
+
84
+ ## License
85
+
86
+ Apache-2.0
@@ -0,0 +1,21 @@
1
+ # landingzone-workbench bundle patch: mounts the workbench panel plugin.
2
+ #
3
+ # The row carries no `config`. The host half (src/index.ts) is a minimal
4
+ # mount point; the client half (src/client/index.ts) registers a right-sidebar
5
+ # tab that renders the workbench panel. Both halves ship in one package.
6
+ - insert:
7
+ - id: landingzone-workbench
8
+ name: '@huawei-iac-tools/landingzone-workbench'
9
+
10
+ # lz-setup preset(08 篇行动项 / 12 篇 T8 前置):初始搭建会话的收敛工具面。
11
+ # plugins 列表只含本插件 —— 选择该 preset 的会话只加载 workbench 工具
12
+ # (wb_lz_* + cost/config facts),看不到 landing_zone_plan 等旧 LZ 工具。
13
+ # create-plan 建会话时按 agentPreset:'lz-setup' 选择(S1-4 接线)。
14
+ - id: preset-lz-setup
15
+ name: '@deepseek-ai/dsh-agent-preset'
16
+ config:
17
+ id: lz-setup
18
+ name: LZ 初始搭建
19
+ description: Landing Zone 初始搭建会话:收敛工具面(仅 workbench 的 wb_lz_* 搭建工具与事实工具)
20
+ plugins:
21
+ - name: '@huawei-iac-tools/landingzone-workbench'
@@ -0,0 +1,128 @@
1
+ # 账号资质前置校验(account-qualification)
2
+
3
+ > 定义 Landing Zone 搭建前的账号资质门禁:企业实名认证 + 主账号身份。
4
+ > 不通过则阻断(qualificationBlocked),提示用户完成认证或换号。
5
+ >
6
+ > 消费方:checks.ts 的 runChecks(层1+层2 检查项)。
7
+ > 改校验规则/接口/判定/文案 → 改本文件。
8
+
9
+ ---
10
+
11
+ ## 一、为什么需要
12
+
13
+ 华为云创建 Organizations 组织**强制要求账号已完成企业实名认证**(业务硬前提)。
14
+ Landing Zone 一切的根是组织,组织建不起来,后续账号/OU/IC/网络全无法落地。
15
+ 故搭建前必须校验:① 账号已企业实名认证 ② 当前 AK/SK 属于组织管理账号(主账号)。
16
+
17
+ 现状(改造前):`checks.ts` 的 `runChecks` 只靠"ListAccounts 能调通"判凭据——
18
+ 这只能证明"是组织成员/有 Organizations 读权限",证明不了是主账号、证明不了企业认证已完成。
19
+ 本模块补这两层前置门禁。
20
+
21
+ ---
22
+
23
+ ## 二、校验层次
24
+
25
+ ### 层1 · 主账号身份校验(有 API,精确判定)
26
+
27
+ **目的**:确认当前 AK/SK 属于组织管理账号(主账号),而非某个成员账号的子用户。
28
+
29
+ **接口**:
30
+ | 步骤 | 接口 | 用途 |
31
+ |---|---|---|
32
+ | a | Organizations `ShowOrganization`(`GET /v1/organizations`) | 拿 `management_account_id`(组织管理账号 ID) |
33
+ | b | IAM `KeystoneListProjects`(`GET /v3/projects`) | 拿当前 AK/SK 所属 `domain_id`(账号 ID) |
34
+
35
+ **判定**:
36
+ - 组织已建(ShowOrganization 返回非空):
37
+ - `domain_id === management_account_id` → 是主账号 ✅
38
+ - `domain_id !== management_account_id` → 非主账号 ❌(提示:请使用组织管理账号 AK/SK)
39
+ - 组织未建(ShowOrganization 返回空/404,全新环境):
40
+ - 无 management_account_id 可比对 → 降级为"凭据有效 + 待建组织后确认",**不阻断**(全新环境本就要建组织)
41
+
42
+ **host**:
43
+ - Organizations:全局,`apiexplorerHost('Organizations', region)`
44
+ - IAM:`apiexplorerHost('IAM', region)`
45
+
46
+ **依据**:
47
+ - Organizations ShowOrganization 现有代码已调(`checks.ts:100-110`),返回 `organization.management_account_id`
48
+ - IAM KeystoneListProjects 文档 [iam_06_0001](https://support.huaweicloud.com/api-iam/iam_06_0001.html),返回 `projects[].domain_id`
49
+ - domain_id 概念现有体系已用(`config-rms.md:88`、`assume-client.ts:153`、`checks.ts:244`)
50
+
51
+ ### 层2 · 企业实名认证直查(API 已实测确认,精确判定)
52
+
53
+ **目的**:确认账号已完成企业实名认证(建组织硬前提)。
54
+
55
+ **接口**:
56
+ - `GET https://bss.myhuaweicloud.com/v2/customers/real-name-auth-status`
57
+ - 服务:productshort=`bss`(host `bss.myhuaweicloud.com`)
58
+ - 参数:`domain_id`(BSS 用 domain_id 标识账号,复用层1 拿到的 domain_id)
59
+ - host 解析:`apiexplorerHost('bss', region)`
60
+
61
+ **返回**:`{"verified_status": <认证状态>, "verified_type": <认证类型>}`
62
+
63
+ **值域**(待官方文档最终确认,基于实测+华为云常识):
64
+ | 字段 | 值 | 含义(待确认) |
65
+ |---|---|---|
66
+ | verified_status | 1 | 未认证(待确认) |
67
+ | verified_status | 2 | 已认证 ✅(实测确认) |
68
+ | verified_status | 3 | 审核中(待确认) |
69
+ | verified_type | 1 | 企业认证 ✅(实测确认) |
70
+ | verified_type | 2 | 个人认证(待确认) |
71
+
72
+ **判定**:
73
+ - `verified_status === 2 && verified_type === 1` → 企业实名认证已完成 ✅
74
+ - 否则 → 未完成企业认证 ❌(提示:请到账号中心完成企业实名认证,或更换已认证账号)
75
+
76
+ **实测确认**(用户提供):
77
+ ```
78
+ GET https://bss.myhuaweicloud.com/v2/customers/real-name-auth-status?domain_id=<domain_id>
79
+ → {"verified_status": 2, "verified_type": 1} # 已企业认证账号
80
+ ```
81
+
82
+ **注**:`bbs` 为 `bss` 笔误;`customer` 是 BSS 服务下 `/customers/` 接口族,非独立 productshort。
83
+
84
+ ### 结构化判定规则(checks.ts 读取,不硬编码)
85
+
86
+ > checks.ts 的 `runChecks` 层2 判定从此 JSON 块读取阈值,改判定标准改本块,不碰代码。
87
+
88
+ ```json
89
+ {
90
+ "enterpriseRealname": {
91
+ "verified_status": 2,
92
+ "verified_type": 1,
93
+ "description": "verified_status=2(已认证)且 verified_type=1(企业认证)→ 企业实名认证已完成"
94
+ }
95
+ }
96
+ ```
97
+
98
+ ---
99
+
100
+ ## 三、阻断规则
101
+
102
+ | 检查项 | 不通过处理 |
103
+ |---|---|
104
+ | 层1 主账号身份(组织已建时) | 阻断,提示"请使用组织管理账号 AK/SK" |
105
+ | 层1 主账号身份(组织未建时) | 不阻断(降级放行,全新环境) |
106
+ | 层2 企业认证 | **阻断**,提示"请完成企业实名认证或更换账号" |
107
+
108
+ `runChecks` 返回 `qualificationBlocked: true`(层2 不通过 或 层1 明确非主账号)时,
109
+ Agent 据 SKILL 指令提示用户,不继续 `landing_zone_plan`。
110
+
111
+ ---
112
+
113
+ ## 四、与其他检查的关系
114
+
115
+ | 现有检查 | 改造后关系 |
116
+ |---|---|
117
+ | `mgmt_account`(ListAccounts 验凭据) | 保留(快速验凭据有效性),与层1 互补 |
118
+ | `existing_resources`(detectExisting 全量探测) | 保留;层1 复用其 ShowOrganization 结果(existing.organization.managementAccountId) |
119
+
120
+ 顺序:凭据验证(ListAccounts)→ detectExisting(探测,含 ShowOrganization)→ 层1 主账号(用 existing + IAM)→ 层2 认证(bss)→ 探测汇总。
121
+
122
+ ---
123
+
124
+ ## 五、维护提醒
125
+
126
+ - 值域确认后:更新"二、层2 值域"表(把"待确认"改实值)
127
+ - 接口变更:更新"二、接口"段
128
+ - 改判定逻辑:改"二、判定"段,同步 checks.ts