@intentius/chant-lexicon-aws 0.44.14 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/agentcore/trace-fetch.d.ts +4 -1
  2. package/dist/agentcore/trace-fetch.d.ts.map +1 -1
  3. package/dist/api/read-client.d.ts +31 -1
  4. package/dist/api/read-client.d.ts.map +1 -1
  5. package/dist/codegen/docs.d.ts.map +1 -1
  6. package/dist/components/capability-plugin.d.ts.map +1 -1
  7. package/dist/components/cloud-executor.d.ts +9 -0
  8. package/dist/components/cloud-executor.d.ts.map +1 -1
  9. package/dist/composites/agentcore-agent.d.ts +33 -19
  10. package/dist/composites/agentcore-agent.d.ts.map +1 -1
  11. package/dist/composites/index.d.ts +1 -1
  12. package/dist/composites/index.d.ts.map +1 -1
  13. package/dist/composites/lambda-function.d.ts +4 -4
  14. package/dist/composites/lambda-function.d.ts.map +1 -1
  15. package/dist/deep-observe.d.ts +21 -0
  16. package/dist/deep-observe.d.ts.map +1 -1
  17. package/dist/index.d.ts +2 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/integrity.json +5 -3
  20. package/dist/lint/audit-catalog.d.ts.map +1 -1
  21. package/dist/lint/post-synth/cf-refs.d.ts +7 -0
  22. package/dist/lint/post-synth/cf-refs.d.ts.map +1 -1
  23. package/dist/lint/post-synth/index.d.ts.map +1 -1
  24. package/dist/lint/post-synth/waw059.d.ts +36 -0
  25. package/dist/lint/post-synth/waw059.d.ts.map +1 -0
  26. package/dist/lint/post-synth/waw060.d.ts +16 -0
  27. package/dist/lint/post-synth/waw060.d.ts.map +1 -0
  28. package/dist/manifest.json +1 -1
  29. package/dist/okf/index.md +2 -0
  30. package/dist/okf/rules/WAW059.md +25 -0
  31. package/dist/okf/rules/WAW060.md +17 -0
  32. package/dist/okf/types/Action.md +1 -0
  33. package/dist/okf/types/Bucket.md +1 -0
  34. package/dist/okf/types/GlobalTable.md +4 -0
  35. package/dist/okf/types/IamPolicy.md +2 -0
  36. package/dist/okf/types/InstanceProfile.md +4 -0
  37. package/dist/okf/types/ManagedPolicy.md +2 -0
  38. package/dist/okf/types/Map.md +1 -0
  39. package/dist/okf/types/Queue.md +1 -0
  40. package/dist/okf/types/Role.md +1 -0
  41. package/dist/okf/types/Table.md +1 -0
  42. package/dist/okf/types/Type.md +2 -0
  43. package/dist/op/activities/aws-apply.d.ts +62 -9
  44. package/dist/op/activities/aws-apply.d.ts.map +1 -1
  45. package/dist/op/activities/index.d.ts +5 -4
  46. package/dist/op/activities/index.d.ts.map +1 -1
  47. package/dist/ownership.d.ts +18 -0
  48. package/dist/ownership.d.ts.map +1 -1
  49. package/dist/plugin.d.ts.map +1 -1
  50. package/dist/properties.d.ts +4 -3
  51. package/dist/properties.d.ts.map +1 -1
  52. package/dist/rules/cf-refs.ts +22 -0
  53. package/dist/rules/waw059.ts +353 -0
  54. package/dist/rules/waw060.ts +91 -0
  55. package/dist/serializer.d.ts.map +1 -1
  56. package/dist/spec/fetch.d.ts +12 -1
  57. package/dist/spec/fetch.d.ts.map +1 -1
  58. package/dist/teardown.d.ts +85 -0
  59. package/dist/teardown.d.ts.map +1 -0
  60. package/package.json +2 -2
  61. package/src/agentcore/trace-fetch.test.ts +17 -0
  62. package/src/agentcore/trace-fetch.ts +7 -2
  63. package/src/api/read-client.test.ts +87 -0
  64. package/src/api/read-client.ts +57 -1
  65. package/src/codegen/docs-links.test.ts +44 -30
  66. package/src/codegen/docs.ts +2 -1034
  67. package/src/components/capability-plugin.ts +5 -2
  68. package/src/components/cloud-executor.test.ts +29 -1
  69. package/src/components/cloud-executor.ts +33 -6
  70. package/src/composites/agentcore-agent.test.ts +32 -12
  71. package/src/composites/agentcore-agent.ts +43 -23
  72. package/src/composites/index.ts +1 -1
  73. package/src/composites/microvm-app.test.ts +2 -2
  74. package/src/deep-observe.test.ts +94 -0
  75. package/src/deep-observe.ts +58 -2
  76. package/src/import/roundtrip-fixtures.test.ts +1 -1
  77. package/src/index.ts +3 -1
  78. package/src/lifecycle-integration.test.ts +93 -0
  79. package/src/lint/audit-catalog.ts +5 -0
  80. package/src/lint/post-synth/cf-refs.ts +22 -0
  81. package/src/lint/post-synth/index.ts +4 -0
  82. package/src/lint/post-synth/waw059.test.ts +309 -0
  83. package/src/lint/post-synth/waw059.ts +353 -0
  84. package/src/lint/post-synth/waw060.test.ts +131 -0
  85. package/src/lint/post-synth/waw060.ts +91 -0
  86. package/src/op/activities/aws-apply.test.ts +151 -4
  87. package/src/op/activities/aws-apply.ts +123 -13
  88. package/src/op/activities/index.ts +5 -3
  89. package/src/ownership.test.ts +24 -1
  90. package/src/ownership.ts +37 -0
  91. package/src/plugin.ts +52 -35
  92. package/src/properties.test.ts +5 -5
  93. package/src/properties.ts +6 -5
  94. package/src/serializer-ownership.test.ts +18 -0
  95. package/src/serializer.test.ts +73 -33
  96. package/src/serializer.ts +9 -1
  97. package/src/spec/fetch.test.ts +40 -0
  98. package/src/spec/fetch.ts +24 -3
  99. package/src/teardown.test.ts +258 -0
  100. package/src/teardown.ts +276 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waw060.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/waw060.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAsB9G,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,CA8ClF;AAED,eAAO,MAAM,MAAM,EAAE,cAOpB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws",
3
- "version": "0.44.14",
3
+ "version": "0.46.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "AWS",
6
6
  "intrinsics": [
package/dist/okf/index.md CHANGED
@@ -1722,3 +1722,5 @@ okf_version: '0.2'
1722
1722
  * [WAW056](/rules/WAW056.md) - SCP guardrail has no Deny statement — it constrains nothing
1723
1723
  * [WAW057](/rules/WAW057.md) - SCP guardrail is attached to no targets — it enforces nothing
1724
1724
  * [WAW058](/rules/WAW058.md) - Organization audit trail missing, not logging, or scoped down to a single region
1725
+ * [WAW059](/rules/WAW059.md) - Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
1726
+ * [WAW060](/rules/WAW060.md) - IAM policy attached to no principal — it grants nothing
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: WAW059
4
+ description: Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
5
+ id: WAW059
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: aws
9
+ docs: https://intentius.io/chant/lexicons/aws/rules/
10
+ ---
11
+ Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
12
+
13
+ ## Applies to
14
+
15
+ - [Action](/types/Action.md)
16
+ - [Bucket](/types/Bucket.md)
17
+ - [GlobalTable](/types/GlobalTable.md)
18
+ - [IamPolicy](/types/IamPolicy.md)
19
+ - [InstanceProfile](/types/InstanceProfile.md)
20
+ - [ManagedPolicy](/types/ManagedPolicy.md)
21
+ - [Map](/types/Map.md)
22
+ - [Queue](/types/Queue.md)
23
+ - [Role](/types/Role.md)
24
+ - [Table](/types/Table.md)
25
+ - [Type](/types/Type.md)
@@ -0,0 +1,17 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: WAW060
4
+ description: IAM policy attached to no principal — it grants nothing
5
+ id: WAW060
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: aws
9
+ docs: https://intentius.io/chant/lexicons/aws/rules/
10
+ ---
11
+ IAM policy attached to no principal — it grants nothing
12
+
13
+ ## Applies to
14
+
15
+ - [IamPolicy](/types/IamPolicy.md)
16
+ - [ManagedPolicy](/types/ManagedPolicy.md)
17
+ - [Type](/types/Type.md)
@@ -31,3 +31,4 @@ resource_type: AWS::SageMaker::Action
31
31
  ## Governed by
32
32
 
33
33
  - [WAW020](/rules/WAW020.md): IAM policy uses wildcard Action — use specific actions following least privilege
34
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -63,3 +63,4 @@ resource_type: AWS::S3::Bucket
63
63
  - [WAW006](/rules/WAW006.md): S3 Bucket Encryption
64
64
  - [WAW018](/rules/WAW018.md): S3 bucket missing public access block — all public access should be blocked
65
65
  - [WAW042](/rules/WAW042.md): S3 bucket missing a TLS-only bucket policy — deny requests over plaintext
66
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -37,3 +37,7 @@ resource_type: AWS::DynamoDB::GlobalTable
37
37
  - `Arn`
38
38
  - `StreamArn`
39
39
  - `TableId`
40
+
41
+ ## Governed by
42
+
43
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -24,3 +24,5 @@ resource_type: AWS::IAM::Policy
24
24
  ## Governed by
25
25
 
26
26
  - [WAW020](/rules/WAW020.md): IAM policy uses wildcard Action — use specific actions following least privilege
27
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
28
+ - [WAW060](/rules/WAW060.md): IAM policy attached to no principal — it grants nothing
@@ -18,3 +18,7 @@ resource_type: AWS::IAM::InstanceProfile
18
18
  ## Attributes
19
19
 
20
20
  - `Arn`
21
+
22
+ ## Governed by
23
+
24
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -40,3 +40,5 @@ resource_type: AWS::IAM::ManagedPolicy
40
40
  ## Governed by
41
41
 
42
42
  - [WAW020](/rules/WAW020.md): IAM policy uses wildcard Action — use specific actions following least privilege
43
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
44
+ - [WAW060](/rules/WAW060.md): IAM policy attached to no principal — it grants nothing
@@ -34,3 +34,4 @@ resource_type: AWS::Location::Map
34
34
  - [WAW015](/rules/WAW015.md): Circular dependency between nested stacks would cause infinite build recursion
35
35
  - [WAW016](/rules/WAW016.md): Deprecated property usage — flags properties marked as deprecated in the CloudFormation Registry
36
36
  - [WAW036](/rules/WAW036.md): Non-ASCII characters in EC2/IAM/CW string properties — rejected at changeset time
37
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -37,3 +37,4 @@ resource_type: AWS::SQS::Queue
37
37
  ## Governed by
38
38
 
39
39
  - [WAW026](/rules/WAW026.md): SQS queue is not encrypted — enable SqsManagedSseEnabled or set KmsMasterKeyId
40
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -31,3 +31,4 @@ resource_type: AWS::IAM::Role
31
31
 
32
32
  - [WAW020](/rules/WAW020.md): IAM policy uses wildcard Action — use specific actions following least privilege
33
33
  - [WAW036](/rules/WAW036.md): Non-ASCII characters in EC2/IAM/CW string properties — rejected at changeset time
34
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -42,3 +42,4 @@ resource_type: AWS::DynamoDB::Table
42
42
 
43
43
  - [WAW027](/rules/WAW027.md): DynamoDB table does not have point-in-time recovery enabled
44
44
  - [WAW030](/rules/WAW030.md): Missing DependsOn for known CloudFormation ordering patterns
45
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
@@ -73,3 +73,5 @@ resource_type: AWS::Cassandra::Type
73
73
  - [WAW056](/rules/WAW056.md): SCP guardrail has no Deny statement — it constrains nothing
74
74
  - [WAW057](/rules/WAW057.md): SCP guardrail is attached to no targets — it enforces nothing
75
75
  - [WAW058](/rules/WAW058.md): Organization audit trail missing, not logging, or scoped down to a single region
76
+ - [WAW059](/rules/WAW059.md): Wildcard Resource where the declared graph enumerates the touched set — tighten to the consumers' declared Arns
77
+ - [WAW060](/rules/WAW060.md): IAM policy attached to no principal — it grants nothing
@@ -3,11 +3,18 @@ export interface AwsApplyArgs {
3
3
  templatePath: string;
4
4
  /** CloudFormation stack name — the deploy boundary. */
5
5
  stackName: string;
6
- /** CFN endpoint override (e.g. Floci `http://localhost:4566`). Default: real CloudFormation. */
6
+ /**
7
+ * CFN endpoint override (e.g. Floci `http://localhost:4566`). Omitted,
8
+ * `AWS_ENDPOINT_URL_CLOUDFORMATION` then `AWS_ENDPOINT_URL` answer — the same
9
+ * rule the read client applies (#1694). With neither: real CloudFormation.
10
+ */
7
11
  endpoint?: string;
8
12
  /** Region (real CFN host + `Version` context). Default: `us-east-1`. */
9
13
  region?: string;
10
- /** Capabilities to acknowledge. Default: `["CAPABILITY_NAMED_IAM"]`. */
14
+ /**
15
+ * Capabilities to acknowledge. Default: `CAPABILITY_NAMED_IAM`, plus
16
+ * `CAPABILITY_AUTO_EXPAND` when the template has a top-level `Transform` (#980).
17
+ */
11
18
  capabilities?: string[];
12
19
  /** Stack-settle timeout in ms. Default: `300000`. */
13
20
  timeoutMs?: number;
@@ -19,12 +26,21 @@ export type AwsHttp = (url: string, form: Record<string, string>, signal?: Abort
19
26
  status: number;
20
27
  text: string;
21
28
  }>;
22
- /** The CloudFormation endpoint URL — the override, or the real regional host. */
23
- export declare function cfnUrl(endpoint?: string, region?: string): string;
29
+ /**
30
+ * The CloudFormation endpoint URL — the override, or the real regional host.
31
+ * `env` is what the ambient-variable fallback reads; injectable for tests.
32
+ */
33
+ export declare function cfnUrl(endpoint?: string, region?: string, env?: Record<string, string | undefined>): string;
24
34
  /** A CFN Query-protocol form body: `Action` + `Version` + params. */
25
35
  export declare function cfnForm(action: string, params: Record<string, string>): Record<string, string>;
26
36
  /** Capabilities as the CFN `Capabilities.member.N` list params. */
27
37
  export declare function capabilityParams(capabilities: string[]): Record<string, string>;
38
+ /**
39
+ * Stack tags as the CFN `Tags.member.N.Key/Value` list params (#1222). Sorted
40
+ * so the request is deterministic. Empty in, empty out — a template without an
41
+ * ownership marker adds no `Tags` parameter at all.
42
+ */
43
+ export declare function tagParams(tags: Record<string, string>): Record<string, string>;
28
44
  /**
29
45
  * First `<tag>…</tag>` text in a CFN XML response.
30
46
  *
@@ -55,22 +71,59 @@ export declare function waitForStackSettled(url: string, stackName: string, http
55
71
  * CloudFormation API directly (create-or-update + poll to a settled stack),
56
72
  * targeting a local Floci emulator or real AWS by endpoint override. The direct
57
73
  * twin of `azApply`/`gcpApply`: it speaks the CloudFormation Query API over HTTP
58
- * rather than shelling `aws cloudformation deploy` (that CLI path is still
59
- * available via `nativeApply({ target: "cloudformation" })`). The stack is the
60
- * ownership boundary, so deletes ride CloudFormation itself — no separate prune.
61
- * `http` is injectable for tests.
74
+ * rather than shelling `aws cloudformation deploy` and since chant #1449 it is
75
+ * also what `nativeApply({ target: "cloudformation" })` runs, so no CLI path
76
+ * remains. The stack is the ownership boundary, so deletes ride CloudFormation
77
+ * itself — no separate prune. `http` is injectable for tests.
62
78
  */
63
79
  export declare function awsApply(args: AwsApplyArgs, signal?: AbortSignal, http?: AwsHttp): Promise<{
64
80
  stackName: string;
65
81
  status: string;
66
82
  action: "created" | "updated" | "unchanged";
67
83
  }>;
84
+ /** {@link awsDelete}'s arguments: {@link AwsApplyArgs} minus the template — a
85
+ * delete needs no body, so teardown (#1222) can call it with a stack name
86
+ * alone. Op builders that thread `templatePath` through keep working; it is
87
+ * simply unused here. */
88
+ export type AwsDeleteArgs = Omit<AwsApplyArgs, "templatePath"> & {
89
+ templatePath?: string;
90
+ };
68
91
  /**
69
92
  * The inverse of {@link awsApply} — DeleteStack, then poll until the stack is
70
93
  * gone. Idempotent: an already-absent stack is a no-op. `http` is injectable.
71
94
  */
72
- export declare function awsDelete(args: AwsApplyArgs, signal?: AbortSignal, http?: AwsHttp): Promise<{
95
+ export declare function awsDelete(args: AwsDeleteArgs, signal?: AbortSignal, http?: AwsHttp): Promise<{
73
96
  stackName: string;
74
97
  deleted: boolean;
75
98
  }>;
99
+ export interface RollbackStackArgs {
100
+ /** CloudFormation stack name to roll back. */
101
+ stackName: string;
102
+ /** CFN endpoint override — same resolution rule as {@link AwsApplyArgs.endpoint} (#1694). */
103
+ endpoint?: string;
104
+ /** Region (real CFN host). Default: `us-east-1`. */
105
+ region?: string;
106
+ /** Stack-settle timeout in ms. Default: `300000`. */
107
+ timeoutMs?: number;
108
+ /** Poll interval in ms. Default: `3000`. */
109
+ intervalMs?: number;
110
+ }
111
+ /**
112
+ * The saga compensation for {@link awsApply} — CloudFormation `RollbackStack`
113
+ * via the same Query-API client, then poll until the stack settles. Returns the
114
+ * stack to its last known stable state after a failed update (#1449 — this
115
+ * replaces the Temporal lexicon exec-ing `aws cloudformation rollback-stack`).
116
+ *
117
+ * Degrades rather than crashes in two cases where there is nothing to do:
118
+ * an absent stack (nothing applied, nothing to revert) and a target that does
119
+ * not implement the action — Floci answers `UnknownAction` (#947). Both return
120
+ * `rolledBack: false` with a logged warning; every other API error throws,
121
+ * because a compensation that silently fails leaves partial state looking
122
+ * reverted when it isn't. `http` is injectable for tests.
123
+ */
124
+ export declare function rollbackStack(args: RollbackStackArgs, signal?: AbortSignal, http?: AwsHttp): Promise<{
125
+ stackName: string;
126
+ rolledBack: boolean;
127
+ status?: string;
128
+ }>;
76
129
  //# sourceMappingURL=aws-apply.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aws-apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/aws-apply.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,YAAY,CAAC,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,aAAa,EACnB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,GAAE,OAAqB,GAC1B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsBlD;AAED,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,iBAAiB,EACvB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,GAAE,OAAqB,GAC1B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA6BtE"}
@@ -2,8 +2,9 @@
2
2
  * AWS Op activities — resolved by the core activity registry when a project's
3
3
  * `chant.config.ts` lists the `aws` lexicon. Contributes the local Floci AWS
4
4
  * emulator lifecycle (`flociUp`/`flociDown`) and the native CloudFormation
5
- * applier (`awsApply`), which calls the CloudFormation API directly rather than
6
- * shelling `aws` — the direct twin of `azApply`/`gcpApply`.
5
+ * applier (`awsApply`, with `awsDelete` and the `rollbackStack` compensation),
6
+ * which calls the CloudFormation API directly rather than shelling `aws` — the
7
+ * direct twin of `azApply`/`gcpApply`.
7
8
  *
8
9
  * The registry keys every exported *function* here by its name, so only the
9
10
  * activities themselves belong in this barrel. `awsAgentCoreFetchTrace`'s
@@ -15,8 +16,8 @@
15
16
  */
16
17
  export { flociUp, flociDown, flociRunCommand, flociRmCommand, flociExistsCommand, flociHealthUrl, flociEnv, isFlociReady, } from "./floci.js";
17
18
  export type { FlociUpArgs, FlociDownArgs } from "./floci.js";
18
- export { awsApply, awsDelete, waitForStackSettled, cfnUrl, cfnForm, capabilityParams, xmlField, stackStatus, stackId, cfnErrorMessage, isStackMissing, isNoUpdates, isSuccessStatus, isFailureStatus, isTerminalStatus, } from "./aws-apply.js";
19
- export type { AwsApplyArgs, AwsHttp } from "./aws-apply.js";
19
+ export { awsApply, awsDelete, rollbackStack, waitForStackSettled, cfnUrl, cfnForm, capabilityParams, xmlField, stackStatus, stackId, cfnErrorMessage, isStackMissing, isNoUpdates, isSuccessStatus, isFailureStatus, isTerminalStatus, } from "./aws-apply.js";
20
+ export type { AwsApplyArgs, RollbackStackArgs, AwsHttp } from "./aws-apply.js";
20
21
  export { awsAgentCoreFetchTrace } from "../../agentcore/trace-fetch.js";
21
22
  export type { AgentCoreTraceSource, AwsAgentCoreFetchTraceArgs, AwsAgentCoreFetchTraceResult, } from "../../agentcore/trace-fetch.js";
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EACL,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,OAAO,EACP,eAAe,EACf,cAAc,EACd,WAAW,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,OAAO,EACP,eAAe,EACf,cAAc,EACd,WAAW,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC"}
@@ -7,4 +7,22 @@
7
7
  import type { ChannelKeys } from "@intentius/chant/ownership";
8
8
  /** AWS tag keys for chant's ownership markers. */
9
9
  export declare const AWS_TAG_OWNERSHIP_KEYS: ChannelKeys;
10
+ /**
11
+ * Template-level `Metadata` key the serializer stamps the ownership marker
12
+ * under (#1222). Stack-level teardown verifies ownership on the *stack's own*
13
+ * tags, and CloudFormation stack tags are an API parameter, not a template
14
+ * section — so the template carries the marker here and the apply paths
15
+ * (`awsApply`, the `cfn-deploy` change set) turn it into stack tags on
16
+ * create/update. One source: the same build that stamps resource tags decides
17
+ * the stack tags.
18
+ */
19
+ export declare const OWNERSHIP_METADATA_KEY = "chant:ownership";
20
+ /**
21
+ * The stack tags a template body asks for: the flat tag map under
22
+ * `Metadata["chant:ownership"]`, or nothing. Total on bad input — a body that
23
+ * is not JSON (a YAML template, a handwritten one) or carries no marker
24
+ * returns `{}`, and the stack simply stays untagged, which teardown reports
25
+ * as unverified rather than deleting.
26
+ */
27
+ export declare function ownershipStackTagsForBody(body: string): Record<string, string>;
10
28
  //# sourceMappingURL=ownership.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ownership.d.ts","sourceRoot":"","sources":["../src/ownership.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,kDAAkD;AAClD,eAAO,MAAM,sBAAsB,EAAE,WAIpC,CAAC"}
1
+ {"version":3,"file":"ownership.d.ts","sourceRoot":"","sources":["../src/ownership.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,kDAAkD;AAClD,eAAO,MAAM,sBAAsB,EAAE,WAIpC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AAExD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgL,MAAM,0BAA0B,CAAC;AAqC5O;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnD,eAAO,MAAM,SAAS,EAAE,aAw6BvB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgL,MAAM,0BAA0B,CAAC;AAqC5O;yEACyE;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAiBnD,eAAO,MAAM,SAAS,EAAE,aAm7BvB,CAAC"}
@@ -16,9 +16,10 @@
16
16
  * A deep read (Cloud Control) answers this properly but is a per-resource call
17
17
  * and is not available on every endpoint. This is the cheap middle: one describe
18
18
  * per kind for the whole observation, joined back by physical id. Stack outputs
19
- * are kept they were the only attributes for a long time and queries lean on
20
- * them — but a resource's own properties win a name collision, because they are
21
- * the resource's.
19
+ * no longer ride the resource at all they are the stack's, and travel on the
20
+ * observation envelope's `stackExports`. Whatever a resource already carries is
21
+ * kept underneath its own properties, which win a name collision because they
22
+ * are the resource's.
22
23
  */
23
24
  import type { ResourceMetadata } from "@intentius/chant/lexicon";
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../src/properties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkCjE;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAUlC;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB,yGAAyG;IACzG,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CAyE9B"}
1
+ {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../src/properties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkCjE;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAUlC;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB,yGAAyG;IACzG,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CAyE9B"}
@@ -50,6 +50,28 @@ export function findResourceRefs(value: unknown): Set<string> {
50
50
  return refs;
51
51
  }
52
52
 
53
+ /**
54
+ * Build the reverse of `findResourceRefs` for a whole template: logical id →
55
+ * the set of logical ids whose Properties reference it via Ref/Fn::GetAtt.
56
+ * Lets a check walk the graph consumer-ward (who uses this role?) instead of
57
+ * dependency-ward. Used by WAW059.
58
+ */
59
+ export function buildReverseRefIndex(template: CFTemplate): Map<string, Set<string>> {
60
+ const index = new Map<string, Set<string>>();
61
+ for (const [logicalId, resource] of Object.entries(template.Resources ?? {})) {
62
+ for (const target of findResourceRefs(resource.Properties)) {
63
+ if (target === logicalId) continue;
64
+ let consumers = index.get(target);
65
+ if (!consumers) {
66
+ consumers = new Set();
67
+ index.set(target, consumers);
68
+ }
69
+ consumers.add(logicalId);
70
+ }
71
+ }
72
+ return index;
73
+ }
74
+
53
75
  /**
54
76
  * Check if a value is a CloudFormation intrinsic function (Ref, Fn::*, etc.)
55
77
  * that cannot be statically evaluated.