@intentius/chant-lexicon-cedar 0.44.9 → 0.44.12

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 (70) hide show
  1. package/README.md +48 -2
  2. package/dist/agentcore/embed.d.ts +189 -0
  3. package/dist/agentcore/embed.d.ts.map +1 -0
  4. package/dist/agentcore/enforcement.d.ts +76 -0
  5. package/dist/agentcore/enforcement.d.ts.map +1 -0
  6. package/dist/agentcore/scan.d.ts +46 -0
  7. package/dist/agentcore/scan.d.ts.map +1 -0
  8. package/dist/avp/client.d.ts +85 -8
  9. package/dist/avp/client.d.ts.map +1 -1
  10. package/dist/codegen/docs-dogwood.d.ts +21 -0
  11. package/dist/codegen/docs-dogwood.d.ts.map +1 -0
  12. package/dist/codegen/docs.d.ts.map +1 -1
  13. package/dist/dogwood/cli.d.ts +41 -0
  14. package/dist/dogwood/cli.d.ts.map +1 -1
  15. package/dist/dogwood/index.d.ts +10 -4
  16. package/dist/dogwood/index.d.ts.map +1 -1
  17. package/dist/dogwood/replay-activity.d.ts +196 -0
  18. package/dist/dogwood/replay-activity.d.ts.map +1 -0
  19. package/dist/dogwood/replay-op.d.ts +165 -0
  20. package/dist/dogwood/replay-op.d.ts.map +1 -0
  21. package/dist/dogwood/serialize.d.ts +20 -0
  22. package/dist/dogwood/serialize.d.ts.map +1 -1
  23. package/dist/dogwood/trace.d.ts +215 -0
  24. package/dist/dogwood/trace.d.ts.map +1 -0
  25. package/dist/index.d.ts +8 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/integrity.json +5 -3
  28. package/dist/lint/audit-catalog.d.ts.map +1 -1
  29. package/dist/lint/post-synth/dwdc013.d.ts +33 -0
  30. package/dist/lint/post-synth/dwdc013.d.ts.map +1 -0
  31. package/dist/lint/post-synth/index.d.ts.map +1 -1
  32. package/dist/manifest.json +1 -1
  33. package/dist/okf/index.md +1 -0
  34. package/dist/okf/rules/DWDC013.md +15 -0
  35. package/dist/okf/types/Policy.md +1 -0
  36. package/dist/op/activities/index.d.ts +18 -0
  37. package/dist/op/activities/index.d.ts.map +1 -0
  38. package/dist/plugin.d.ts.map +1 -1
  39. package/dist/rules/dwdc013.ts +64 -0
  40. package/dist/skills/chant-cedar-dogwood.md +327 -0
  41. package/package.json +7 -2
  42. package/src/agentcore/embed.test.ts +254 -0
  43. package/src/agentcore/embed.ts +399 -0
  44. package/src/agentcore/enforcement.test.ts +43 -0
  45. package/src/agentcore/enforcement.ts +92 -0
  46. package/src/agentcore/scan.ts +119 -0
  47. package/src/avp/OWNERSHIP.md +38 -0
  48. package/src/avp/client.test.ts +271 -0
  49. package/src/avp/client.ts +150 -16
  50. package/src/codegen/docs-dogwood.ts +1119 -0
  51. package/src/codegen/docs.ts +66 -1
  52. package/src/dogwood/cli.test.ts +122 -1
  53. package/src/dogwood/cli.ts +122 -1
  54. package/src/dogwood/index.ts +74 -1
  55. package/src/dogwood/replay-activity.test.ts +481 -0
  56. package/src/dogwood/replay-activity.ts +506 -0
  57. package/src/dogwood/replay-op.ts +242 -0
  58. package/src/dogwood/serialize.ts +37 -0
  59. package/src/dogwood/trace.test.ts +231 -0
  60. package/src/dogwood/trace.ts +471 -0
  61. package/src/index.ts +52 -0
  62. package/src/lint/audit-catalog.ts +8 -0
  63. package/src/lint/post-synth/dwd-post-synth.test.ts +119 -1
  64. package/src/lint/post-synth/dwdc013.ts +64 -0
  65. package/src/lint/post-synth/dwde-post-synth.test.ts +1 -1
  66. package/src/lint/post-synth/index.ts +2 -0
  67. package/src/op/activities/index.ts +27 -0
  68. package/src/plugin.test.ts +3 -2
  69. package/src/plugin.ts +30 -0
  70. package/src/skills/chant-cedar-dogwood.md +327 -0
package/README.md CHANGED
@@ -126,7 +126,8 @@ import { OwnerCanManage, DenyByDefaultSet } from "@intentius/chant-lexicon-cedar
126
126
 
127
127
  ## Agent surface
128
128
 
129
- Three skills (`chant-cedar-authoring`, `chant-cedar-avp-embedding`, `chant-cedar-meta-policy`),
129
+ Four skills (`chant-cedar-authoring`, `chant-cedar-avp-embedding`,
130
+ `chant-cedar-meta-policy`, `chant-cedar-dogwood`),
130
131
  three `chant init` templates (`default`, `avp-embedding`,
131
132
  `gateway-policy-set`), and three MCP contributions:
132
133
 
@@ -215,6 +216,50 @@ says it is not intended for production use. The revision this is built against
215
216
  is recorded in `src/dogwood/upstream.ts`; full `.dw` validation shells to the
216
217
  `dogwood` binary and is deliberately not part of any gating check.
217
218
 
219
+ Five pages in the docs site cover the dialect, and the skill
220
+ `chant-cedar-dogwood` covers it for an agent:
221
+
222
+ | Page | What it answers |
223
+ |---|---|
224
+ | [The Dogwood Dialect](docs/src/content/docs/dogwood.mdx) | What ships, what pre-release means, how upstream is governed |
225
+ | [Temporal Policies](docs/src/content/docs/dogwood-temporal-policies.mdx) | The builders, the operators, and which of them are really macros |
226
+ | [Event Schemas](docs/src/content/docs/dogwood-event-schemas.mdx) | The `.dwschema` surface and the `callerPrincipal` pin |
227
+ | [Validation](docs/src/content/docs/dogwood-validation.mdx) | The DWD walls, the CLI-gated checks, and the binary knobs |
228
+ | [Replay](docs/src/content/docs/dogwood-replay.mdx) | Typed traces, `PolicyReplayOp`, and the both-bags trap |
229
+
230
+ ## Bedrock AgentCore
231
+
232
+ `AWS::BedrockAgentCore::Policy` is where a temporal policy is actually
233
+ deployed, and its `Definition` is a two-arm `oneOf`: `Cedar.Statement` for plain
234
+ Cedar, `Policy.Statement` for anything else. That second arm is what a `.dw`
235
+ policy travels in.
236
+
237
+ `agentCorePolicyDefinition(name, policy)` picks the arm from the policy — a
238
+ `TemporalPolicy`, or any props carrying a temporal clause, goes to `Policy`;
239
+ plain Cedar goes to `Cedar`. Same no-dependency rule as the AVP seam above: the
240
+ seam is the data shape, not an import. Templates are refused, because
241
+ AgentCore's union has no template-linked arm.
242
+
243
+ `EnforcementMode` is the staging dial. `LOG_ONLY` is evaluated on every request
244
+ and its decision is observed rather than returned, which is observe-before-
245
+ enforce in the substrate, per policy — and it is how a temporal rule should
246
+ start, since whether `formerly within 1h …` fires depends on traffic nobody has
247
+ replayed:
248
+
249
+ ```ts
250
+ new BedrockAgentCorePolicy({
251
+ PolicyEngineId: engine.ref(),
252
+ ...agentCoreStagedPolicy("writeNeedsApproval", writeNeedsApproval, "log-only"),
253
+ });
254
+ ```
255
+
256
+ Promotion is `"log-only"` → `"enforce"`. The resource carries a statement and
257
+ nothing else, so the event schema has no property to live in and is registered
258
+ with the engine separately; DWDC013 warns when a build embeds temporal text and
259
+ emits no `.dwschema` beside it, because the deployed statement then matches
260
+ nothing and fails open or closed without failing. See
261
+ `examples/agentcore-policy/`.
262
+
218
263
  ## Commands
219
264
 
220
265
  ```bash
@@ -233,6 +278,7 @@ npm run docs:build # build the Starlight site in docs/
233
278
  - `src/serializer.ts` — `.cedar` text and JSON policy-set output
234
279
  - `src/policy-text.ts` — policy-head rendering shared by every renderer
235
280
  - `src/avp/` — AVP embedding, the policy-store readers, and the ownership channel
281
+ - `src/agentcore/` — the AgentCore `Definition` seam and the `EnforcementMode` dial
236
282
  - `src/dogwood/` — the temporal dialect: builders, `.dw`/`.dwschema` output
237
283
  - `src/import/` — `chant import` parser, generator and round-trip fixtures
238
284
  - `src/detect.ts` — which documents belong to this lexicon
@@ -242,7 +288,7 @@ npm run docs:build # build the Starlight site in docs/
242
288
  - `src/lsp/` — LSP completions and hover over the generated registry
243
289
  - `src/mcp/` — MCP tools and resources, including policy coverage
244
290
  - `src/composites/` — `OwnerCanManage`, `DenyByDefaultSet`
245
- - `src/skills/` — the three agent skills
291
+ - `src/skills/` — the four agent skills
246
292
  - `src/init-templates.ts` — `chant init --lexicon cedar --template …`
247
293
  - `src/generated/` — generated artifacts (do not edit)
248
294
  - `docs/` — the standalone Starlight site, generated by `npm run docs`
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Typed embedding of a cedar or dogwood policy into
3
+ * `AWS::BedrockAgentCore::Policy` (#1660).
4
+ *
5
+ * The aws lexicon keeps the deployment vehicle, exactly as it does for AVP
6
+ * (#1652, `../avp/embed.ts`). What differs is the shape of the vehicle:
7
+ * AgentCore's `Definition` is a two-arm `oneOf`, not the single `Static` arm
8
+ * `AWS::VerifiedPermissions::Policy` has —
9
+ *
10
+ * ```jsonc
11
+ * "PolicyDefinition": {
12
+ * "oneOf": [{ "required": ["Cedar"] }, { "required": ["Policy"] }]
13
+ * }
14
+ * ```
15
+ *
16
+ * — where `Cedar.Statement` is plain Cedar and `Policy.Statement` is the
17
+ * language-agnostic arm. That second arm is what makes AgentCore the
18
+ * deployment target for the dogwood dialect: a `.dw` policy is a Cedar policy
19
+ * with `when temporal { … }` clauses, which the `Cedar` arm has no business
20
+ * accepting, and the `Policy` arm exists precisely so a policy engine can be
21
+ * handed something that is not plain Cedar.
22
+ *
23
+ * A project that has both lexicons installed writes
24
+ *
25
+ * ```ts
26
+ * new BedrockAgentCorePolicy({
27
+ * PolicyEngineId: engine.ref(),
28
+ * Name: "writeNeedsApproval",
29
+ * ...agentCoreStagedPolicy("writeNeedsApproval", writeNeedsApproval, "log-only"),
30
+ * });
31
+ * ```
32
+ *
33
+ * and the statement is the same text `chant build` writes to `policies.dw`,
34
+ * rendered by the same renderer, with `@id` intact.
35
+ *
36
+ * ### Why no dependency, and why the example uses plain objects
37
+ *
38
+ * Same rule as `../avp/embed.ts` and for the same reason: a cedar → aws
39
+ * dependency would invert the epic's decision that Cedar is vendor-neutral and
40
+ * make the cedar lexicon unbuildable without the aws one. Nothing here imports
41
+ * `@intentius/chant-lexicon-aws`. The seam is the data shape, which is stable
42
+ * CloudFormation, and the prop names below are the generated class's own
43
+ * (`PolicyEngineId`, `Name`, `Definition`, `EnforcementMode`, `Description`),
44
+ * so substituting the real class is a one-line edit. `examples/agentcore-policy/`
45
+ * demonstrates the pairing with a plain-object stand-in, because the shipped
46
+ * cedar examples build against the cedar serializer alone and an `AWS::*` entity
47
+ * declared in that tree would have no serializer to emit it.
48
+ *
49
+ * ### What this module refuses
50
+ *
51
+ * Templates. `AWS::VerifiedPermissions::Policy` has a `TemplateLinked` arm;
52
+ * AgentCore's `Definition` union does not, so a statement carrying a
53
+ * `?principal` or `?resource` slot has nowhere to go and would be rejected at
54
+ * deploy time with an error about the policy text rather than about the slot.
55
+ * {@link agentCoreStatement} throws instead, at authoring time, naming the
56
+ * declaration.
57
+ */
58
+ import { type Declarable } from "@intentius/chant/declarable";
59
+ import { type CedarPolicyProps } from "../serializer.js";
60
+ import { type TemporalPolicyProps } from "../dogwood/policy.js";
61
+ import { type AgentCoreEnforcementMode, type AgentCoreStage } from "./enforcement.js";
62
+ /** `Definition.Cedar` — the plain-Cedar arm of the definition union. */
63
+ export interface AgentCoreCedarDefinition {
64
+ Statement: string;
65
+ }
66
+ /** `Definition.Policy` — the language-agnostic arm, which carries `.dw` text. */
67
+ export interface AgentCoreLanguageDefinition {
68
+ Statement: string;
69
+ }
70
+ /**
71
+ * The `Definition` property of `AWS::BedrockAgentCore::Policy`.
72
+ *
73
+ * A union rather than a record with two optional keys, because upstream's
74
+ * schema is a `oneOf`: a definition carrying both arms is rejected, and a type
75
+ * that can express it is a type that lets a caller build one.
76
+ */
77
+ export type AgentCorePolicyDefinition = {
78
+ Cedar: AgentCoreCedarDefinition;
79
+ Policy?: never;
80
+ } | {
81
+ Policy: AgentCoreLanguageDefinition;
82
+ Cedar?: never;
83
+ };
84
+ /** The props of `AWS::BedrockAgentCore::Policy` this module can fill. */
85
+ export interface AgentCorePolicyResource {
86
+ PolicyEngineId: string;
87
+ Name: string;
88
+ Definition: AgentCorePolicyDefinition;
89
+ EnforcementMode?: AgentCoreEnforcementMode;
90
+ Description?: string;
91
+ }
92
+ /**
93
+ * A policy paired with its rollout stage — everything but the engine id.
94
+ *
95
+ * Spreadable into the generated class, which is the point: the caller supplies
96
+ * `PolicyEngineId` (an AttrRef this module has no type for) and this supplies
97
+ * the three props that come from the declaration.
98
+ */
99
+ export interface AgentCoreStagedPolicy {
100
+ Name: string;
101
+ Definition: AgentCorePolicyDefinition;
102
+ EnforcementMode: AgentCoreEnforcementMode;
103
+ Description?: string;
104
+ }
105
+ /** `Statement` minLength, on both arms of the union. */
106
+ export declare const AGENTCORE_STATEMENT_MIN = 35;
107
+ /** `Statement` maxLength, on both arms of the union. */
108
+ export declare const AGENTCORE_STATEMENT_MAX = 10000;
109
+ /** `Name` — an identifier, and create-only, so a rename replaces the policy. */
110
+ export declare const AGENTCORE_NAME_PATTERN: RegExp;
111
+ /** What a caller can hand the embedding: one policy, or a whole build's worth. */
112
+ export type AgentCorePolicySource = Declarable | CedarPolicyProps | TemporalPolicyProps | Record<string, unknown> | Map<string, Declarable>;
113
+ export interface AgentCoreEmbedOptions {
114
+ /** Override the policy id. Defaults to the serializer's own derivation. */
115
+ policyId?: string;
116
+ /**
117
+ * Force an arm of the `Definition` union.
118
+ *
119
+ * The default reads the policy: temporal clauses take the `Policy` arm, plain
120
+ * Cedar takes the `Cedar` arm. Forcing `"dogwood"` on plain Cedar is
121
+ * legitimate — dogwood embeds Cedar, so the `Policy` arm accepts it, and a
122
+ * policy set that will grow temporal clauses need not change arms later.
123
+ * Forcing `"cedar"` on temporal text is not, and throws.
124
+ */
125
+ language?: "cedar" | "dogwood";
126
+ /** `Description` on the resource. Free prose; AgentCore does nothing with it. */
127
+ description?: string;
128
+ }
129
+ /**
130
+ * The policy text for one AgentCore policy — the exact string a `Statement`
131
+ * wants, on whichever arm it lands.
132
+ *
133
+ * `name` is the chant entity name; the `@id` annotation the statement carries
134
+ * is derived from it the same way the serializer derives it, so the statement
135
+ * in the policy engine can be matched back to the declaration that produced it.
136
+ */
137
+ export declare function agentCoreStatement(name: string, source: AgentCorePolicySource, options?: AgentCoreEmbedOptions): string;
138
+ /**
139
+ * The `Definition` property of `AWS::BedrockAgentCore::Policy`.
140
+ *
141
+ * The arm is chosen by what the policy is: a `Dogwood::TemporalPolicy`, or any
142
+ * props carrying a temporal clause, lands in `Definition.Policy`; plain Cedar
143
+ * lands in `Definition.Cedar`. `options.language` overrides in the one
144
+ * direction that is safe (see {@link AgentCoreEmbedOptions.language}).
145
+ */
146
+ export declare function agentCorePolicyDefinition(name: string, source: AgentCorePolicySource, options?: AgentCoreEmbedOptions): AgentCorePolicyDefinition;
147
+ /**
148
+ * A policy and its rollout stage, ready to spread into the generated class.
149
+ *
150
+ * The staged-rollout pattern in one call, which is the point (#1660, and the
151
+ * loomster#171 showcase seam): shipping log-only and promoting to enforcing is
152
+ * a one-token diff, not a hand-edited `EnforcementMode` string somewhere else
153
+ * in the template. See ./enforcement.ts for why observe-before-enforce is the
154
+ * default reading of a temporal policy rather than an optional nicety.
155
+ */
156
+ export declare function agentCoreStagedPolicy(name: string, source: AgentCorePolicySource, stage: AgentCoreStage, options?: AgentCoreEmbedOptions): AgentCoreStagedPolicy;
157
+ /**
158
+ * Every required prop of `AWS::BedrockAgentCore::Policy`, plus the stage.
159
+ *
160
+ * `PolicyEngineId` is a string here rather than an AttrRef because this module
161
+ * does not know the aws lexicon's reference types. A project passes
162
+ * `engine.ref()` in place of the literal and TypeScript is satisfied by the
163
+ * generated class's own prop type, not by this one.
164
+ */
165
+ export declare function agentCorePolicyResource(name: string, source: AgentCorePolicySource, policyEngineId: string, options?: AgentCoreEmbedOptions & {
166
+ stage?: AgentCoreStage;
167
+ }): AgentCorePolicyResource;
168
+ /**
169
+ * Every policy in a build, as one AgentCore `Definition` each, keyed by chant
170
+ * entity name.
171
+ *
172
+ * The whole-set form, and the one that walks references between declared
173
+ * entities — that is what `cedarPolicyRecords`/`dogwoodPolicyRecords` do. One
174
+ * definition per policy rather than one merged statement, because
175
+ * `EnforcementMode` is a per-policy dial and merging would throw it away; hand
176
+ * the map to {@link agentCorePolicyDefinition} instead when a single AgentCore
177
+ * policy really should carry the whole set.
178
+ */
179
+ export declare function agentCorePolicySet(entities: Map<string, Declarable>, options?: AgentCoreEmbedOptions): Record<string, AgentCorePolicyDefinition>;
180
+ /**
181
+ * The chant entity name as an AgentCore `Name`.
182
+ *
183
+ * `Name` is create-only and matches `^[A-Za-z][A-Za-z0-9_]*$` — no hyphens,
184
+ * which is why it is not the kebab-case policy id the `@id` annotation carries.
185
+ * Checked rather than coerced: silently rewriting a name that is create-only
186
+ * would mean a later rename replaces the policy without anyone having asked.
187
+ */
188
+ export declare function agentCorePolicyName(name: string): string;
189
+ //# sourceMappingURL=embed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../src/agentcore/embed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpG,wEAAwE;AACxE,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,iFAAiF;AACjF,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GACjC;IAAE,KAAK,EAAE,wBAAwB,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,GACnD;IAAE,MAAM,EAAE,2BAA2B,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE3D,yEAAyE;AACzE,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,yBAAyB,CAAC;IACtC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,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Ac,EAAE,MAAM,EACtB,OAAO,GAAE,qBAAqB,GAAG;IAAE,KAAK,CAAC,EAAE,cAAc,CAAA;CAAO,GAC/D,uBAAuB,CASzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACjC,OAAO,GAAE,qBAA0B,GAClC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAW3C;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * `EnforcementMode` — the dial that makes a policy rollout observable before it
3
+ * is binding (#1660).
4
+ *
5
+ * `AWS::BedrockAgentCore::Policy` carries an optional `EnforcementMode` with
6
+ * exactly two values, and the CloudFormation schema says what they mean:
7
+ *
8
+ * > Whether the policy contributes to the enforce decision returned to Gateway.
9
+ * > LOG_ONLY policies are still evaluated but their decisions are observed
10
+ * > only, allowing customers to validate a policy against real traffic before
11
+ * > promoting it.
12
+ *
13
+ * That is observe-before-enforce, in the substrate, per policy — the same shape
14
+ * chant already has at the ops layer, and the reason epic #1646 picked
15
+ * AgentCore as the deployment target for the temporal dialect rather than
16
+ * inventing a staging mechanism. A temporal policy is the case that needs it
17
+ * most: `formerly within 24h …` cannot be reasoned about from the source alone,
18
+ * because whether it fires depends on traffic nobody has replayed yet.
19
+ *
20
+ * ### The two names, and why chant does not reuse AWS's
21
+ *
22
+ * The wire values are `LOG_ONLY` and `ACTIVE`. `ACTIVE` is a poor name for
23
+ * "enforcing" — it reads as "not disabled", and `LOG_ONLY` is active too; it is
24
+ * evaluated on every request. So the authoring vocabulary here is
25
+ * `"log-only"` / `"enforce"`, and {@link enforcementMode} is the one place the
26
+ * translation happens. The wire values are exported as well, for a caller that
27
+ * has one in hand from a live read.
28
+ *
29
+ * ### The showcase seam (loomster#171)
30
+ *
31
+ * loomster#171 wants a staged policy rollout it can demonstrate end to end:
32
+ * ship the policy log-only, watch what it would have denied, promote it. This
33
+ * module is that seam. The whole rollout is one argument —
34
+ * `agentCoreStagedPolicy(name, policy, stage)` — so the promotion is a
35
+ * one-token diff a reviewer can see, rather than a hand-edited string in a
36
+ * CloudFormation resource. Anything more elaborate (which environments are
37
+ * promoted, who decides) belongs to the caller's own config; this module's job
38
+ * is to make the two states nameable and the transition legible.
39
+ */
40
+ /**
41
+ * The wire values `EnforcementMode` takes, keyed by the stage they implement.
42
+ *
43
+ * A typed constant pair rather than a bare union so a caller reads
44
+ * `AGENTCORE_ENFORCEMENT.logOnly` at the call site and cannot typo the string.
45
+ */
46
+ export declare const AGENTCORE_ENFORCEMENT: {
47
+ /** Evaluated on every request; its decision is observed, never returned. */
48
+ readonly logOnly: "LOG_ONLY";
49
+ /** Contributes to the decision Gateway returns. AWS's own default. */
50
+ readonly enforce: "ACTIVE";
51
+ };
52
+ /** The `EnforcementMode` property value, as CloudFormation spells it. */
53
+ export type AgentCoreEnforcementMode = (typeof AGENTCORE_ENFORCEMENT)[keyof typeof AGENTCORE_ENFORCEMENT];
54
+ /** The stage of a rollout, in the vocabulary the seam is authored in. */
55
+ export type AgentCoreStage = "log-only" | "enforce";
56
+ /**
57
+ * The `EnforcementMode` a stage deploys as.
58
+ *
59
+ * Omitting `EnforcementMode` entirely is legal and means `ACTIVE` — AWS's
60
+ * schema declares that default. This helper never returns `undefined`, so a
61
+ * policy that went through it says which stage it is in on the face of the
62
+ * template, and a diff that promotes one shows the change.
63
+ */
64
+ export declare function enforcementMode(stage: AgentCoreStage): AgentCoreEnforcementMode;
65
+ /** The stage a wire value came from — the inverse of {@link enforcementMode}. */
66
+ export declare function enforcementStage(mode: AgentCoreEnforcementMode | undefined): AgentCoreStage;
67
+ /** True when the policy's decision reaches Gateway rather than only the log. */
68
+ export declare function isEnforcing(mode: AgentCoreEnforcementMode | undefined): boolean;
69
+ /**
70
+ * One line of prose for a stage, for a description or a plan summary.
71
+ *
72
+ * Kept here rather than at the call sites so every surface that explains a
73
+ * staged policy explains it the same way.
74
+ */
75
+ export declare function describeStage(stage: AgentCoreStage): string;
76
+ //# sourceMappingURL=enforcement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enforcement.d.ts","sourceRoot":"","sources":["../../src/agentcore/enforcement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;IAChC,4EAA4E;;IAE5E,sEAAsE;;CAE9D,CAAC;AAEX,yEAAyE;AACzE,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAE1G,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,wBAAwB,CAE/E;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,GAAG,cAAc,CAE3F;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,GAAG,OAAO,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAI3D"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Finding embedded AgentCore policy statements in a build's emitted output
3
+ * (#1660).
4
+ *
5
+ * The DWD walls read emitted *text* rather than the in-memory model, for the
6
+ * reason `../dogwood/scan.ts` sets out: `chant audit` runs over artifacts chant
7
+ * did not write, and a wall that only fires on chant's own output is not a
8
+ * wall. An embedded statement is the same situation one lexicon further out —
9
+ * the statement lands in whatever the aws lexicon emitted, so this reads the
10
+ * emitted template rather than reaching for a resource class the cedar lexicon
11
+ * deliberately does not import.
12
+ *
13
+ * Structural, not CloudFormation-specific. The thing being looked for is an
14
+ * object with a `Definition.Policy.Statement` string, which is AgentCore's
15
+ * language-agnostic arm wherever it appears — in a CFN template's
16
+ * `Resources.<id>.Properties`, in a plan JSON, in a fixture. The nearest
17
+ * enclosing key is carried along as the name to blame, which for a CFN template
18
+ * is the logical id.
19
+ */
20
+ import type { PostSynthContext } from "@intentius/chant/lint/post-synth";
21
+ /** One `Definition.Policy.Statement` found in an emitted artifact. */
22
+ export interface EmbeddedAgentCoreStatement {
23
+ /** The lexicon whose output carried it. */
24
+ lexicon: string;
25
+ /** The filename, or the lexicon's primary output when it had no name. */
26
+ source: string;
27
+ /** The nearest enclosing key — a CloudFormation logical id, in practice. */
28
+ logicalId?: string;
29
+ /** The statement text, verbatim. */
30
+ statement: string;
31
+ }
32
+ /** The `Cedar` arm as well, for a check that needs to tell the two apart. */
33
+ export interface EmbeddedAgentCoreDefinition extends EmbeddedAgentCoreStatement {
34
+ arm: "Cedar" | "Policy";
35
+ }
36
+ /**
37
+ * Every AgentCore policy definition embedded in a build's emitted output.
38
+ *
39
+ * Non-JSON output is skipped rather than reported: most emitted files are not
40
+ * JSON, and a parse failure here says nothing about whether a statement is
41
+ * there.
42
+ */
43
+ export declare function embeddedAgentCoreDefinitions(ctx: PostSynthContext): EmbeddedAgentCoreDefinition[];
44
+ /** Only the language-agnostic arm — the one a `.dw` statement travels in. */
45
+ export declare function embeddedAgentCorePolicyStatements(ctx: PostSynthContext): EmbeddedAgentCoreStatement[];
46
+ //# sourceMappingURL=scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../src/agentcore/scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,sEAAsE;AACtE,MAAM,WAAW,0BAA0B;IACzC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6EAA6E;AAC7E,MAAM,WAAW,2BAA4B,SAAQ,0BAA0B;IAC7E,GAAG,EAAE,OAAO,GAAG,QAAQ,CAAC;CACzB;AAgDD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,GAAG,2BAA2B,EAAE,CAoBjG;AAED,6EAA6E;AAC7E,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,gBAAgB,GAAG,0BAA0B,EAAE,CAErG"}
@@ -14,14 +14,37 @@
14
14
  *
15
15
  * ## Signing
16
16
  *
17
- * Requests are unsigned, exactly like the aws lexicon's read client. Real AWS
18
- * rejects them; an emulator with an endpoint override does not. This is
19
- * therefore an emulator-and-test transport today, and the honest consequence is
20
- * encoded in {@link credentialsAvailable}: with no credentials and no endpoint
21
- * override, the observation reports every entity NOT-OBSERVED with
22
- * `no-credentials` rather than issuing a request that will fail. The signed
23
- * path lands when SigV4 lands in `lexicons/aws/src/api/read-client.ts`, which
24
- * is where it belongs — one implementation, not two.
17
+ * SigV4 lives once, in `lexicons/aws/src/api/sigv4.ts` (#1686). This module
18
+ * does not import it. A cedar → aws dependency edge would make the vendor-
19
+ * neutral lexicon unbuildable without the AWS one, which is the same rule that
20
+ * kept `src/avp/embed.ts` free of the aws lexicon: the seam is the data shape.
21
+ * So the signer arrives as a function on {@link AvpClientOptions}, typed here
22
+ * structurally against what the aws lexicon exports, and a project holding both
23
+ * lexicons wires them in one line:
24
+ *
25
+ * ```ts
26
+ * import { signRequest } from "@intentius/chant-lexicon-aws";
27
+ * import { describeAvpResources } from "@intentius/chant-lexicon-cedar";
28
+ *
29
+ * await describeAvpResources({
30
+ * environment,
31
+ * entityNames,
32
+ * entities,
33
+ * client: { region: "us-west-2", signer: signRequest },
34
+ * });
35
+ * ```
36
+ *
37
+ * Three cases go out unsigned, byte for byte as they did before signing
38
+ * existed — the credential scope of {@link regionScope} and nothing more:
39
+ *
40
+ * - **No signer.** The default, and the reason `credentialsAvailable` still
41
+ * gates the readers: a caller that wires nothing in is still an
42
+ * emulator-and-test transport, and real AWS still rejects it.
43
+ * - **No credentials.** A signer with nothing to sign with does not run.
44
+ * - **An endpoint override.** An emulator does not verify signatures, and
45
+ * signing against one would make every local lane need credentials to read
46
+ * what it just deployed. `signEndpointOverride` opts back in for an
47
+ * override that *is* real AWS — a VPC endpoint, a signing proxy.
25
48
  */
26
49
  /** Injectable HTTP, mirroring `AwsReadHttp` in the aws lexicon so tests avoid the network. */
27
50
  export type AvpHttp = (url: string, init: {
@@ -40,6 +63,38 @@ export declare class AvpReadError extends Error {
40
63
  /** The service's own error code (`ResourceNotFoundException`, `AccessDeniedException`, …). */
41
64
  code?: string | undefined);
42
65
  }
66
+ /**
67
+ * A resolved credential set — the aws lexicon's `AwsCredentials`, restated so
68
+ * that this file compiles without it. `sessionToken` is present for STS/role
69
+ * credentials.
70
+ */
71
+ export interface AvpCredentials {
72
+ accessKeyId: string;
73
+ secretAccessKey: string;
74
+ sessionToken?: string;
75
+ }
76
+ /** A function that decides what to sign with; `undefined` means "nothing to". */
77
+ export type AvpCredentialResolver = () => AvpCredentials | undefined;
78
+ /** Either literal credentials or a resolver for them. */
79
+ export type AvpCredentialSource = AvpCredentials | AvpCredentialResolver;
80
+ /** One request to sign — the aws lexicon's `SigV4Request`, restated. */
81
+ export interface AvpSignableRequest {
82
+ method: string;
83
+ url: string;
84
+ headers: Record<string, string>;
85
+ body: string;
86
+ service: string;
87
+ region: string;
88
+ credentials: AvpCredentials;
89
+ /** Signing clock. Injected by tests; otherwise now. */
90
+ now?: Date;
91
+ }
92
+ /**
93
+ * The signing seam. `signRequest` from `@intentius/chant-lexicon-aws` satisfies
94
+ * this as it stands — the shapes above are its own, restated rather than
95
+ * imported, so cedar keeps no edge to the aws lexicon.
96
+ */
97
+ export type AvpSigner = (request: AvpSignableRequest) => Record<string, string>;
43
98
  export interface AvpClientOptions {
44
99
  /** Endpoint override (an emulator, or a VPC endpoint). Omit for real AWS hosts. */
45
100
  endpoint?: string;
@@ -49,7 +104,29 @@ export interface AvpClientOptions {
49
104
  signal?: AbortSignal;
50
105
  /** Environment to read credentials from. Defaults to `process.env`; injectable for tests. */
51
106
  env?: Record<string, string | undefined>;
107
+ /** SigV4, injected. Omitted, every request goes out unsigned as it always did. */
108
+ signer?: AvpSigner;
109
+ /**
110
+ * What to sign with: literal credentials, or a resolver that decides. Omitted,
111
+ * the environment answers; when it has nothing, no signature is produced.
112
+ */
113
+ credentials?: AvpCredentialSource;
114
+ /** Sign even against an endpoint override — for an override that is real AWS. */
115
+ signEndpointOverride?: boolean;
116
+ /** Signing clock. Injected by tests so a signature is reproducible. */
117
+ now?: Date;
52
118
  }
119
+ /**
120
+ * Credentials for a request: explicit → environment → absent.
121
+ *
122
+ * The same rule the aws lexicon's `resolveCredentials` applies, and for the same
123
+ * reasons: an injected resolver is authoritative and its refusal is not
124
+ * second-guessed against the environment, and a half-set environment is absent
125
+ * rather than a signature that cannot verify. A caller with a profile file, IMDS
126
+ * or a container credential endpoint resolves those itself and passes the result
127
+ * in — that is what the resolver form is for.
128
+ */
129
+ export declare function resolveAvpCredentials(source?: AvpCredentialSource, env?: Record<string, string | undefined>): AvpCredentials | undefined;
53
130
  /** Service host for AVP, honouring an endpoint override. */
54
131
  export declare function avpUrl(endpoint?: string, region?: string): string;
55
132
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/avp/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH,8FAA8F;AAC9F,MAAM,MAAM,OAAO,GAAG,CACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC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