@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,111 @@
1
+ {
2
+ "$schema": "scp-policies-v2",
3
+ "description": "SCP 策略规则(唯一来源):策略 content 全文 + 结构定义(typeEnable/code/label/attach)。2026-11-13 拆分:interaction-config.md 与 standard-baseline.md 不再内联拷贝,均以 ref 引用本文件。消费形态:①loadScpPoliciesDisplay(剥 content)→ planner recommended 给 AI,确认回传只带 code/attach 引用,服务端按 code 回填全文(防长参数 MALFORMED_RESPONSE 事故);②loadScpPoliciesFull(content 转 JSON 字符串)→ standard-loader 解析 standard-baseline.md scpPolicies ref 作 spec 基线。改策略 content/增删推荐策略 → 只改本文件。",
4
+ "typeEnable": {
5
+ "code": "scpPolicyTypeEnable",
6
+ "label": "SCP 策略类型启用",
7
+ "dependsOn": ["root"]
8
+ },
9
+ "policies": [
10
+ {
11
+ "code": "denyHighRiskPortsPolicy",
12
+ "label": "SCP 策略 DenyHighRiskPortsIngress",
13
+ "dependsOn": ["root"],
14
+ "name": "DenyHighRiskPortsIngress",
15
+ "description": "禁止安全组对公网(0.0.0.0/0)入方向开放高危端口",
16
+ "attachTarget": "root",
17
+ "attachTargetType": "root",
18
+ "attach": {
19
+ "code": "denyHighRiskPortsAttach",
20
+ "label": "绑定 DenyHighRiskPortsIngress→root",
21
+ "dependsOn": ["denyHighRiskPortsPolicy", "scpPolicyTypeEnable"],
22
+ "target": "root",
23
+ "targetType": "root"
24
+ },
25
+ "content": {
26
+ "Version": "5.0",
27
+ "Statement": [
28
+ {
29
+ "Sid": "DenyHighRiskPortsIngressPublicIP",
30
+ "Effect": "Deny",
31
+ "Action": [
32
+ "vpc:securityGroups:create",
33
+ "vpc:securityGroups:update",
34
+ "vpc:securityGroupRules:create",
35
+ "vpc:securityGroupRules:update",
36
+ "vpc:nativeSecurityGroups:create",
37
+ "vpc:nativeSecurityGroups:update",
38
+ "vpc:nativeSecurityGroupRules:create"
39
+ ],
40
+ "Condition": {
41
+ "ForAnyValue:NumberEquals": {
42
+ "vpc:SecurityGroupRulePort": [
43
+ "20","21","22","23","69","111","135","137","139","161","162","177","389","445","513","636","639","830","1433","1435","1521","1530","2049","2081","2181","3306","3389","4899","5000","5432","5555","5672","5900","5901","5984","6000","6030","6041","6063","6379","6800","7306","8083","8086","8161","8635","9042","9092","9095","9200","9300","9999","11211","15672","25308","26800","27017","27019","28017","50000","50050","61616","65432"
44
+ ]
45
+ },
46
+ "ForAnyValue:StringEquals": {
47
+ "vpc:SecurityGroupRuleDirection": ["ingress"]
48
+ },
49
+ "ForAnyValue:StringMatch": {
50
+ "vpc:SecurityGroupRuleRemoteIpPrefix": ["0.0.0.0/0"]
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "code": "denyDeleteLogArchivePolicy",
59
+ "label": "SCP 策略 DenyDeleteLogArchive",
60
+ "dependsOn": ["root"],
61
+ "name": "DenyDeleteLogArchive",
62
+ "description": "禁止删除/关闭组织内成员账号(日志归档保护,全组织生效)",
63
+ "attachTarget": "root",
64
+ "attachTargetType": "root",
65
+ "attach": {
66
+ "code": "denyDeleteLogArchiveAttach",
67
+ "label": "绑定 DenyDeleteLogArchive→root",
68
+ "dependsOn": ["denyDeleteLogArchivePolicy", "scpPolicyTypeEnable"],
69
+ "target": "root",
70
+ "targetType": "root"
71
+ },
72
+ "content": {
73
+ "Version": "5.0",
74
+ "Statement": [
75
+ {
76
+ "Sid": "DenyDeleteMemberAccount",
77
+ "Effect": "Deny",
78
+ "Action": [
79
+ "organizations:accounts:leave",
80
+ "organizations:accounts:close"
81
+ ],
82
+ "Resource": ["*"]
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ ],
88
+ "attachTargetRules": {
89
+ "options": [
90
+ { "value": "root", "label": "根组织(全组织)", "desc": "推荐" },
91
+ { "value": "custom", "label": "自定义(填 OU名 或 账号名)", "desc": "绑定到特定 OU 或账号" },
92
+ { "value": "", "label": "不绑定(只创建规则)", "desc": "用户自行绑定" }
93
+ ],
94
+ "typeRecognition": {
95
+ "rule": "attachTarget=root → type=root; attachTarget=空 → type=空(不绑定); 其他 → 从方案资源清单匹配 OU名/账号名",
96
+ "matchHint": "AI 判断:用户输入 attachTarget 后,从方案资源清单(instances)找 typeId=ou 且 semanticParams.name===attachTarget → type=ou; typeId=account 且 semanticParams.name===attachTarget → type=account; 两个都匹配或都不匹配 → 问用户指定类型(ou/account/空)"
97
+ },
98
+ "verifyingCheck": {
99
+ "rule": "检查 attachTarget 对应实体是否在方案资源清单(已建/待建),不在标⚠️提示用户",
100
+ "matchHint": "AI 检查:type=ou 时找 typeId=ou 且 name 匹配的实例,在→✅/⏳,不在→⚠️提示'绑定实体不在方案里,请删除绑定或换绑定';type=account 时同理找 typeId=account;type=root 或空→不检查"
101
+ },
102
+ "entityIdResolve": {
103
+ "rule": "执行时(run)按 attachTarget 类型查 API 拿实体 ID",
104
+ "matchHint": "AI 执行:attachTarget=root → 调 ListRoots(GET /v1/organizations/roots) 拿 roots[0].id; attachTarget 是 OU名 → 调 ListOrganizationalUnits(GET /v1/organizations/organizational-units?parent_id={rootId}) 按 name 匹配拿 id; attachTarget 是账号名 → 调 ListAccounts(GET /v1/organizations/accounts) 按 name 匹配拿 id。查不到标⚠️"
105
+ }
106
+ },
107
+ "rules": {
108
+ "exceptionSupport": "SCP 支持 Condition 的 ForAnyValue:StringNotEquals 排除特定账号(如 g:DomainName != 某账号 可绕过 Deny)。推荐策略默认不含例外(全员生效),用户可在 moduleDetail 自定义 content 添加例外。",
109
+ "exceptionReference": "已有策略 SecurityGroupDenyHighRiskPort 用 g:DomainName 排除了 es_workload_ai1shell_manager 账号"
110
+ }
111
+ }
@@ -0,0 +1,33 @@
1
+ # 初始搭建主线节点完成判据(state-machine v1)
2
+
3
+ > 引擎 canEnter/isComplete 的知识源(05§8.2)。**节点顺序写死在代码 NODE_ORDER**,本文件只声明完成判据。
4
+ > 判据表达式由 engine 固定求值器执行:仅支持 `===` / `!==` / `exists` / 逻辑与 `&&`,不做任意 eval。
5
+
6
+ ```json
7
+ {
8
+ "nodes": [
9
+ { "id": "n1-check", "complete": "form.qualificationPassed === true" },
10
+ { "id": "n2-region", "complete": "form.region !== ''" },
11
+ { "id": "n3-blueprint", "complete": "form.blueprintId !== ''" },
12
+ { "id": "n4-modules", "complete": "form.modules !== null && form.modulesConfirmed === true" },
13
+ { "id": "n5-details", "complete": "form.confirmed.allConfirmed === true" },
14
+ { "id": "n6-plan", "complete": "exists resource-plan.json" },
15
+ { "id": "n7-verify", "complete": "exists probe-results.json" },
16
+ { "id": "n8-approve", "complete": "form.approvalStatus === 'approved' && form.archived === true" },
17
+ { "id": "n9-buildmode", "complete": "form.buildPlan !== null" },
18
+ { "id": "n10-governance", "complete": "ledger governance-build.json has no pending and no failed" },
19
+ { "id": "n11-infra", "complete": "ledger infra-build.json has no pending" },
20
+ { "id": "n12-reconcile", "complete": "exists reconciliation.md" }
21
+ ]
22
+ }
23
+ ```
24
+
25
+ ## 判据语义说明
26
+
27
+ | 节点 | 判据 | 实现要点 |
28
+ |---|---|---|
29
+ | n1 | qualificationPassed | N1 探测后写入 form |
30
+ | n4 | form.modules != null | 对象存在即可(空选也算完成——基础层锁定隐含) |
31
+ | n6/n7 | exists 文件 | 方案目录下存在该产物文件 |
32
+ | n10/n11 | ledger 检查 | 成功状态集读 config.json statusGroups.success;pending=未轮到、failed=有失败待重试(重试=再次 run) |
33
+ | n11(terraform 方式) | infra='terraform' 时:脚本生成完成即视为 ledger 无 pending(apply 状态另计,见 09 G6) |