@intentius/chant-lexicon-aws 0.124.31 → 0.124.33

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 (649) hide show
  1. package/dist/actions/dynamodb.js +41 -0
  2. package/dist/actions/ecr.js +9 -0
  3. package/dist/actions/ecs.js +5 -0
  4. package/dist/actions/iam.js +3 -0
  5. package/dist/actions/index.js +9 -0
  6. package/dist/actions/lambda.js +11 -0
  7. package/dist/actions/logs.js +4 -0
  8. package/dist/actions/s3.js +40 -0
  9. package/dist/actions/sns.js +5 -0
  10. package/dist/actions/sqs.js +15 -0
  11. package/dist/agentcore/trace-fetch.d.ts.map +1 -1
  12. package/dist/agentcore/trace-fetch.js +472 -0
  13. package/dist/agentcore/trace-render.js +359 -0
  14. package/dist/ambient.js +148 -0
  15. package/dist/api/credential-chain.d.ts +30 -3
  16. package/dist/api/credential-chain.d.ts.map +1 -1
  17. package/dist/api/credential-chain.js +509 -0
  18. package/dist/api/read-client.d.ts +16 -43
  19. package/dist/api/read-client.d.ts.map +1 -1
  20. package/dist/api/read-client.js +458 -0
  21. package/dist/api/sigv4.d.ts +4 -4
  22. package/dist/api/sigv4.js +185 -0
  23. package/dist/behaviour-kinds.js +114 -0
  24. package/dist/caller-identity.d.ts +3 -5
  25. package/dist/caller-identity.d.ts.map +1 -1
  26. package/dist/caller-identity.js +146 -0
  27. package/dist/codegen/docs-cli.js +2 -0
  28. package/dist/codegen/docs.js +120 -0
  29. package/dist/codegen/enum-overlay.js +162 -0
  30. package/dist/codegen/extensions.js +139 -0
  31. package/dist/codegen/fallback.js +32 -0
  32. package/dist/codegen/generate-cli.js +15 -0
  33. package/dist/codegen/generate-lexicon.js +70 -0
  34. package/dist/codegen/generate-typescript.js +226 -0
  35. package/dist/codegen/generate.d.ts.map +1 -1
  36. package/dist/codegen/generate.js +234 -0
  37. package/dist/codegen/naming.js +135 -0
  38. package/dist/codegen/package.js +67 -0
  39. package/dist/codegen/patches.d.ts +26 -1
  40. package/dist/codegen/patches.d.ts.map +1 -1
  41. package/dist/codegen/patches.js +90 -0
  42. package/dist/codegen/property-overlay.js +85 -0
  43. package/dist/codegen/property-overlay.json +1 -16
  44. package/dist/codegen/sam.js +402 -0
  45. package/dist/codegen/typecheck.js +4 -0
  46. package/dist/codegen/versions.js +31 -0
  47. package/dist/components/__tests__/mock-cloud-executor.js +326 -0
  48. package/dist/components/apply.d.ts +44 -1
  49. package/dist/components/apply.d.ts.map +1 -1
  50. package/dist/components/apply.js +752 -0
  51. package/dist/components/builders.js +37 -0
  52. package/dist/components/capability-plugin.js +66 -0
  53. package/dist/components/cloud-executor.d.ts +35 -0
  54. package/dist/components/cloud-executor.d.ts.map +1 -1
  55. package/dist/components/cloud-executor.js +576 -0
  56. package/dist/components/config-bom.js +207 -0
  57. package/dist/components/host-delivery.js +117 -0
  58. package/dist/components/index.js +18 -0
  59. package/dist/components/job-submission.js +77 -0
  60. package/dist/components/publish.js +234 -0
  61. package/dist/components/safety.js +62 -0
  62. package/dist/components/wait-aws.js +68 -0
  63. package/dist/composites/agentcore-agent.js +187 -0
  64. package/dist/composites/agentcore-trust-policy.js +13 -0
  65. package/dist/composites/alb-shared.js +84 -0
  66. package/dist/composites/bucket-deployment.js +93 -0
  67. package/dist/composites/catalog.js +2714 -0
  68. package/dist/composites/dynamodb-table.js +66 -0
  69. package/dist/composites/ec2-instance-bundle.js +75 -0
  70. package/dist/composites/ec2-instance-role.js +26 -0
  71. package/dist/composites/ecr-repository.js +64 -0
  72. package/dist/composites/ecs-trust-policy.js +10 -0
  73. package/dist/composites/efs-with-access-point.js +44 -0
  74. package/dist/composites/eks-cluster.js +118 -0
  75. package/dist/composites/fargate-alb.js +216 -0
  76. package/dist/composites/fargate-service.js +222 -0
  77. package/dist/composites/index.js +28 -0
  78. package/dist/composites/lambda-api.js +15 -0
  79. package/dist/composites/lambda-dynamodb.js +77 -0
  80. package/dist/composites/lambda-eventbridge.js +27 -0
  81. package/dist/composites/lambda-function.js +54 -0
  82. package/dist/composites/lambda-s3.js +93 -0
  83. package/dist/composites/lambda-sns.js +23 -0
  84. package/dist/composites/lambda-sqs.js +34 -0
  85. package/dist/composites/landing-zone.js +82 -0
  86. package/dist/composites/microvm-app.js +293 -0
  87. package/dist/composites/minimal-vpc.js +40 -0
  88. package/dist/composites/monitoring-stack.js +105 -0
  89. package/dist/composites/nlb-service.js +61 -0
  90. package/dist/composites/rds-instance.js +98 -0
  91. package/dist/composites/scheduled-lambda.js +28 -0
  92. package/dist/composites/solr-fargate-service.js +33 -0
  93. package/dist/composites/step-functions-workflow.js +78 -0
  94. package/dist/composites/vpc-default.js +132 -0
  95. package/dist/condition.js +43 -0
  96. package/dist/coverage.js +4 -0
  97. package/dist/deep-observe.d.ts.map +1 -1
  98. package/dist/deep-observe.js +709 -0
  99. package/dist/deep-topology.js +226 -0
  100. package/dist/default-tags.js +50 -0
  101. package/dist/defaults.js +85 -0
  102. package/dist/dependencies.js +269 -0
  103. package/dist/detect.js +21 -0
  104. package/dist/disruption.d.ts.map +1 -1
  105. package/dist/disruption.js +129 -0
  106. package/dist/effect-receipt-row.js +107 -0
  107. package/dist/generated/index.d.ts +1297 -82
  108. package/dist/generated/index.d.ts.map +1 -1
  109. package/dist/generated/index.js +12382 -0
  110. package/dist/generated/runtime.js +4 -0
  111. package/dist/governance.js +131 -0
  112. package/dist/health.d.ts +61 -0
  113. package/dist/health.d.ts.map +1 -0
  114. package/dist/health.js +216 -0
  115. package/dist/identity-observe.d.ts.map +1 -1
  116. package/dist/identity-observe.js +127 -0
  117. package/dist/import/generator.js +757 -0
  118. package/dist/import/live-export.js +34 -0
  119. package/dist/import/parser.js +394 -0
  120. package/dist/index.js +69 -0
  121. package/dist/integrity.json +6 -6
  122. package/dist/intrinsics.js +393 -0
  123. package/dist/lint/audit-catalog.js +87 -0
  124. package/dist/lint/audit-lineage.js +150 -0
  125. package/dist/lint/post-synth/cf-refs.js +247 -0
  126. package/dist/lint/post-synth/cor020.js +60 -0
  127. package/dist/lint/post-synth/ext001.d.ts.map +1 -1
  128. package/dist/lint/post-synth/ext001.js +197 -0
  129. package/dist/lint/post-synth/index.js +124 -0
  130. package/dist/lint/post-synth/waw010.js +41 -0
  131. package/dist/lint/post-synth/waw011.js +41 -0
  132. package/dist/lint/post-synth/waw013.js +38 -0
  133. package/dist/lint/post-synth/waw014.js +42 -0
  134. package/dist/lint/post-synth/waw015.js +88 -0
  135. package/dist/lint/post-synth/waw016.d.ts.map +1 -1
  136. package/dist/lint/post-synth/waw016.js +116 -0
  137. package/dist/lint/post-synth/waw017.js +43 -0
  138. package/dist/lint/post-synth/waw018.js +61 -0
  139. package/dist/lint/post-synth/waw019.js +64 -0
  140. package/dist/lint/post-synth/waw020.js +56 -0
  141. package/dist/lint/post-synth/waw021.js +44 -0
  142. package/dist/lint/post-synth/waw022.js +36 -0
  143. package/dist/lint/post-synth/waw023.js +40 -0
  144. package/dist/lint/post-synth/waw024.js +46 -0
  145. package/dist/lint/post-synth/waw025.js +36 -0
  146. package/dist/lint/post-synth/waw026.js +38 -0
  147. package/dist/lint/post-synth/waw027.js +41 -0
  148. package/dist/lint/post-synth/waw028.js +39 -0
  149. package/dist/lint/post-synth/waw029.js +54 -0
  150. package/dist/lint/post-synth/waw030.js +282 -0
  151. package/dist/lint/post-synth/waw031.js +58 -0
  152. package/dist/lint/post-synth/waw032.js +45 -0
  153. package/dist/lint/post-synth/waw033.js +75 -0
  154. package/dist/lint/post-synth/waw034.js +52 -0
  155. package/dist/lint/post-synth/waw035.js +56 -0
  156. package/dist/lint/post-synth/waw036.js +79 -0
  157. package/dist/lint/post-synth/waw037.js +67 -0
  158. package/dist/lint/post-synth/waw038.js +42 -0
  159. package/dist/lint/post-synth/waw039.js +42 -0
  160. package/dist/lint/post-synth/waw040.js +45 -0
  161. package/dist/lint/post-synth/waw041.js +40 -0
  162. package/dist/lint/post-synth/waw042.js +99 -0
  163. package/dist/lint/post-synth/waw043.js +51 -0
  164. package/dist/lint/post-synth/waw044.js +64 -0
  165. package/dist/lint/post-synth/waw045.js +49 -0
  166. package/dist/lint/post-synth/waw046.js +52 -0
  167. package/dist/lint/post-synth/waw047.js +43 -0
  168. package/dist/lint/post-synth/waw048.js +40 -0
  169. package/dist/lint/post-synth/waw049.js +78 -0
  170. package/dist/lint/post-synth/waw050.js +44 -0
  171. package/dist/lint/post-synth/waw051.js +41 -0
  172. package/dist/lint/post-synth/waw052.js +43 -0
  173. package/dist/lint/post-synth/waw053.js +43 -0
  174. package/dist/lint/post-synth/waw054.js +41 -0
  175. package/dist/lint/post-synth/waw055.js +41 -0
  176. package/dist/lint/post-synth/waw056.js +65 -0
  177. package/dist/lint/post-synth/waw057.js +43 -0
  178. package/dist/lint/post-synth/waw058.js +61 -0
  179. package/dist/lint/post-synth/waw059.js +338 -0
  180. package/dist/lint/post-synth/waw060.js +83 -0
  181. package/dist/lint/post-synth/waw061.js +60 -0
  182. package/dist/lint/post-synth/waw062.js +0 -0
  183. package/dist/lint/post-synth/waw063.js +0 -0
  184. package/dist/lint/post-synth/waw064.js +45 -0
  185. package/dist/lint/post-synth/waw065.js +104 -0
  186. package/dist/lint/post-synth/waw066.js +145 -0
  187. package/dist/lint/post-synth/waw067.js +115 -0
  188. package/dist/lint/post-synth/waw068.js +69 -0
  189. package/dist/lint/post-synth/waw069.js +0 -0
  190. package/dist/lint/rules/hardcoded-region.js +38 -0
  191. package/dist/lint/rules/iam-wildcard.js +60 -0
  192. package/dist/lint/rules/index.js +6 -0
  193. package/dist/lint/rules/s3-encryption.js +60 -0
  194. package/dist/live-attrs.js +42 -0
  195. package/dist/lsp/completions.d.ts.map +1 -1
  196. package/dist/lsp/completions.js +18 -0
  197. package/dist/lsp/hover.d.ts.map +1 -1
  198. package/dist/lsp/hover.js +66 -0
  199. package/dist/manifest.json +1 -1
  200. package/dist/mapping.js +33 -0
  201. package/dist/meta.json +17359 -784
  202. package/dist/nested-stack.js +95 -0
  203. package/dist/okf/index.md +203 -0
  204. package/dist/okf/rules/EXT001.md +1 -0
  205. package/dist/okf/rules/WAW016.md +2 -0
  206. package/dist/okf/rules/WAW019.md +1 -0
  207. package/dist/okf/rules/WAW028.md +1 -0
  208. package/dist/okf/rules/WAW030.md +2 -0
  209. package/dist/okf/rules/WAW039.md +1 -0
  210. package/dist/okf/rules/WAW049.md +1 -0
  211. package/dist/okf/rules/WAW056.md +1 -0
  212. package/dist/okf/rules/WAW058.md +1 -0
  213. package/dist/okf/rules/WAW062.md +1 -0
  214. package/dist/okf/rules/WAW064.md +1 -0
  215. package/dist/okf/rules/WAW065.md +1 -0
  216. package/dist/okf/rules/WAW066.md +1 -0
  217. package/dist/okf/rules/WAW067.md +1 -0
  218. package/dist/okf/rules/WAW068.md +1 -0
  219. package/dist/okf/rules/WAW069.md +4 -0
  220. package/dist/okf/types/AIWorkloadConfig.md +23 -0
  221. package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
  222. package/dist/okf/types/AccountAccessApplication.md +28 -0
  223. package/dist/okf/types/AccountAccessEntitlement.md +22 -0
  224. package/dist/okf/types/ActionTarget.md +20 -0
  225. package/dist/okf/types/AdConfiguration.md +21 -0
  226. package/dist/okf/types/Adapter.md +26 -0
  227. package/dist/okf/types/AgentContext.md +35 -0
  228. package/dist/okf/types/AgentGoal.md +31 -0
  229. package/dist/okf/types/AgentProfile.md +34 -0
  230. package/dist/okf/types/Alarm.md +3 -1
  231. package/dist/okf/types/AlarmModel.md +14 -9
  232. package/dist/okf/types/AmplifyWebhook.md +25 -0
  233. package/dist/okf/types/ApiCache.md +8 -8
  234. package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
  235. package/dist/okf/types/AppAuthorization.md +35 -0
  236. package/dist/okf/types/AppBlockBuilder.md +1 -0
  237. package/dist/okf/types/AppInstance.md +2 -2
  238. package/dist/okf/types/AppInstanceBot.md +2 -2
  239. package/dist/okf/types/AppStreamFleet.md +3 -2
  240. package/dist/okf/types/AppSyncApiKey.md +6 -6
  241. package/dist/okf/types/AppSyncType.md +22 -0
  242. package/dist/okf/types/ApplicationStatusCheck.md +36 -0
  243. package/dist/okf/types/ApplicationVersion.md +4 -1
  244. package/dist/okf/types/ApplicationsList.md +26 -0
  245. package/dist/okf/types/ApprovalPolicy.md +28 -0
  246. package/dist/okf/types/ArchiveRule.md +24 -0
  247. package/dist/okf/types/Asset.md +30 -0
  248. package/dist/okf/types/Backup.md +31 -0
  249. package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
  250. package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
  251. package/dist/okf/types/BedrockSession.md +28 -0
  252. package/dist/okf/types/BillEstimate.md +35 -0
  253. package/dist/okf/types/Brand.md +32 -0
  254. package/dist/okf/types/CallAnalyticsCategory.md +25 -0
  255. package/dist/okf/types/Campaign.md +28 -0
  256. package/dist/okf/types/CapacityProvider.md +30 -0
  257. package/dist/okf/types/Case.md +24 -0
  258. package/dist/okf/types/CertificateAssociation.md +13 -0
  259. package/dist/okf/types/ChangeSet.md +36 -0
  260. package/dist/okf/types/ChannelFlow.md +29 -0
  261. package/dist/okf/types/ChimeChannel.md +39 -0
  262. package/dist/okf/types/Classifier.md +6 -6
  263. package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
  264. package/dist/okf/types/ClientVpnEndpoint.md +2 -0
  265. package/dist/okf/types/ClientVpnRoute.md +5 -5
  266. package/dist/okf/types/CloudConnector.md +29 -0
  267. package/dist/okf/types/Cluster.md +39 -0
  268. package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
  269. package/dist/okf/types/CodeCommitRepository.md +12 -12
  270. package/dist/okf/types/CodeConnectionsHost.md +26 -0
  271. package/dist/okf/types/CodeRepository.md +5 -5
  272. package/dist/okf/types/CompositeAlarm.md +1 -0
  273. package/dist/okf/types/ComputeEnvironment.md +2 -0
  274. package/dist/okf/types/ComputeNodeGroup.md +1 -1
  275. package/dist/okf/types/ComputeQuota.md +34 -0
  276. package/dist/okf/types/ConfigRule.md +1 -1
  277. package/dist/okf/types/ConfigurationRecorder.md +7 -6
  278. package/dist/okf/types/ConnectAttachment.md +2 -0
  279. package/dist/okf/types/ConnectQueue.md +5 -1
  280. package/dist/okf/types/ConnectVocabulary.md +28 -0
  281. package/dist/okf/types/ConnectionType.md +24 -0
  282. package/dist/okf/types/ConsentPortal.md +33 -0
  283. package/dist/okf/types/ContactMethod.md +29 -0
  284. package/dist/okf/types/ContainerAssociation.md +26 -0
  285. package/dist/okf/types/ContainerFleet.md +1 -1
  286. package/dist/okf/types/ContainerGroupDefinition.md +1 -1
  287. package/dist/okf/types/Content.md +40 -0
  288. package/dist/okf/types/ContentAssociation.md +28 -0
  289. package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
  290. package/dist/okf/types/CustomEntityType.md +4 -9
  291. package/dist/okf/types/Customization.md +22 -0
  292. package/dist/okf/types/CwIntegration.md +31 -0
  293. package/dist/okf/types/DAXParameterGroup.md +3 -8
  294. package/dist/okf/types/DAXSubnetGroup.md +0 -5
  295. package/dist/okf/types/DBClusterEndpoint.md +31 -0
  296. package/dist/okf/types/DBProxyTargetGroup.md +1 -0
  297. package/dist/okf/types/DBSnapshot.md +62 -0
  298. package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
  299. package/dist/okf/types/DLPSetting.md +31 -0
  300. package/dist/okf/types/DMSInstanceProfile.md +1 -1
  301. package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
  302. package/dist/okf/types/Daemon.md +1 -0
  303. package/dist/okf/types/DataExchangeDataSet.md +29 -0
  304. package/dist/okf/types/DataIntegrationFlow.md +27 -0
  305. package/dist/okf/types/DataMigration.md +1 -1
  306. package/dist/okf/types/DataProvider.md +2 -1
  307. package/dist/okf/types/DataQualityRuleset.md +6 -11
  308. package/dist/okf/types/DataSource.md +23 -0
  309. package/dist/okf/types/Dataset.md +20 -0
  310. package/dist/okf/types/DatasetIntegration.md +23 -0
  311. package/dist/okf/types/DbCluster.md +1 -1
  312. package/dist/okf/types/DbInstance.md +8 -2
  313. package/dist/okf/types/DeadlineBudget.md +29 -0
  314. package/dist/okf/types/DelegationSet.md +23 -0
  315. package/dist/okf/types/DeliveryChannel.md +6 -11
  316. package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
  317. package/dist/okf/types/DevOpsAgentService.md +1 -0
  318. package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
  319. package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
  320. package/dist/okf/types/Directory.md +60 -0
  321. package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
  322. package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
  323. package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
  324. package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
  325. package/dist/okf/types/Domain.md +27 -0
  326. package/dist/okf/types/EKSCertificateAuthority.md +42 -0
  327. package/dist/okf/types/EKSCluster.md +8 -0
  328. package/dist/okf/types/EcSnapshot.md +66 -0
  329. package/dist/okf/types/EmailIdentityCertificate.md +15 -0
  330. package/dist/okf/types/EndpointConfig.md +14 -13
  331. package/dist/okf/types/EntityRecognizer.md +27 -0
  332. package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
  333. package/dist/okf/types/EnvironmentEC2.md +13 -13
  334. package/dist/okf/types/EvaluationForm.md +1 -0
  335. package/dist/okf/types/Evaluator.md +6 -2
  336. package/dist/okf/types/EventAction.md +26 -0
  337. package/dist/okf/types/EventRule.md +2 -0
  338. package/dist/okf/types/EventSource.md +30 -0
  339. package/dist/okf/types/EventTracker.md +22 -0
  340. package/dist/okf/types/EventsV2EventBus.md +28 -0
  341. package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
  342. package/dist/okf/types/EventsV2Subscriber.md +39 -0
  343. package/dist/okf/types/ExperimentDefinition.md +39 -0
  344. package/dist/okf/types/ExperimentRun.md +33 -0
  345. package/dist/okf/types/ExperimentTrialComponent.md +13 -11
  346. package/dist/okf/types/FHIRDatastore.md +3 -0
  347. package/dist/okf/types/FSxSnapshot.md +5 -5
  348. package/dist/okf/types/FSxVolume.md +9 -9
  349. package/dist/okf/types/FeaturedResultsSet.md +26 -0
  350. package/dist/okf/types/Feed.md +1 -0
  351. package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
  352. package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
  353. package/dist/okf/types/FileCache.md +45 -0
  354. package/dist/okf/types/Filter.md +27 -0
  355. package/dist/okf/types/Firewall.md +6 -0
  356. package/dist/okf/types/FlowMediaStream.md +28 -0
  357. package/dist/okf/types/FlowOutput.md +1 -0
  358. package/dist/okf/types/FpgaImage.md +38 -0
  359. package/dist/okf/types/Function.md +2 -2
  360. package/dist/okf/types/Gateway.md +41 -0
  361. package/dist/okf/types/GatewayClusterAssociations.md +23 -0
  362. package/dist/okf/types/GatewayRateLimit.md +26 -0
  363. package/dist/okf/types/GatewayRule.md +32 -0
  364. package/dist/okf/types/GlobalReplicationGroup.md +3 -0
  365. package/dist/okf/types/GlobalResolver.md +1 -1
  366. package/dist/okf/types/GlobalTable.md +1 -0
  367. package/dist/okf/types/GlueConnection.md +5 -4
  368. package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
  369. package/dist/okf/types/GlueSession.md +38 -0
  370. package/dist/okf/types/GlueTable.md +5 -10
  371. package/dist/okf/types/GlueWorkflow.md +5 -10
  372. package/dist/okf/types/Group.md +27 -0
  373. package/dist/okf/types/Harness.md +1 -0
  374. package/dist/okf/types/HostKey.md +33 -0
  375. package/dist/okf/types/HostedZone.md +1 -0
  376. package/dist/okf/types/HttpApi.md +2 -0
  377. package/dist/okf/types/HttpNamespace.md +5 -5
  378. package/dist/okf/types/HubV2.md +1 -0
  379. package/dist/okf/types/HumanTaskUi.md +22 -0
  380. package/dist/okf/types/IPv4Pool.md +28 -0
  381. package/dist/okf/types/ImageBuilder.md +1 -0
  382. package/dist/okf/types/ImageBuilderImage.md +1 -1
  383. package/dist/okf/types/ImagePipeline.md +1 -1
  384. package/dist/okf/types/InferenceComponent.md +5 -1
  385. package/dist/okf/types/InfluxDBBackup.md +65 -0
  386. package/dist/okf/types/InfluxDBCluster.md +3 -0
  387. package/dist/okf/types/InfrastructureConfiguration.md +2 -0
  388. package/dist/okf/types/IngestionDestination.md +28 -0
  389. package/dist/okf/types/InputSecurityGroup.md +6 -4
  390. package/dist/okf/types/InspectorV2Connector.md +38 -0
  391. package/dist/okf/types/InstanceEventWindow.md +25 -0
  392. package/dist/okf/types/InstanceFleetConfig.md +10 -10
  393. package/dist/okf/types/InstanceGroupConfig.md +3 -3
  394. package/dist/okf/types/InstrumentationConfig.md +31 -0
  395. package/dist/okf/types/IntegrationAssociation.md +3 -0
  396. package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
  397. package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
  398. package/dist/okf/types/IoTSiteWiseTask.md +24 -0
  399. package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
  400. package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
  401. package/dist/okf/types/Job.md +35 -0
  402. package/dist/okf/types/JobTemplate.md +26 -0
  403. package/dist/okf/types/KinesisChannel.md +31 -0
  404. package/dist/okf/types/KinesisStream.md +1 -0
  405. package/dist/okf/types/LambdaResourcePolicy.md +14 -0
  406. package/dist/okf/types/Lexicon.md +34 -0
  407. package/dist/okf/types/LicenseAssetGroup.md +23 -0
  408. package/dist/okf/types/LicenseConfiguration.md +33 -0
  409. package/dist/okf/types/LicenseServerEndpoint.md +32 -0
  410. package/dist/okf/types/LightsailKeyPair.md +29 -0
  411. package/dist/okf/types/LimitsProfile.md +27 -0
  412. package/dist/okf/types/LocationAzureBlob.md +2 -1
  413. package/dist/okf/types/LocationObjectStorage.md +1 -0
  414. package/dist/okf/types/LogAlarm.md +2 -0
  415. package/dist/okf/types/MGNConnector.md +23 -0
  416. package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
  417. package/dist/okf/types/MLTransform.md +15 -15
  418. package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
  419. package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
  420. package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
  421. package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
  422. package/dist/okf/types/MediaConvertQueue.md +8 -10
  423. package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
  424. package/dist/okf/types/MediaLiveInput.md +41 -18
  425. package/dist/okf/types/MediaPackageV2Channel.md +3 -0
  426. package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
  427. package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
  428. package/dist/okf/types/MediaTailorFunction.md +27 -0
  429. package/dist/okf/types/MedicalVocabulary.md +21 -0
  430. package/dist/okf/types/Member.md +26 -0
  431. package/dist/okf/types/Memory.md +6 -0
  432. package/dist/okf/types/MemoryDBSnapshot.md +29 -0
  433. package/dist/okf/types/Metric.md +59 -0
  434. package/dist/okf/types/MetricAttribution.md +23 -0
  435. package/dist/okf/types/MicrosoftAD.md +11 -11
  436. package/dist/okf/types/MigrationProject.md +8 -1
  437. package/dist/okf/types/Monitor.md +26 -0
  438. package/dist/okf/types/NFSFileShare.md +44 -0
  439. package/dist/okf/types/NeptuneGraphGraph.md +1 -0
  440. package/dist/okf/types/NetworkConnector.md +4 -0
  441. package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
  442. package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
  443. package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
  444. package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
  445. package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
  446. package/dist/okf/types/NotebookInstance.md +18 -18
  447. package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
  448. package/dist/okf/types/NotifyConfiguration.md +35 -0
  449. package/dist/okf/types/OTelEnrichment.md +2 -0
  450. package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
  451. package/dist/okf/types/OrganizationConfigRule.md +7 -7
  452. package/dist/okf/types/Outpost.md +32 -0
  453. package/dist/okf/types/ParallelData.md +40 -0
  454. package/dist/okf/types/Partition.md +5 -5
  455. package/dist/okf/types/PaymentConnector.md +4 -1
  456. package/dist/okf/types/Pentest.md +1 -0
  457. package/dist/okf/types/PerfReports.md +28 -0
  458. package/dist/okf/types/PermissionAssociation.md +30 -0
  459. package/dist/okf/types/PersonalizeDataset.md +1 -0
  460. package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
  461. package/dist/okf/types/PersonalizeSchema.md +1 -0
  462. package/dist/okf/types/Pipeline.md +25 -0
  463. package/dist/okf/types/PlaybackConfiguration.md +1 -0
  464. package/dist/okf/types/PolicyAssociation.md +1 -1
  465. package/dist/okf/types/PolicyGrant.md +2 -2
  466. package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
  467. package/dist/okf/types/PortalProduct.md +24 -0
  468. package/dist/okf/types/PrefetchSchedule.md +25 -0
  469. package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
  470. package/dist/okf/types/PrincipalAssociation.md +27 -0
  471. package/dist/okf/types/PrivateDnsNamespace.md +8 -8
  472. package/dist/okf/types/PrivateVirtualInterface.md +1 -0
  473. package/dist/okf/types/ProcurementPortalPreference.md +45 -0
  474. package/dist/okf/types/Program.md +33 -0
  475. package/dist/okf/types/ProjectMembership.md +1 -1
  476. package/dist/okf/types/ProtocolsList.md +26 -0
  477. package/dist/okf/types/PublicDnsNamespace.md +7 -7
  478. package/dist/okf/types/PublicVirtualInterface.md +1 -0
  479. package/dist/okf/types/QEV2IdcApplication.md +25 -0
  480. package/dist/okf/types/QueryLoggingConfig.md +21 -0
  481. package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
  482. package/dist/okf/types/QuickSightAssignment.md +24 -0
  483. package/dist/okf/types/RAMResourceAssociation.md +27 -0
  484. package/dist/okf/types/RDSClusterSnapshot.md +54 -0
  485. package/dist/okf/types/RDSDBParameterGroup.md +5 -0
  486. package/dist/okf/types/RDSDeployment.md +41 -0
  487. package/dist/okf/types/RcsAgent.md +38 -0
  488. package/dist/okf/types/ReceiptRule.md +5 -5
  489. package/dist/okf/types/ReceiptRuleSet.md +1 -6
  490. package/dist/okf/types/RecommenderFilter.md +27 -0
  491. package/dist/okf/types/RecommenderSchema.md +25 -0
  492. package/dist/okf/types/RecordSet.md +16 -22
  493. package/dist/okf/types/RecoveryPlan.md +28 -0
  494. package/dist/okf/types/RedshiftIdcApplication.md +31 -0
  495. package/dist/okf/types/RedshiftSnapshot.md +59 -0
  496. package/dist/okf/types/RegistrationAttachment.md +28 -0
  497. package/dist/okf/types/Registry.md +41 -0
  498. package/dist/okf/types/RegistryRecord.md +38 -0
  499. package/dist/okf/types/RelatedItem.md +24 -0
  500. package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
  501. package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
  502. package/dist/okf/types/ReplicationTask.md +14 -14
  503. package/dist/okf/types/ReportGenerator.md +29 -0
  504. package/dist/okf/types/ReportGroup.md +1 -3
  505. package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
  506. package/dist/okf/types/ResilienceHubV2Service.md +1 -0
  507. package/dist/okf/types/ResourceConfiguration.md +1 -1
  508. package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
  509. package/dist/okf/types/RestApi.md +1 -0
  510. package/dist/okf/types/RetrievalInstruction.md +32 -0
  511. package/dist/okf/types/RouterOutput.md +1 -0
  512. package/dist/okf/types/Rule.md +31 -0
  513. package/dist/okf/types/RunCache.md +29 -0
  514. package/dist/okf/types/Runtime.md +2 -1
  515. package/dist/okf/types/SCNInstance.md +33 -0
  516. package/dist/okf/types/SDBDomain.md +2 -2
  517. package/dist/okf/types/SMBFileShare.md +49 -0
  518. package/dist/okf/types/SageMakerArtifact.md +27 -0
  519. package/dist/okf/types/SageMakerEndpoint.md +0 -1
  520. package/dist/okf/types/ScalableTarget.md +1 -0
  521. package/dist/okf/types/ScalingPlan.md +6 -6
  522. package/dist/okf/types/ScheduledReport.md +31 -0
  523. package/dist/okf/types/SecondaryNetwork.md +26 -0
  524. package/dist/okf/types/SecurityAgentArtifact.md +25 -0
  525. package/dist/okf/types/SecurityAgentIntegration.md +31 -0
  526. package/dist/okf/types/Server.md +1 -0
  527. package/dist/okf/types/ServerlessCache.md +2 -0
  528. package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
  529. package/dist/okf/types/ServerlessRepoApplication.md +32 -0
  530. package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
  531. package/dist/okf/types/SipMediaApplication.md +27 -0
  532. package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
  533. package/dist/okf/types/SnapshotCopyGrant.md +20 -0
  534. package/dist/okf/types/Solution.md +1 -0
  535. package/dist/okf/types/SourceAssociation.md +25 -0
  536. package/dist/okf/types/SourceCredential.md +6 -6
  537. package/dist/okf/types/SourceNetwork.md +23 -0
  538. package/dist/okf/types/StackFleetAssociation.md +2 -7
  539. package/dist/okf/types/StorageTierPolicy.md +20 -0
  540. package/dist/okf/types/StorageVirtualMachine.md +9 -9
  541. package/dist/okf/types/Stream.md +28 -0
  542. package/dist/okf/types/SubnetCidrReservation.md +26 -0
  543. package/dist/okf/types/SubscriptionProvider.md +26 -0
  544. package/dist/okf/types/SupportPermit.md +29 -0
  545. package/dist/okf/types/Table.md +2 -1
  546. package/dist/okf/types/TableOptimizer.md +5 -10
  547. package/dist/okf/types/Tape.md +31 -0
  548. package/dist/okf/types/Template.md +36 -0
  549. package/dist/okf/types/Tenant.md +2 -0
  550. package/dist/okf/types/Terminology.md +39 -0
  551. package/dist/okf/types/Thesaurus.md +25 -0
  552. package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
  553. package/dist/okf/types/Topic.md +1 -0
  554. package/dist/okf/types/TopicRuleDestination.md +1 -0
  555. package/dist/okf/types/TrafficPolicy.md +26 -0
  556. package/dist/okf/types/TrafficPolicyInstance.md +28 -0
  557. package/dist/okf/types/TranscribeVocabulary.md +27 -0
  558. package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
  559. package/dist/okf/types/TransitVirtualInterface.md +1 -0
  560. package/dist/okf/types/Tunnel.md +25 -0
  561. package/dist/okf/types/UsageLimit.md +26 -0
  562. package/dist/okf/types/UseCase.md +23 -0
  563. package/dist/okf/types/User.md +47 -0
  564. package/dist/okf/types/VPCEndpoint.md +1 -1
  565. package/dist/okf/types/VPCEndpointService.md +6 -0
  566. package/dist/okf/types/VPCPeeringConnection.md +2 -2
  567. package/dist/okf/types/VPNConcentrator.md +1 -1
  568. package/dist/okf/types/VPNConnection.md +1 -1
  569. package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
  570. package/dist/okf/types/View.md +27 -0
  571. package/dist/okf/types/VoiceConnector.md +30 -0
  572. package/dist/okf/types/Volume.md +44 -0
  573. package/dist/okf/types/Vpc.md +1 -1
  574. package/dist/okf/types/VpcAttachment.md +2 -0
  575. package/dist/okf/types/WebFunction.md +27 -0
  576. package/dist/okf/types/WebFunctionEndpoint.md +44 -0
  577. package/dist/okf/types/WebFunctionRevision.md +32 -0
  578. package/dist/okf/types/WickrNetwork.md +27 -0
  579. package/dist/okf/types/Worker.md +29 -0
  580. package/dist/okf/types/Workforce.md +26 -0
  581. package/dist/okf/types/Workload.md +35 -0
  582. package/dist/okf/types/WorkloadEstimate.md +35 -0
  583. package/dist/okf/types/Workspace.md +28 -0
  584. package/dist/okf/types/Workteam.md +8 -8
  585. package/dist/op/activities/aws-apply.js +214 -0
  586. package/dist/op/activities/floci.js +97 -0
  587. package/dist/op/activities/index.js +32 -0
  588. package/dist/op/builders.js +50 -0
  589. package/dist/ownership.js +52 -0
  590. package/dist/package-cli.js +25 -0
  591. package/dist/parameter.js +19 -0
  592. package/dist/plugin.d.ts.map +1 -1
  593. package/dist/plugin.js +1012 -0
  594. package/dist/properties.js +166 -0
  595. package/dist/pseudo.js +25 -0
  596. package/dist/receipt-store.d.ts.map +1 -1
  597. package/dist/receipt-store.js +233 -0
  598. package/dist/reference-catalog.js +106 -0
  599. package/dist/rules/ext001.ts +3 -3
  600. package/dist/rules/waw016.ts +2 -2
  601. package/dist/serializer.js +529 -0
  602. package/dist/spec/fetch.js +193 -0
  603. package/dist/spec/parse.js +259 -0
  604. package/dist/spec/pin.js +185 -0
  605. package/dist/spec/pinned-types.json +203 -0
  606. package/dist/stack-errors.js +14 -0
  607. package/dist/taggable.d.ts.map +1 -1
  608. package/dist/taggable.js +33 -0
  609. package/dist/teardown.js +199 -0
  610. package/dist/template-sections.js +53 -0
  611. package/dist/template-transform.js +50 -0
  612. package/dist/types/index.d.ts +18847 -1124
  613. package/dist/validate-cli.js +16 -0
  614. package/dist/validate.js +33 -0
  615. package/package.json +9 -9
  616. package/src/agentcore/trace-fetch.ts +2 -1
  617. package/src/api/credential-chain.ts +119 -9
  618. package/src/api/credential-isolation.test.ts +72 -0
  619. package/src/api/read-client-chain.test.ts +159 -0
  620. package/src/api/read-client.ts +42 -6
  621. package/src/api/sigv4.ts +4 -4
  622. package/src/caller-identity.ts +3 -5
  623. package/src/codegen/any-budget.test.ts +12 -2
  624. package/src/codegen/generate.ts +9 -0
  625. package/src/codegen/package.ts +2 -2
  626. package/src/codegen/patches.test.ts +95 -0
  627. package/src/codegen/patches.ts +53 -9
  628. package/src/codegen/property-overlay.json +1 -16
  629. package/src/components/apply.ts +218 -6
  630. package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
  631. package/src/components/cfn-plan.test.ts +225 -16
  632. package/src/components/cloud-executor.ts +73 -25
  633. package/src/deep-observe.ts +2 -1
  634. package/src/disruption.ts +2 -1
  635. package/src/generated/index.d.ts +18847 -1124
  636. package/src/generated/index.ts +1376 -161
  637. package/src/generated/lexicon-aws.json +17359 -784
  638. package/src/health.test.ts +136 -0
  639. package/src/health.ts +281 -0
  640. package/src/identity-observe.ts +2 -1
  641. package/src/lint/post-synth/ext001.ts +3 -3
  642. package/src/lint/post-synth/waw016.ts +2 -2
  643. package/src/lsp/completions.ts +2 -1
  644. package/src/lsp/hover.ts +2 -1
  645. package/src/plugin.ts +10 -1
  646. package/src/receipt-store.ts +2 -1
  647. package/src/spec/pin.ts +3 -3
  648. package/src/spec/pinned-types.json +203 -0
  649. package/src/taggable.ts +2 -2
package/dist/plugin.js ADDED
@@ -0,0 +1,1012 @@
1
+ import { compositeCatalog } from "./composites/catalog.js";
2
+ import { createRequire } from "module";
3
+ import { awsBehaviourKinds } from "./behaviour-kinds.js";
4
+ import { detectTemplate } from "./detect.js";
5
+ const require = createRequire(moduleSourceUrl(import.meta.url));
6
+ import { discoverLintRules } from "@intentius/chant/lint/discover";
7
+ import { postSynthChecks as postSynthCheckList } from "./lint/post-synth/index.js";
8
+ import { awsAuditCatalog } from "./lint/audit-catalog.js";
9
+ import { createSkillsLoader } from "@intentius/chant/lexicon-plugin-helpers";
10
+ import { join, dirname } from "path";
11
+ import { fileURLToPath } from "url";
12
+ import { moduleSourceUrl } from "@intentius/chant/module-source";
13
+ import { awsSerializer } from "./serializer.js";
14
+ import { FLOCI_EMULATOR } from "./op/activities/floci.js";
15
+ import { applyAwsEndpointArgv } from "./components/cloud-executor.js";
16
+ import { stackDoesNotExist } from "./stack-errors.js";
17
+ import { AwsReadError, describeStackDetail, describeStackResources, } from "./api/read-client.js";
18
+ import { awsDeepNormalizationHooks, observeResourcesDeepAws } from "./deep-observe.js";
19
+ import { awsDisruption } from "./disruption.js";
20
+ import { awsReferenceCatalog } from "./reference-catalog.js";
21
+ import { AMBIENT_KINDS } from "./ambient.js";
22
+ import { canDescribe, describeOwnProperties, stampRegion } from "./properties.js";
23
+ import { stampProviderDefaults } from "./defaults.js";
24
+ import { resolveTemplateAttrs } from "./live-attrs.js";
25
+ import { CFParser } from "./import/parser.js";
26
+ import { CFGenerator } from "./import/generator.js";
27
+ import { parseStackTemplate } from "./import/live-export.js";
28
+ import { awsCompletions } from "./lsp/completions.js";
29
+ import { awsHover } from "./lsp/hover.js";
30
+ import { AWS_TAG_OWNERSHIP_KEYS } from "./ownership.js";
31
+ import { readOwnership } from "@intentius/chant/ownership";
32
+ /** Re-exported from ./stack-errors so the long-standing import path (and its
33
+ * tests) keep working now that the deep reader shares the classifier. */
34
+ export { stackDoesNotExist } from "./stack-errors.js";
35
+ /**
36
+ * AWS CloudFormation lexicon plugin.
37
+ *
38
+ * Provides serializer, lint rules, template detection,
39
+ * import parsing, and code generation for AWS CloudFormation.
40
+ */
41
+ /**
42
+ * The stack's own tags did not resolve a marker for this read, so `owned: true`
43
+ * withheld nothing. Returned as a run-level note rather than printed (#1265):
44
+ * core says it once per run, after the answer, however many stacks were read.
45
+ * The text is the contract consumers grep for.
46
+ */
47
+ const OWNERSHIP_UNRESOLVED_NOTE = "ownership filter not applied on describeResources (this stack's own tags carry no chant marker, or DescribeStacks did not answer) — returning all, each with the verdict the read supports; use `chant import --from <env> --owned` for ownership-filtered export";
48
+ export const awsPlugin = {
49
+ behaviourKinds: awsBehaviourKinds,
50
+ name: "aws",
51
+ // The thin read's marker channel is the STACK's own tags (#1998), read off
52
+ // the DescribeStacks call it already makes for the outputs.
53
+ // describe-stack-resources carries no per-resource tags, so the stack is the
54
+ // granularity — the same boundary teardown verifies on (#1222).
55
+ ownershipChannel: {
56
+ keys: AWS_TAG_OWNERSHIP_KEYS,
57
+ reads: ["describeResources", "observeResourcesDeep", "exportResources"],
58
+ },
59
+ serializer: awsSerializer,
60
+ // Local emulator (#920): Floci + the AWS env that redirects the SDK / observe.
61
+ emulator: FLOCI_EMULATOR,
62
+ // Audit rule metadata for this lexicon's WAW* checks (#687).
63
+ auditCatalog: () => awsAuditCatalog,
64
+ // Live edge reconstruction for `chant graph --live` (#778).
65
+ referenceCatalog: awsReferenceCatalog,
66
+ lintRules() {
67
+ const rulesDir = join(dirname(fileURLToPath(import.meta.url)), "lint", "rules");
68
+ return discoverLintRules(rulesDir, import.meta.url);
69
+ },
70
+ /**
71
+ * chant #1044 — every plain-call intrinsic below carries
72
+ * `foldsAsCall: true`, opting its CALL form into `chant build --fold`.
73
+ *
74
+ * Audited one at a time against the criterion in `IntrinsicDef.foldsAsCall`
75
+ * (core's lexicon.ts): the call must be a pure function of its arguments
76
+ * that builds a deterministic data envelope. Each of these constructs its
77
+ * `*Intrinsic` class and stores the arguments verbatim (../intrinsics.ts) —
78
+ * no I/O, no environment, no module state, and no CloudFormation semantics
79
+ * evaluated locally: `Base64("x")` emits `{"Fn::Base64": "x"}` for the
80
+ * deployment to encode, it does not encode anything here. Calling one while
81
+ * folding is therefore indistinguishable from calling it during a real run
82
+ * of the file.
83
+ *
84
+ * `Sub` is the one intrinsic NOT opted in, and cannot be: it is authored as
85
+ * a tagged template (`isTag: true`), which already folds through
86
+ * `foldTaggedTemplate`. `Sub(...)` as a plain call is not its authoring
87
+ * form, and `chant dev check-lexicon` rejects a registration claiming both.
88
+ */
89
+ intrinsics() {
90
+ return [
91
+ { name: "Sub", description: "Fn::Sub template string interpolation", isTag: true },
92
+ { name: "Ref", description: "Reference a parameter or resource", isTag: false, foldsAsCall: true },
93
+ { name: "GetAtt", description: "Fn::GetAtt — get resource attribute", isTag: false, foldsAsCall: true },
94
+ { name: "If", description: "Fn::If — conditional value", isTag: false, foldsAsCall: true },
95
+ { name: "Join", description: "Fn::Join — join values with delimiter", isTag: false, foldsAsCall: true },
96
+ { name: "Select", description: "Fn::Select — select value by index", isTag: false, foldsAsCall: true },
97
+ { name: "Split", description: "Fn::Split — split string by delimiter", isTag: false, foldsAsCall: true },
98
+ { name: "Base64", description: "Fn::Base64 — encode to Base64", isTag: false, foldsAsCall: true },
99
+ { name: "GetAZs", description: "Fn::GetAZs — list Availability Zones", isTag: false, foldsAsCall: true },
100
+ { name: "Equals", description: "Fn::Equals — condition comparing two values", isTag: false, foldsAsCall: true },
101
+ { name: "And", description: "Fn::And — condition conjunction", isTag: false, foldsAsCall: true },
102
+ { name: "Or", description: "Fn::Or — condition disjunction", isTag: false, foldsAsCall: true },
103
+ { name: "Not", description: "Fn::Not — condition negation", isTag: false, foldsAsCall: true },
104
+ { name: "FindInMap", description: "Fn::FindInMap — value from a declared mapping", isTag: false, foldsAsCall: true },
105
+ { name: "ImportValue", description: "Fn::ImportValue — value another stack exports", isTag: false, foldsAsCall: true },
106
+ { name: "Cidr", description: "Fn::Cidr — CIDR blocks from an address block", isTag: false, foldsAsCall: true },
107
+ ];
108
+ },
109
+ pseudoParameters() {
110
+ return [
111
+ "AWS::StackName",
112
+ "AWS::Region",
113
+ "AWS::AccountId",
114
+ "AWS::StackId",
115
+ "AWS::URLSuffix",
116
+ "AWS::NoValue",
117
+ "AWS::NotificationARNs",
118
+ "AWS::Partition",
119
+ ];
120
+ },
121
+ initTemplates(template) {
122
+ if (template === "eks") {
123
+ return { src: {
124
+ "infra/cluster.ts": `/**
125
+ * EKS Cluster + Managed Node Group + OIDC Provider
126
+ */
127
+
128
+ import { Cluster, Nodegroup, OIDCProvider, Role, InstanceProfile, Sub, AWS } from "@intentius/chant-lexicon-aws";
129
+
130
+ // EKS Cluster Role
131
+ export const clusterRole = new Role({
132
+ RoleName: Sub\`\${AWS.StackName}-eks-cluster-role\`,
133
+ AssumeRolePolicyDocument: {
134
+ Version: "2012-10-17",
135
+ Statement: [{
136
+ Effect: "Allow",
137
+ Principal: { Service: "eks.amazonaws.com" },
138
+ Action: "sts:AssumeRole",
139
+ }],
140
+ },
141
+ ManagedPolicyArns: [
142
+ "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy",
143
+ ],
144
+ });
145
+
146
+ // EKS Cluster
147
+ export const cluster = new Cluster({
148
+ Name: Sub\`\${AWS.StackName}-cluster\`,
149
+ RoleArn: clusterRole,
150
+ Version: "1.29",
151
+ });
152
+
153
+ // Node Role
154
+ export const nodeRole = new Role({
155
+ RoleName: Sub\`\${AWS.StackName}-eks-node-role\`,
156
+ AssumeRolePolicyDocument: {
157
+ Version: "2012-10-17",
158
+ Statement: [{
159
+ Effect: "Allow",
160
+ Principal: { Service: "ec2.amazonaws.com" },
161
+ Action: "sts:AssumeRole",
162
+ }],
163
+ },
164
+ ManagedPolicyArns: [
165
+ "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
166
+ "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
167
+ "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
168
+ ],
169
+ });
170
+
171
+ // Managed Node Group
172
+ export const nodeGroup = new Nodegroup({
173
+ ClusterName: cluster,
174
+ NodegroupName: Sub\`\${AWS.StackName}-nodes\`,
175
+ NodeRole: nodeRole,
176
+ ScalingConfig: {
177
+ MinSize: 2,
178
+ MaxSize: 10,
179
+ DesiredSize: 3,
180
+ },
181
+ InstanceTypes: ["t3.medium"],
182
+ });
183
+ `,
184
+ "k8s/namespace.ts": `/**
185
+ * K8s namespace with quotas and network isolation
186
+ */
187
+
188
+ import { NamespaceEnv } from "@intentius/chant-lexicon-k8s";
189
+
190
+ export const { namespace, resourceQuota, limitRange, networkPolicy } = NamespaceEnv({
191
+ name: "prod",
192
+ cpuQuota: "16",
193
+ memoryQuota: "32Gi",
194
+ defaultCpuRequest: "100m",
195
+ defaultMemoryRequest: "128Mi",
196
+ defaultCpuLimit: "500m",
197
+ defaultMemoryLimit: "512Mi",
198
+ defaultDenyIngress: true,
199
+ });
200
+ `,
201
+ "k8s/app.ts": `/**
202
+ * Application deployment with IRSA and autoscaling
203
+ */
204
+
205
+ import { AutoscaledService, IrsaServiceAccount } from "@intentius/chant-lexicon-k8s";
206
+
207
+ // IRSA ServiceAccount — replace with your IAM Role ARN from CloudFormation outputs
208
+ export const { serviceAccount } = IrsaServiceAccount({
209
+ name: "app-sa",
210
+ iamRoleArn: "arn:aws:iam::123456789012:role/app-role", // TODO: update from CF output
211
+ namespace: "prod",
212
+ });
213
+
214
+ export const { deployment, service, hpa, pdb } = AutoscaledService({
215
+ name: "my-app",
216
+ image: "my-app:1.0",
217
+ port: 8080,
218
+ maxReplicas: 10,
219
+ cpuRequest: "200m",
220
+ memoryRequest: "256Mi",
221
+ namespace: "prod",
222
+ });
223
+ `,
224
+ } };
225
+ }
226
+ return { src: {
227
+ "config.ts": `/**
228
+ * Shared bucket configuration — encryption, versioning, public access
229
+ */
230
+
231
+ import { ServerSideEncryptionByDefault, ServerSideEncryptionRule, BucketEncryption, PublicAccessBlockConfiguration, VersioningConfiguration } from "@intentius/chant-lexicon-aws";
232
+
233
+ // Encryption default — AES256 server-side encryption
234
+ export const encryptionDefault = new ServerSideEncryptionByDefault({
235
+ SSEAlgorithm: "AES256",
236
+ });
237
+
238
+ // Encryption rule wrapping the default
239
+ export const encryptionRule = new ServerSideEncryptionRule({
240
+ ServerSideEncryptionByDefault: encryptionDefault,
241
+ });
242
+
243
+ // Bucket encryption configuration
244
+ export const bucketEncryption = new BucketEncryption({
245
+ ServerSideEncryptionConfiguration: [encryptionRule],
246
+ });
247
+
248
+ // Public access block — deny all public access
249
+ export const publicAccessBlock = new PublicAccessBlockConfiguration({
250
+ BlockPublicAcls: true,
251
+ BlockPublicPolicy: true,
252
+ IgnorePublicAcls: true,
253
+ RestrictPublicBuckets: true,
254
+ });
255
+
256
+ // Versioning — enabled
257
+ export const versioningEnabled = new VersioningConfiguration({
258
+ Status: "Enabled",
259
+ });
260
+ `,
261
+ "data-bucket.ts": `/**
262
+ * Data bucket — primary storage with encryption and versioning
263
+ */
264
+
265
+ import { Bucket, Sub, AWS } from "@intentius/chant-lexicon-aws";
266
+ import { versioningEnabled, bucketEncryption, publicAccessBlock } from "./config";
267
+
268
+ export const dataBucket = new Bucket({
269
+ BucketName: Sub\`\${AWS.StackName}-\${AWS.AccountId}-data\`,
270
+ VersioningConfiguration: versioningEnabled,
271
+ BucketEncryption: bucketEncryption,
272
+ PublicAccessBlockConfiguration: publicAccessBlock,
273
+ });
274
+ `,
275
+ "logs-bucket.ts": `/**
276
+ * Logs bucket — log delivery with encryption and versioning
277
+ *
278
+ * Note: AccessControl is a legacy property. Use a bucket policy to grant
279
+ * log delivery access instead (s3:PutObject permission for the logging service principal).
280
+ */
281
+
282
+ import { Bucket, Sub, AWS } from "@intentius/chant-lexicon-aws";
283
+ import { versioningEnabled, bucketEncryption, publicAccessBlock } from "./config";
284
+
285
+ export const logsBucket = new Bucket({
286
+ BucketName: Sub\`\${AWS.StackName}-\${AWS.AccountId}-logs\`,
287
+ VersioningConfiguration: versioningEnabled,
288
+ BucketEncryption: bucketEncryption,
289
+ PublicAccessBlockConfiguration: publicAccessBlock,
290
+ });
291
+ `,
292
+ "bucket-policies.ts": `/**
293
+ * Bucket policies — deny every request that arrives over plaintext (WAW042)
294
+ *
295
+ * CloudFormation models a bucket policy as its own resource, so each bucket
296
+ * gets one here.
297
+ */
298
+
299
+ import { S3BucketPolicy, Ref, Sub } from "@intentius/chant-lexicon-aws";
300
+ import { dataBucket } from "./data-bucket";
301
+ import { logsBucket } from "./logs-bucket";
302
+
303
+ export const dataBucketTlsOnly = {
304
+ Version: "2012-10-17",
305
+ Statement: [{
306
+ Sid: "DenyInsecureTransport",
307
+ Effect: "Deny",
308
+ Principal: "*",
309
+ Action: "s3:*",
310
+ Resource: [dataBucket.Arn, Sub\`\${dataBucket.Arn}/*\`],
311
+ Condition: { Bool: { "aws:SecureTransport": "false" } },
312
+ }],
313
+ };
314
+
315
+ export const dataBucketPolicy = new S3BucketPolicy({
316
+ Bucket: Ref(dataBucket),
317
+ PolicyDocument: dataBucketTlsOnly,
318
+ });
319
+
320
+ export const logsBucketTlsOnly = {
321
+ Version: "2012-10-17",
322
+ Statement: [{
323
+ Sid: "DenyInsecureTransport",
324
+ Effect: "Deny",
325
+ Principal: "*",
326
+ Action: "s3:*",
327
+ Resource: [logsBucket.Arn, Sub\`\${logsBucket.Arn}/*\`],
328
+ Condition: { Bool: { "aws:SecureTransport": "false" } },
329
+ }],
330
+ };
331
+
332
+ export const logsBucketPolicy = new S3BucketPolicy({
333
+ Bucket: Ref(logsBucket),
334
+ PolicyDocument: logsBucketTlsOnly,
335
+ });
336
+ `,
337
+ } };
338
+ },
339
+ detectTemplate,
340
+ templateParser() {
341
+ return new CFParser();
342
+ },
343
+ templateGenerator() {
344
+ return new CFGenerator();
345
+ },
346
+ postSynthChecks() {
347
+ return postSynthCheckList;
348
+ },
349
+ async generate(options) {
350
+ const { generate, writeGeneratedFiles } = await import("./codegen/generate.js");
351
+ const { dirname } = await import("path");
352
+ const { fileURLToPath } = await import("url");
353
+ const result = await generate({ verbose: options?.verbose ?? true });
354
+ const pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
355
+ writeGeneratedFiles(result, pkgDir);
356
+ console.error(`Generated ${result.resources} resources, ${result.properties} property types, ${result.enums} enums`);
357
+ if (result.warnings.length > 0) {
358
+ console.error(`${result.warnings.length} warnings`);
359
+ }
360
+ const { PINNED_VERSIONS } = await import("./codegen/versions.js");
361
+ console.error(`cfn-lint patches: ${PINNED_VERSIONS.cfnLint}`);
362
+ },
363
+ async validate(options) {
364
+ const { validate } = await import("./validate.js");
365
+ const { printValidationResult } = await import("@intentius/chant/codegen/validate");
366
+ const result = await validate();
367
+ printValidationResult(result);
368
+ },
369
+ async coverage(options) {
370
+ const { readFileSync } = await import("fs");
371
+ const { join, dirname } = await import("path");
372
+ const { fileURLToPath } = await import("url");
373
+ const { computeCoverage, checkThresholds, formatSummary, formatVerbose } = await import("./coverage.js");
374
+ const pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
375
+ const lexiconPath = join(pkgDir, "src", "generated", "lexicon-aws.json");
376
+ const content = readFileSync(lexiconPath, "utf-8");
377
+ const report = computeCoverage(content);
378
+ if (options?.verbose) {
379
+ console.log(formatVerbose(report));
380
+ }
381
+ else {
382
+ console.log(formatSummary(report));
383
+ }
384
+ if (typeof options?.minOverall === "number") {
385
+ const result = checkThresholds(report, { minOverallPct: options.minOverall });
386
+ if (!result.ok) {
387
+ for (const v of result.violations)
388
+ console.error(` FAIL: ${v}`);
389
+ throw new Error("Coverage below threshold");
390
+ }
391
+ }
392
+ },
393
+ async package(options) {
394
+ const { packageLexicon } = await import("./codegen/package.js");
395
+ const { writeBundleSpec } = await import("@intentius/chant/codegen/package");
396
+ const { join, dirname } = await import("path");
397
+ const { fileURLToPath } = await import("url");
398
+ const { spec, stats } = await packageLexicon({ verbose: options?.verbose, force: options?.force });
399
+ const pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
400
+ const distDir = join(pkgDir, "dist");
401
+ writeBundleSpec(spec, distDir);
402
+ console.error(`Packaged ${stats.resources} resources, ${stats.ruleCount} rules, ${stats.skillCount} skills`);
403
+ // Produce .tgz via pack command
404
+ const { getRuntime } = await import("@intentius/chant/runtime-adapter");
405
+ const rt = getRuntime();
406
+ const { stdout: packOut, stderr: packErr, exitCode: packExit } = await rt.spawn(rt.commands.packCmd, { cwd: pkgDir });
407
+ if (packExit === 0) {
408
+ console.error(`Tarball: ${packOut.trim()}`);
409
+ }
410
+ else {
411
+ console.error(`${rt.commands.packCmd.join(" ")} failed: ${packErr}`);
412
+ }
413
+ },
414
+ async docs(options) {
415
+ const { generateDocs } = await import("./codegen/docs.js");
416
+ await generateDocs(options);
417
+ },
418
+ skills: createSkillsLoader(import.meta.url, [
419
+ {
420
+ file: "chant-aws.md",
421
+ name: "chant-aws",
422
+ description: "AWS CloudFormation lifecycle — build, diff, deploy, rollback, and troubleshoot from a chant project",
423
+ triggers: [
424
+ { type: "file-pattern", value: "**/*.aws.ts" },
425
+ { type: "file-pattern", value: "**/stack.json" },
426
+ { type: "file-pattern", value: "**/template.yaml" },
427
+ { type: "context", value: "aws" },
428
+ { type: "context", value: "cloudformation" },
429
+ { type: "context", value: "deploy" },
430
+ ],
431
+ preConditions: [
432
+ "AWS CLI is installed and configured (aws sts get-caller-identity succeeds)",
433
+ "chant CLI is installed (chant --version succeeds)",
434
+ "Project has chant source files in src/",
435
+ ],
436
+ postConditions: [
437
+ "Stack is in a stable state (*_COMPLETE)",
438
+ "No failed resources in stack events",
439
+ ],
440
+ parameters: [
441
+ {
442
+ name: "resourceType",
443
+ description: "AWS CloudFormation resource type (e.g. AWS::S3::Bucket)",
444
+ type: "string",
445
+ required: false,
446
+ },
447
+ ],
448
+ examples: [
449
+ {
450
+ title: "S3 Bucket with encryption",
451
+ description: "Create an S3 bucket with server-side encryption enabled",
452
+ input: "Create an encrypted S3 bucket",
453
+ output: `new Bucket("MyBucket", {
454
+ BucketEncryption: {
455
+ ServerSideEncryptionConfiguration: [
456
+ { ServerSideEncryptionByDefault: { SSEAlgorithm: "aws:kms" } }
457
+ ]
458
+ },
459
+ PublicAccessBlockConfiguration: {
460
+ BlockPublicAcls: true,
461
+ BlockPublicPolicy: true,
462
+ IgnorePublicAcls: true,
463
+ RestrictPublicBuckets: true,
464
+ },
465
+ })`,
466
+ },
467
+ {
468
+ title: "Deploy a new stack",
469
+ description: "Build a chant project and deploy it as a new CloudFormation stack",
470
+ input: "Deploy this project as a new stack called my-app-prod",
471
+ output: `chant lint src/
472
+ chant build src/ --output stack.json
473
+ aws cloudformation validate-template --template-body file://stack.json
474
+ aws cloudformation deploy \\
475
+ --template-file stack.json \\
476
+ --stack-name my-app-prod \\
477
+ --capabilities CAPABILITY_NAMED_IAM`,
478
+ },
479
+ {
480
+ title: "Preview changes before updating",
481
+ description: "Create a change set to review what will change before applying an update",
482
+ input: "Show me what will change if I deploy this update to my-app-prod",
483
+ output: `chant build src/ --output stack.json
484
+ aws cloudformation create-change-set \\
485
+ --stack-name my-app-prod \\
486
+ --template-body file://stack.json \\
487
+ --change-set-name review-$(date +%s) \\
488
+ --capabilities CAPABILITY_NAMED_IAM
489
+ # Wait for change set to compute, then review:
490
+ aws cloudformation describe-change-set \\
491
+ --stack-name my-app-prod \\
492
+ --change-set-name review-<id>`,
493
+ },
494
+ {
495
+ title: "Fix a stuck rollback",
496
+ description: "Recover a stack stuck in UPDATE_ROLLBACK_FAILED state",
497
+ input: "My stack my-app-prod is stuck in UPDATE_ROLLBACK_FAILED, help me fix it",
498
+ output: `# Identify the stuck resource
499
+ aws cloudformation describe-stack-events \\
500
+ --stack-name my-app-prod \\
501
+ --query "StackEvents[?ResourceStatus=='UPDATE_FAILED'].[LogicalResourceId,ResourceStatusReason]" \\
502
+ --output table
503
+ # Attempt to continue the rollback
504
+ aws cloudformation continue-update-rollback --stack-name my-app-prod
505
+ aws cloudformation wait stack-update-complete --stack-name my-app-prod`,
506
+ },
507
+ ],
508
+ },
509
+ {
510
+ file: "chant-aws-eks.md",
511
+ name: "chant-aws-eks",
512
+ description: "EKS end-to-end workflow — provision cluster, configure kubectl, deploy K8s workloads",
513
+ triggers: [
514
+ { type: "context", value: "eks" },
515
+ { type: "context", value: "kubernetes" },
516
+ { type: "context", value: "k8s-workloads" },
517
+ ],
518
+ parameters: [],
519
+ examples: [
520
+ {
521
+ title: "Full EKS deployment",
522
+ input: "Set up a complete EKS environment with my API",
523
+ output: "chant build src/infra/ --output infra.json && aws cloudformation deploy --template-file infra.json --stack-name my-eks --capabilities CAPABILITY_NAMED_IAM",
524
+ },
525
+ ],
526
+ },
527
+ {
528
+ file: "chant-aws-carve-terraform.md",
529
+ name: "chant-aws-carve-terraform",
530
+ description: "Demo carving a resource out of Terraform into native chant — advise, emit, audit, bridge, apply — fully offline",
531
+ triggers: [
532
+ { type: "context", value: "terraform" },
533
+ { type: "context", value: "carve" },
534
+ { type: "context", value: "migrate" },
535
+ { type: "file-pattern", value: "**/*.tf" },
536
+ { type: "file-pattern", value: "**/terraform.tfstate" },
537
+ ],
538
+ preConditions: [
539
+ "chant CLI is installed (chant --version succeeds)",
540
+ "@cdktn/hcl2json is installed (npm install -D @cdktn/hcl2json)",
541
+ ],
542
+ parameters: [
543
+ {
544
+ name: "address",
545
+ description: "Terraform address to carve, e.g. aws_s3_bucket.assets",
546
+ type: "string",
547
+ required: false,
548
+ },
549
+ ],
550
+ examples: [
551
+ {
552
+ title: "Run the offline demo",
553
+ description: "Demo the full advise → emit → bridge → apply loop with no cloud",
554
+ input: "Show me how chant carves a resource out of Terraform",
555
+ output: "cd examples/terraform-carve-out && ./demo.sh",
556
+ },
557
+ {
558
+ title: "Adopt a resource from state",
559
+ description: "Emit native chant source for a Terraform-managed resource, offline",
560
+ input: "Adopt aws_s3_bucket.assets into chant",
561
+ output: "chant carve emit --from ./terraform --select aws_s3_bucket.assets --state ./terraform/terraform.tfstate",
562
+ },
563
+ ],
564
+ },
565
+ ]),
566
+ completionProvider(ctx) {
567
+ return awsCompletions(ctx);
568
+ },
569
+ hoverProvider(ctx) {
570
+ return awsHover(ctx);
571
+ },
572
+ async describeResources(options) {
573
+ const { observation, unobservedAll } = await import("@intentius/chant/observation");
574
+ const resources = {};
575
+ // The applier's own transport, pointed at the read APIs (#1206). Multi-region
576
+ // estates target this stack's region, not the ambient one.
577
+ const client = {
578
+ ...(options.region ? { region: options.region } : {}),
579
+ };
580
+ // The note for the read paths that never reach the stack's tags at all: a
581
+ // missing stack, and a failed stack read. Core dedupes it across stacks and
582
+ // prints it once per run with the footer, rather than ahead of every answer
583
+ // (#1265).
584
+ const unresolvedNotes = options.owned ? [OWNERSHIP_UNRESOLVED_NOTE] : undefined;
585
+ // Derive stack name. A multi-stack project passes the explicit CloudFormation
586
+ // stack this observation targets (see `stacks` in ChantConfig); otherwise the
587
+ // single-stack convention is the stack named after the environment (#932).
588
+ const stackName = options.stack ?? `${options.environment}`;
589
+ // Effect receipt rows (#1835): a receipt is never a stack member (the
590
+ // applier never writes it, #1832), so the stack read honestly reports it
591
+ // absent even while the parameter exists — which would arrive downstream
592
+ // as "the effect never ran". The serializer rendered each receipt's
593
+ // derived path into the template Metadata; read those parameters directly,
594
+ // and report a failed read as an `unobserved` hole rather than a wrong
595
+ // answer.
596
+ const { observeReceiptRows } = await import("./receipt-store.js");
597
+ const receiptObs = await observeReceiptRows(options.entityNames, options.buildOutput, client);
598
+ const receiptHoles = Object.keys(receiptObs.unobserved).length > 0 ? receiptObs.unobserved : undefined;
599
+ // Describe stack resources. The endpoint override rides the client, so a
600
+ // local emulator (Floci) is observed instead of real AWS (#926) — behold
601
+ // serve --local relies on this for the overlay.
602
+ let stackResources;
603
+ try {
604
+ stackResources = await describeStackResources(stackName, client);
605
+ }
606
+ catch (err) {
607
+ // A stack that doesn't exist yet is the pre-first-apply state: nothing is
608
+ // deployed for this env, so there are no live resources (every declared
609
+ // resource is "pending") — not an error. That is a real absence, so the
610
+ // empty result is the honest one and `create` is the right proposal —
611
+ // EXCEPT for an entity whose props spell its own physical identity
612
+ // (#1647): a freshly carve-emitted, still-Terraform-owned resource lives
613
+ // in no stack at all, and only an identity read can see it.
614
+ if (err instanceof AwsReadError && stackDoesNotExist(err.message)) {
615
+ const { observeByIdentity } = await import("./identity-observe.js");
616
+ const identity = await observeByIdentity(options.entityNames, options.entities, resources, client);
617
+ return observation({ ...resources, ...identity.resources, ...receiptObs.resources }, receiptHoles, identity.queried, unresolvedNotes);
618
+ }
619
+ // Any other failure (credentials, throttling, a region that can't be
620
+ // reached) establishes nothing about what is deployed. Reporting every
621
+ // declared entity as NOT-OBSERVED (#1089) is what keeps a broken read
622
+ // from arriving downstream as "none of this exists".
623
+ const detail = err instanceof AwsReadError && err.code ? `${err.code}: ${err.message}` : String(err instanceof Error ? err.message : err);
624
+ const reason = /credential|token|expired|AccessDenied|not authorized|Unauthorized/i.test(detail)
625
+ ? "no-credentials"
626
+ : "read-failed";
627
+ // A receipt row the leg above did read stays read: its answer came from
628
+ // GetParameter, not from the failed stack call, so it is not a hole.
629
+ const stackHoles = unobservedAll(options.entityNames.filter((n) => !(n in receiptObs.resources)), reason, `DescribeStackResources failed for stack "${stackName}": ${detail}`);
630
+ return observation({ ...receiptObs.resources }, { ...stackHoles, ...receiptObs.unobserved }, undefined, unresolvedNotes);
631
+ }
632
+ // Map logical names from build to stack resources
633
+ const stackResourceMap = new Map(stackResources.map((r) => [r.logicalId, r]));
634
+ // Get the stack's outputs and its own tags — one DescribeStacks call. A
635
+ // stack whose resources read fine but whose DescribeStacks does not is
636
+ // still a usable observation, so this failure is swallowed exactly as the
637
+ // non-zero exit code used to be. `undefined` tags mean the call did not
638
+ // answer, which is an unread channel rather than an absent marker.
639
+ let stackOutputs = {};
640
+ let stackTags;
641
+ try {
642
+ const detail = await describeStackDetail(stackName, client);
643
+ stackOutputs = detail.outputs;
644
+ stackTags = detail.tags;
645
+ }
646
+ catch {
647
+ stackOutputs = {};
648
+ stackTags = undefined;
649
+ }
650
+ // The marker channel on this path (#1998). describe-stack-resources carries
651
+ // no per-resource tags, but the stack's own tags carry the identity the
652
+ // apply paths stamped from the template's `Metadata["chant:ownership"]`
653
+ // block — the same channel teardown verifies on (#1222). Every member of a
654
+ // marked stack belongs to that stack's identity, so the verdict and the
655
+ // marker are the stack's, read back verbatim.
656
+ const stackMarker = stackTags ? readOwnership(stackTags, AWS_TAG_OWNERSHIP_KEYS) : undefined;
657
+ const stackOwnership = stackTags === undefined ? "unknown" : stackMarker ? "owned" : "foreign";
658
+ // `owned: true` withheld nothing, so say why whenever the marker did not resolve.
659
+ const notes = options.owned && stackMarker === undefined ? unresolvedNotes : undefined;
660
+ // The outputs are the stack's, not any member's (#1279). They used to be
661
+ // copied onto every resource's `attributes`, so a VPC carried the stack's
662
+ // `expWebIp` and no `CidrBlock`. They ride the envelope once, keyed by the
663
+ // stack, scrubbed of anything that looks secret.
664
+ const exports = {};
665
+ for (const [key, value] of Object.entries(stackOutputs)) {
666
+ exports[key] = /password|secret|token|key/i.test(key) ? "[REDACTED]" : value;
667
+ }
668
+ const stackExports = Object.keys(exports).length > 0 ? { [stackName]: exports } : undefined;
669
+ for (const entityName of options.entityNames) {
670
+ const stackResource = stackResourceMap.get(entityName);
671
+ if (!stackResource)
672
+ continue;
673
+ resources[entityName] = {
674
+ type: stackResource.type,
675
+ physicalId: stackResource.physicalId ?? "",
676
+ status: stackResource.status ?? "",
677
+ lastUpdated: stackResource.timestamp ?? "",
678
+ // Total verdict (#1089), from the stack's own tags. `unknown` is kept
679
+ // for the one case that earns it — DescribeStacks did not answer, so
680
+ // the channel was never read — and the change set never escalates
681
+ // `unknown` to a delete. `marker` is set only where the stack really
682
+ // carries one: absent means absent, never a guess.
683
+ ownership: stackOwnership,
684
+ ...(stackMarker ? { marker: stackMarker } : {}),
685
+ };
686
+ }
687
+ // The identity fallback (#1647): entities the stack did not answer for but
688
+ // whose declared props spell a full primary identifier get a Cloud Control
689
+ // read before "absent" stands. Computed against the stack's answer and
690
+ // merged at the return sites, so the own-property enrichment below neither
691
+ // re-describes nor un-observes what identity found.
692
+ const { observeByIdentity } = await import("./identity-observe.js");
693
+ const identity = await observeByIdentity(options.entityNames, options.entities, resources, client);
694
+ // Each resource's OWN properties (#1279). Until this, a node's `attrs` were
695
+ // the stack's exports replicated onto every member, so no instance carried
696
+ // its own `VpcId`.
697
+ const own = await describeOwnProperties(resources, options.region);
698
+ const withProperties = stampProviderDefaults(stampRegion(own.resources, options.region));
699
+ // The own-property read is still a CLI shell-out while the stack reads are
700
+ // not (#1206), so the two halves can now fail independently. When the
701
+ // enrichment could not run at all, the resources it would have described are
702
+ // identified but not described — and `lifecycle diff` compares these
703
+ // attributes, so presenting them anyway reports every previously-recorded
704
+ // property as removed. That is a failed read arriving as drift, which is the
705
+ // shape #1089 exists to prevent, so say it is a hole instead.
706
+ const undescribed = own.transportFailed
707
+ ? Object.keys(withProperties).filter((name) => canDescribe(withProperties[name].type))
708
+ : [];
709
+ if (undescribed.length > 0) {
710
+ const described = {};
711
+ for (const [name, meta] of Object.entries(withProperties)) {
712
+ if (!undescribed.includes(name))
713
+ described[name] = meta;
714
+ }
715
+ // Attribute each hole to the call that failed for *its* kind, rather than
716
+ // to whichever call happened to fail first.
717
+ const holes = {};
718
+ for (const name of undescribed) {
719
+ const type = withProperties[name].type;
720
+ holes[name] = {
721
+ type,
722
+ reason: "read-failed",
723
+ detail: `the stack was read, but this resource's own properties were not — ${own.failures.get(type) ?? "the describe call failed"}`,
724
+ };
725
+ }
726
+ return observation({ ...described, ...identity.resources, ...receiptObs.resources }, { ...holes, ...receiptObs.unobserved }, identity.queried, notes, stackExports);
727
+ }
728
+ // Every entity the stack answered for was answered for: an entity the
729
+ // template doesn't carry is genuinely not in this stack, which is an
730
+ // absence, not a hole — unless the identity fallback saw it live (#1647).
731
+ return observation({ ...withProperties, ...identity.resources, ...receiptObs.resources }, receiptHoles, identity.queried, notes, stackExports);
732
+ },
733
+ /**
734
+ * Property-level live read (#1015) via the Cloud Control API — past
735
+ * CloudFormation's view of the world, into the resource as the service
736
+ * actually holds it. Implementation in ./deep-observe.ts.
737
+ */
738
+ /**
739
+ * The routing this estate depends on but does not declare (#1273) — an
740
+ * instance in the account's default VPC routes through a table nobody wrote.
741
+ * Reporting the resources lets the graph fold derive `internetFacing`, rather
742
+ * than this lexicon computing it and injecting the conclusion.
743
+ */
744
+ async observeDependencies(options) {
745
+ const { observeAwsDependencies } = await import("./dependencies.js");
746
+ return observeAwsDependencies({ observed: options.observed, region: options.region });
747
+ },
748
+ /**
749
+ * What a pending update costs (#1665), read off the Registry schema the
750
+ * codegen already compiled: a changed `createOnlyProperties` entry is a
751
+ * replacement, and `replacementStrategy: delete_then_create` makes it a
752
+ * destroy. A conditionally-create-only property is `unknown` on purpose —
753
+ * the schema says "depends on the value", which is not an answer.
754
+ */
755
+ classifyDisruption(options) {
756
+ return awsDisruption(options);
757
+ },
758
+ /**
759
+ * Who chant would act as here, before it acts (#1982) —
760
+ * `sts:GetCallerIdentity` on the same transport, endpoint override and
761
+ * region resolution `describeResources` uses, so the principal reported and
762
+ * the account read are the same one. Implementation in ./caller-identity.ts.
763
+ */
764
+ async describeIdentity(options) {
765
+ const { describeIdentity } = await import("./caller-identity.js");
766
+ return describeIdentity(options);
767
+ },
768
+ /**
769
+ * Resources of a managed kind that exist without being declared or
770
+ * referenced (#1278) — the account's default security groups, an unattached
771
+ * one someone left behind. Nothing else in the observation can see them,
772
+ * because everything else resolves outward from what is declared.
773
+ */
774
+ /** #1278 — the kinds `observeAmbient` can enumerate, from the same source. */
775
+ ambientKinds() {
776
+ return AMBIENT_KINDS;
777
+ },
778
+ async observeAmbient(options) {
779
+ const { observeAwsAmbient } = await import("./ambient.js");
780
+ return observeAwsAmbient({ kinds: options.kinds, observed: options.observed, region: options.region });
781
+ },
782
+ async observeResourcesDeep(options) {
783
+ return observeResourcesDeepAws({
784
+ environment: options.environment,
785
+ entityNames: options.entityNames,
786
+ entities: options.entities,
787
+ stack: options.stack,
788
+ region: options.region,
789
+ owned: options.owned,
790
+ });
791
+ },
792
+ /** The noise rules the deep pass applies to both the live and declared trees. */
793
+ deepNormalizationHooks: awsDeepNormalizationHooks,
794
+ /** Runtime health (#4177): Route 53 health checks and ECS services. Implementation in ./health.ts. */
795
+ healthTypes: ["AWS::Route53::HealthCheck", "AWS::ECS::Service"],
796
+ async observeHealth(options) {
797
+ const { observeHealthAws } = await import("./health.js");
798
+ return observeHealthAws(options);
799
+ },
800
+ async describeStackStatus(options) {
801
+ const { getRuntime } = await import("@intentius/chant/runtime-adapter");
802
+ const rt = getRuntime();
803
+ const result = await rt.spawn(applyAwsEndpointArgv([
804
+ "aws", "cloudformation", "describe-stacks",
805
+ "--stack-name", options.stack,
806
+ "--output", "json",
807
+ ], process.env.AWS_ENDPOINT_URL));
808
+ if (result.exitCode !== 0) {
809
+ // A stack that doesn't exist yet is the pre-first-apply state (absent, not
810
+ // an error). Any other failure is indeterminate → null, so the caller
811
+ // degrades rather than reporting a healthy stack as gone.
812
+ if (stackDoesNotExist(result.stderr))
813
+ return { stack: options.stack, present: false };
814
+ return null;
815
+ }
816
+ const parsed = JSON.parse(result.stdout);
817
+ const status = parsed.Stacks?.[0]?.StackStatus;
818
+ if (!status)
819
+ return { stack: options.stack, present: false };
820
+ // Healthy = a terminal *success* apply. Rollback/failed/in-progress/delete
821
+ // states are present-but-not-healthy, so a renderer can distinguish
822
+ // deployed-green from mid-deploy or broken.
823
+ const healthy = /^(CREATE|UPDATE|IMPORT)_COMPLETE$/.test(status);
824
+ return { stack: options.stack, present: true, status, healthy };
825
+ },
826
+ // Env teardown at STACK granularity (#1222): `describeResources` carries no
827
+ // tags, so per-resource marker selection is impossible here — the env's
828
+ // stacks are enumerated instead (`stacks[]`, else the env-named default) and
829
+ // ownership is verified on each stack's own DescribeStacks tags. Execution
830
+ // is DeleteStack via the applier's `awsDelete`. See ./teardown.ts.
831
+ async teardownOwned(options) {
832
+ const { teardownOwned } = await import("./teardown.js");
833
+ return teardownOwned(options);
834
+ },
835
+ async executeTeardown(options) {
836
+ const { executeTeardown } = await import("./teardown.js");
837
+ return executeTeardown(options);
838
+ },
839
+ async exportResources(options) {
840
+ const { getRuntime } = await import("@intentius/chant/runtime-adapter");
841
+ const rt = getRuntime();
842
+ // Same stack-name convention as describeResources: an explicit multi-stack
843
+ // stack name (#932), else the stack named after the environment.
844
+ const stackName = options.stack ?? `${options.environment}`;
845
+ const regionArgs = options.region ? ["--region", options.region] : [];
846
+ const result = await rt.spawn(applyAwsEndpointArgv([
847
+ "aws", "cloudformation", "get-template",
848
+ "--stack-name", stackName,
849
+ ...regionArgs,
850
+ "--template-stage", "Original",
851
+ "--output", "json",
852
+ ], process.env.AWS_ENDPOINT_URL));
853
+ if (result.exitCode !== 0) {
854
+ // Not deployed yet → no template to export (nothing live), not an error.
855
+ // Keeps `chant graph --live` edge enrichment and `import --from` quiet
856
+ // before the first apply.
857
+ if (stackDoesNotExist(result.stderr)) {
858
+ return parseStackTemplate({ Resources: {} }, options.selector, options.owned);
859
+ }
860
+ throw new Error(`Failed to get template for stack "${stackName}": ${result.stderr}`);
861
+ }
862
+ const parsed = JSON.parse(result.stdout);
863
+ if (parsed.TemplateBody === undefined) {
864
+ throw new Error(`Stack "${stackName}" returned no TemplateBody`);
865
+ }
866
+ return parseStackTemplate(parsed.TemplateBody, options.selector, options.owned);
867
+ },
868
+ // Live attribute enrichment for `chant graph --live` edge reconstruction (#784).
869
+ // describe-stack-resources is too thin; the deployed template (exportResources)
870
+ // carries the references. Resolve its `{Ref}`/`{Fn::GetAtt}` intrinsics to bare
871
+ // logical ids so the reference resolver matches them.
872
+ async enrichLiveAttrs(options) {
873
+ // Multi-stack (#1161): a project declaring ChantConfig.stacks passes them
874
+ // here; enrich per-stack and merge. Otherwise the single-stack convention.
875
+ const stackRefs = options.stacks && options.stacks.length > 0
876
+ ? options.stacks.map((st) => (typeof st === "string" ? { name: st } : st))
877
+ : [{ name: options.stack ?? options.environment }];
878
+ const merged = {};
879
+ const multi = options.stacks && options.stacks.length > 0;
880
+ for (const ref of stackRefs) {
881
+ try {
882
+ const template = await this.exportResources({ environment: options.environment, stack: ref.name, region: ref.region, owned: options.owned });
883
+ const attrs = resolveTemplateAttrs(template);
884
+ // Stack-qualify keys to match the observed node ids (#1162).
885
+ for (const [logicalId, v] of Object.entries(attrs)) {
886
+ merged[multi ? `${ref.name}::${logicalId}` : logicalId] = v;
887
+ }
888
+ }
889
+ catch {
890
+ // A stack that isn't deployed yet contributes no live attrs — skip it.
891
+ }
892
+ }
893
+ return merged;
894
+ },
895
+ composites() {
896
+ return compositeCatalog;
897
+ },
898
+ mcpTools() {
899
+ return [
900
+ {
901
+ name: "aws:diff",
902
+ description: "Compare current build output against previous output for AWS CloudFormation",
903
+ inputSchema: {
904
+ type: "object",
905
+ properties: {
906
+ path: {
907
+ type: "string",
908
+ description: "Path to the infrastructure project directory",
909
+ },
910
+ output: {
911
+ type: "string",
912
+ description: "Path to the existing output file to compare against",
913
+ },
914
+ },
915
+ required: ["path"],
916
+ },
917
+ async handler(params) {
918
+ const { diffCommand } = await import("@intentius/chant/cli/commands/diff");
919
+ const result = await diffCommand({
920
+ path: params.path ?? ".",
921
+ output: params.output,
922
+ serializers: [awsSerializer],
923
+ });
924
+ return result;
925
+ },
926
+ },
927
+ ];
928
+ },
929
+ mcpResources() {
930
+ return [
931
+ {
932
+ uri: "aws:resource-catalog",
933
+ name: "AWS Resource Catalog",
934
+ description: "JSON list of all supported AWS CloudFormation resource types",
935
+ mimeType: "application/json",
936
+ async handler() {
937
+ const lexicon = require("./generated/lexicon-aws.json");
938
+ const resources = Object.entries(lexicon)
939
+ .filter(([, entry]) => entry.kind === "resource")
940
+ .map(([className, entry]) => ({
941
+ className,
942
+ resourceType: entry.resourceType,
943
+ }));
944
+ return JSON.stringify(resources);
945
+ },
946
+ },
947
+ {
948
+ uri: "examples/aws-s3-bucket",
949
+ name: "AWS S3 Bucket Example",
950
+ description: "AWS S3 bucket with versioning and encryption",
951
+ mimeType: "text/typescript",
952
+ async handler() {
953
+ return `import { ServerSideEncryptionByDefault, ServerSideEncryptionRule, BucketEncryption, VersioningConfiguration, Bucket, Sub, AWS } from "@intentius/chant-lexicon-aws";
954
+
955
+ // Encryption configuration
956
+ export const encryptionDefault = new ServerSideEncryptionByDefault({
957
+ SSEAlgorithm: "AES256",
958
+ });
959
+
960
+ export const encryptionRule = new ServerSideEncryptionRule({
961
+ ServerSideEncryptionByDefault: encryptionDefault,
962
+ });
963
+
964
+ export const bucketEncryption = new BucketEncryption({
965
+ ServerSideEncryptionConfiguration: [encryptionRule],
966
+ });
967
+
968
+ // Versioning
969
+ export const versioningEnabled = new VersioningConfiguration({
970
+ Status: "Enabled",
971
+ });
972
+
973
+ // Create a versioned bucket with encryption (AccountId ensures global uniqueness)
974
+ export const dataBucket = new Bucket({
975
+ BucketName: Sub\`\${AWS.StackName}-\${AWS.AccountId}-data\`,
976
+ VersioningConfiguration: versioningEnabled,
977
+ BucketEncryption: bucketEncryption,
978
+ });
979
+ `;
980
+ },
981
+ },
982
+ {
983
+ uri: "examples/cross-references",
984
+ name: "Cross References Example",
985
+ description: "Using AttrRefs for cross-resource references",
986
+ mimeType: "text/typescript",
987
+ async handler() {
988
+ return `import { Bucket, VersioningConfiguration, Role } from "@intentius/chant-lexicon-aws";
989
+
990
+ // Create a bucket
991
+ export const dataBucket = new Bucket({
992
+ BucketName: "my-data-bucket",
993
+ VersioningConfiguration: new VersioningConfiguration({ Status: "Enabled" }),
994
+ });
995
+
996
+ // Create a role that references the bucket's ARN
997
+ export const role = new Role({
998
+ AssumeRolePolicyDocument: {
999
+ Version: "2012-10-17",
1000
+ Statement: [{
1001
+ Effect: "Allow",
1002
+ Principal: { Service: "lambda.amazonaws.com" },
1003
+ Action: "sts:AssumeRole",
1004
+ }],
1005
+ },
1006
+ });
1007
+ `;
1008
+ },
1009
+ },
1010
+ ];
1011
+ },
1012
+ };