@intentius/chant-lexicon-cedar 0.44.8 → 0.44.10

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 (149) hide show
  1. package/README.md +106 -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/codegen/docs-dogwood.d.ts +21 -0
  9. package/dist/codegen/docs-dogwood.d.ts.map +1 -0
  10. package/dist/codegen/docs.d.ts.map +1 -1
  11. package/dist/codegen/package.d.ts.map +1 -1
  12. package/dist/config.d.ts +25 -0
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/dogwood/cli.d.ts +247 -0
  15. package/dist/dogwood/cli.d.ts.map +1 -0
  16. package/dist/dogwood/event-schema.d.ts +161 -0
  17. package/dist/dogwood/event-schema.d.ts.map +1 -0
  18. package/dist/dogwood/index.d.ts +39 -0
  19. package/dist/dogwood/index.d.ts.map +1 -0
  20. package/dist/dogwood/macros.d.ts +96 -0
  21. package/dist/dogwood/macros.d.ts.map +1 -0
  22. package/dist/dogwood/policy.d.ts +120 -0
  23. package/dist/dogwood/policy.d.ts.map +1 -0
  24. package/dist/dogwood/replay-activity.d.ts +196 -0
  25. package/dist/dogwood/replay-activity.d.ts.map +1 -0
  26. package/dist/dogwood/replay-op.d.ts +165 -0
  27. package/dist/dogwood/replay-op.d.ts.map +1 -0
  28. package/dist/dogwood/scan.d.ts +109 -0
  29. package/dist/dogwood/scan.d.ts.map +1 -0
  30. package/dist/dogwood/serialize.d.ts +66 -0
  31. package/dist/dogwood/serialize.d.ts.map +1 -0
  32. package/dist/dogwood/temporal.d.ts +259 -0
  33. package/dist/dogwood/temporal.d.ts.map +1 -0
  34. package/dist/dogwood/trace.d.ts +215 -0
  35. package/dist/dogwood/trace.d.ts.map +1 -0
  36. package/dist/dogwood/upstream.d.ts +41 -0
  37. package/dist/dogwood/upstream.d.ts.map +1 -0
  38. package/dist/dogwood/window.d.ts +73 -0
  39. package/dist/dogwood/window.d.ts.map +1 -0
  40. package/dist/index.d.ts +12 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/integrity.json +15 -3
  43. package/dist/lint/audit-catalog.d.ts.map +1 -1
  44. package/dist/lint/post-synth/dogwood-helpers.d.ts +63 -0
  45. package/dist/lint/post-synth/dogwood-helpers.d.ts.map +1 -0
  46. package/dist/lint/post-synth/dwdc010.d.ts +25 -0
  47. package/dist/lint/post-synth/dwdc010.d.ts.map +1 -0
  48. package/dist/lint/post-synth/dwdc011.d.ts +19 -0
  49. package/dist/lint/post-synth/dwdc011.d.ts.map +1 -0
  50. package/dist/lint/post-synth/dwdc012.d.ts +21 -0
  51. package/dist/lint/post-synth/dwdc012.d.ts.map +1 -0
  52. package/dist/lint/post-synth/dwdc013.d.ts +33 -0
  53. package/dist/lint/post-synth/dwdc013.d.ts.map +1 -0
  54. package/dist/lint/post-synth/dwde010.d.ts +32 -0
  55. package/dist/lint/post-synth/dwde010.d.ts.map +1 -0
  56. package/dist/lint/post-synth/dwde011.d.ts +33 -0
  57. package/dist/lint/post-synth/dwde011.d.ts.map +1 -0
  58. package/dist/lint/post-synth/dwds010.d.ts +24 -0
  59. package/dist/lint/post-synth/dwds010.d.ts.map +1 -0
  60. package/dist/lint/post-synth/index.d.ts.map +1 -1
  61. package/dist/manifest.json +1 -1
  62. package/dist/okf/index.md +7 -0
  63. package/dist/okf/rules/DWDC010.md +11 -0
  64. package/dist/okf/rules/DWDC011.md +11 -0
  65. package/dist/okf/rules/DWDC012.md +11 -0
  66. package/dist/okf/rules/DWDC013.md +15 -0
  67. package/dist/okf/rules/DWDE010.md +11 -0
  68. package/dist/okf/rules/DWDE011.md +11 -0
  69. package/dist/okf/rules/DWDS010.md +11 -0
  70. package/dist/okf/types/Policy.md +1 -0
  71. package/dist/op/activities/index.d.ts +18 -0
  72. package/dist/op/activities/index.d.ts.map +1 -0
  73. package/dist/plugin.d.ts.map +1 -1
  74. package/dist/policy-text.d.ts +53 -0
  75. package/dist/policy-text.d.ts.map +1 -0
  76. package/dist/rules/dogwood-helpers.ts +139 -0
  77. package/dist/rules/dwdc010.ts +62 -0
  78. package/dist/rules/dwdc011.ts +61 -0
  79. package/dist/rules/dwdc012.ts +46 -0
  80. package/dist/rules/dwdc013.ts +64 -0
  81. package/dist/rules/dwde010.ts +130 -0
  82. package/dist/rules/dwde011.ts +108 -0
  83. package/dist/rules/dwds010.ts +46 -0
  84. package/dist/serializer.d.ts +10 -18
  85. package/dist/serializer.d.ts.map +1 -1
  86. package/dist/skills/chant-cedar-authoring.md +180 -0
  87. package/dist/skills/chant-cedar-avp-embedding.md +125 -0
  88. package/dist/skills/chant-cedar-dogwood.md +327 -0
  89. package/dist/skills/chant-cedar-meta-policy.md +119 -0
  90. package/package.json +7 -2
  91. package/src/agentcore/embed.test.ts +254 -0
  92. package/src/agentcore/embed.ts +399 -0
  93. package/src/agentcore/enforcement.test.ts +43 -0
  94. package/src/agentcore/enforcement.ts +92 -0
  95. package/src/agentcore/scan.ts +119 -0
  96. package/src/codegen/docs-dogwood.ts +1119 -0
  97. package/src/codegen/docs.ts +66 -1
  98. package/src/codegen/package.ts +3 -2
  99. package/src/config.test.ts +12 -0
  100. package/src/config.ts +28 -0
  101. package/src/dogwood/cli.test.ts +513 -0
  102. package/src/dogwood/cli.ts +666 -0
  103. package/src/dogwood/event-schema.test.ts +218 -0
  104. package/src/dogwood/event-schema.ts +318 -0
  105. package/src/dogwood/index.ts +271 -0
  106. package/src/dogwood/macros.test.ts +104 -0
  107. package/src/dogwood/macros.ts +229 -0
  108. package/src/dogwood/policy.test.ts +94 -0
  109. package/src/dogwood/policy.ts +141 -0
  110. package/src/dogwood/replay-activity.test.ts +481 -0
  111. package/src/dogwood/replay-activity.ts +506 -0
  112. package/src/dogwood/replay-op.ts +242 -0
  113. package/src/dogwood/scan.ts +287 -0
  114. package/src/dogwood/serialize.test.ts +331 -0
  115. package/src/dogwood/serialize.ts +246 -0
  116. package/src/dogwood/temporal.test.ts +272 -0
  117. package/src/dogwood/temporal.ts +592 -0
  118. package/src/dogwood/testdata/custom-kinds.dwschema +17 -0
  119. package/src/dogwood/testdata/default-macros.dw +23 -0
  120. package/src/dogwood/testdata/lowered-read-after-login.json +13 -0
  121. package/src/dogwood/testdata/max-window-raised.dwschema +25 -0
  122. package/src/dogwood/testdata/pinned.dwschema +31 -0
  123. package/src/dogwood/testdata/read-after-login.cedarschema +20 -0
  124. package/src/dogwood/testdata/read-after-login.dw +17 -0
  125. package/src/dogwood/testdata/temporal-policies.dw +53 -0
  126. package/src/dogwood/trace.test.ts +231 -0
  127. package/src/dogwood/trace.ts +471 -0
  128. package/src/dogwood/upstream.ts +41 -0
  129. package/src/dogwood/window.ts +124 -0
  130. package/src/index.ts +76 -0
  131. package/src/lint/audit-catalog.ts +64 -0
  132. package/src/lint/post-synth/dogwood-helpers.ts +139 -0
  133. package/src/lint/post-synth/dwd-post-synth.test.ts +374 -0
  134. package/src/lint/post-synth/dwdc010.ts +62 -0
  135. package/src/lint/post-synth/dwdc011.ts +61 -0
  136. package/src/lint/post-synth/dwdc012.ts +46 -0
  137. package/src/lint/post-synth/dwdc013.ts +64 -0
  138. package/src/lint/post-synth/dwde-post-synth.test.ts +368 -0
  139. package/src/lint/post-synth/dwde010.ts +130 -0
  140. package/src/lint/post-synth/dwde011.ts +108 -0
  141. package/src/lint/post-synth/dwds010.ts +46 -0
  142. package/src/lint/post-synth/index.ts +14 -0
  143. package/src/lint/post-synth/post-synth.test.ts +7 -3
  144. package/src/op/activities/index.ts +27 -0
  145. package/src/plugin.test.ts +3 -2
  146. package/src/plugin.ts +30 -0
  147. package/src/policy-text.ts +128 -0
  148. package/src/serializer.ts +71 -109
  149. package/src/skills/chant-cedar-dogwood.md +327 -0
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Temporal windows — the one thing dogwood's past-only operators cannot omit.
3
+ *
4
+ * `formerly`, `previous` and `since` all take a mandatory `within <n><unit>`
5
+ * clause; the unit is one of `s`, `m`, `h`, `d` and nothing else. Upstream's
6
+ * `temporal/grammar.pest` spells that out:
7
+ *
8
+ * ```
9
+ * within = { "within" ~ within_payload }
10
+ * within_payload = { param_ref | (integer ~ time_unit) }
11
+ * time_unit = { "s" | "m" | "h" | "d" }
12
+ * ```
13
+ *
14
+ * Typing the window as a value rather than as free text is what makes
15
+ * "a `formerly` without a window" unrepresentable in the builders (#1658's
16
+ * third lint wall) — you cannot call {@link formerly} without one.
17
+ *
18
+ * The `param_ref` arm (`within ?w`) is legal only inside a macro body; it is
19
+ * modelled by {@link MacroWindow} rather than by this type, so an ordinary
20
+ * policy cannot accidentally emit a sigil the expander would reject.
21
+ */
22
+ /** The four units upstream's grammar admits. Anything else does not parse. */
23
+ export type TimeUnit = "s" | "m" | "h" | "d";
24
+ /** A `within` payload: a positive integer and one of the four units. */
25
+ export interface TemporalWindow {
26
+ readonly value: number;
27
+ readonly unit: TimeUnit;
28
+ }
29
+ /**
30
+ * A window as written in a `.dw` file (`"1h"`, `"30m"`, `"7d"`).
31
+ *
32
+ * The template-literal arm means `formerly("1h", …)` type-checks and
33
+ * `formerly("1w", …)` does not, without anyone writing a runtime check first.
34
+ */
35
+ export type WindowLike = TemporalWindow | `${number}${TimeUnit}`;
36
+ /**
37
+ * `within ?w` — a window a macro takes as a parameter.
38
+ *
39
+ * The other arm of upstream's `within_payload`. Legal only inside a macro
40
+ * body; the expander resolves it against the call site's bare interval
41
+ * argument (`once(1h, …)`), which is why the call side has no `within`.
42
+ */
43
+ export interface WindowParam {
44
+ readonly param: string;
45
+ }
46
+ /** Either a concrete window or a macro parameter standing in for one. */
47
+ export type WindowValue = TemporalWindow | WindowParam;
48
+ /** True when the payload is `?w` rather than `1h`. */
49
+ export declare function isWindowParam(value: WindowValue): value is WindowParam;
50
+ /**
51
+ * `within ?w` inside a macro body.
52
+ *
53
+ * Exported from `./macros.ts` too, which is where the sigil rules are
54
+ * documented and where a reader looking for it will be.
55
+ */
56
+ export declare function windowParam(param: string): WindowParam;
57
+ /** Narrow a {@link WindowLike} to the structured form, validating as it goes. */
58
+ export declare function window(value: WindowLike): TemporalWindow;
59
+ /** `1h` — the surface form, in a `within` clause or as a macro-call argument. */
60
+ export declare function renderWindow(value: WindowLike): string;
61
+ /** A `within` payload: `1h`, or the `?w` a macro body defers to its call site. */
62
+ export declare function renderWindowValue(value: WindowValue): string;
63
+ /** Narrow a window argument, letting a `?w` parameter through unchanged. */
64
+ export declare function windowValue(value: WindowLike | WindowParam): WindowValue;
65
+ /** The window in seconds, so `90m` and `1h` are comparable to a `max_window`. */
66
+ export declare function windowSeconds(value: WindowLike): number;
67
+ /**
68
+ * Upstream's fallback cap. `ServiceSchema::defaults()` and an event schema
69
+ * with no `max_window` directive both look back at most 24 hours, per the
70
+ * comment atop `event_schema/grammar.pest` ("absent → a 24h default").
71
+ */
72
+ export declare const DEFAULT_MAX_WINDOW: TemporalWindow;
73
+ //# sourceMappingURL=window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../src/dogwood/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7C,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,GAAG,MAAM,GAAG,QAAQ,EAAE,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,WAAW,CAAC;AAKvD,sDAAsD;AACtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,IAAI,WAAW,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAKtD;AAKD,iFAAiF;AACjF,wBAAgB,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAgBxD;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAGtD;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAE5D;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,CAExE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAGvD;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAyC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -18,6 +18,18 @@ export { CedarGenerator, loadActionConstants, sanitizeName, CEDAR_PACKAGE } from
18
18
  export type { CedarGenerateOptions, CedarGenerateResult } from "./import/generator.js";
19
19
  export { CedarTemplateParser, CedarTemplateGenerator } from "./import/adapter.js";
20
20
  export { detectTemplate } from "./detect.js";
21
+ export { agentCoreStatement, agentCorePolicyDefinition, agentCorePolicyResource, agentCorePolicySet, agentCoreStagedPolicy, agentCorePolicyName, AGENTCORE_NAME_PATTERN, AGENTCORE_STATEMENT_MIN, AGENTCORE_STATEMENT_MAX, } from "./agentcore/embed.js";
22
+ export type { AgentCoreCedarDefinition, AgentCoreEmbedOptions, AgentCoreLanguageDefinition, AgentCorePolicyDefinition, AgentCorePolicyResource, AgentCorePolicySource, AgentCoreStagedPolicy, } from "./agentcore/embed.js";
23
+ export { AGENTCORE_ENFORCEMENT, describeStage, enforcementMode, enforcementStage, isEnforcing, } from "./agentcore/enforcement.js";
24
+ export type { AgentCoreEnforcementMode, AgentCoreStage } from "./agentcore/enforcement.js";
25
+ export { embeddedAgentCoreDefinitions, embeddedAgentCorePolicyStatements } from "./agentcore/scan.js";
26
+ export type { EmbeddedAgentCoreDefinition, EmbeddedAgentCoreStatement } from "./agentcore/scan.js";
27
+ export * as dogwood from "./dogwood/index.js";
28
+ export { DOGWOOD_EVENT_SCHEMA_FILENAME, DOGWOOD_EVENT_SCHEMA_TYPE, DOGWOOD_MACRO_FILENAME, DOGWOOD_MACRO_LIBRARY_TYPE, DOGWOOD_POLICY_FILENAME, DOGWOOD_POLICY_TYPE, TemporalEventSchema, TemporalMacroLibrary, TemporalPolicy, } from "./dogwood/policy.js";
29
+ export type { EventSchemaProps, MacroLibraryProps, TemporalPolicyProps } from "./dogwood/policy.js";
30
+ export { DOGWOOD_UPSTREAM } from "./dogwood/upstream.js";
31
+ export { DEFAULT_REPLAY_REPORT_PATH, PolicyReplayOp, dogwoodReplayReportStep, dogwoodReplayStep, } from "./dogwood/replay-op.js";
32
+ export type { DogwoodReplayReportStepOpts, DogwoodReplayStepOpts, PolicyReplayOpConfig, PolicyReplayOpResources, } from "./dogwood/replay-op.js";
21
33
  export { rules as cedarLintRules } from "./lint/rules/index.js";
22
34
  export { packageLexicon } from "./codegen/package.js";
23
35
  export type { PackageOptions, PackageResult } from "./codegen/package.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;A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AAa,EAAE,MAAM,mBAAmB,CAAC;AAIvE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACzF,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIpE,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC7F,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAIzE,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpF,YAAY,EACV,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAG/B,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,cAAc,mBAAmB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "a3b6314f19c537ad8c8bcc2953e4a944540fb2cbf364b7bacb00e9725a2363f0",
4
+ "manifest.json": "31dbc6f8b54821086945282b3bb91b412af4692a167a827265f0a092e45eb5c2",
5
5
  "meta.json": "b218779260169a193882aeee76e5ac559588f1682657a001fb0982cffb5843fc",
6
6
  "types/index.d.ts": "9e53a1cb3c9ee38f9de2f3c0db9cc28a0b67c3649be410c341e2451b9b0076cd",
7
7
  "rules/policy-shape.ts": "1654730d188b7163dbad3051c75a562198a96eda6d36ce35701f2b729bf45194",
@@ -16,7 +16,19 @@
16
16
  "rules/ceds010.ts": "215e14de2b84d935ad9551d37c3c06374e5452a5b3f1d7408dc59cd8c2ef1b33",
17
17
  "rules/ceds011.ts": "07984e364b431203a34b42de481fad4fc16d2b838f3fa358726759f4a3ebbfe5",
18
18
  "rules/ceds012.ts": "a447c6114d36abf2eca6f90143b06c4b20ede111c777cb04c70024fc4ad93172",
19
- "rules/wasm-helpers.ts": "c4c3def1669a1818d19ff1864e78bdcbf956da31ca1a6adde7751830765dad6a"
19
+ "rules/dogwood-helpers.ts": "7f24a385396255ccfdf85b3e493a48b4d7d3d191a28e0ff0341a5dd47b8cff2c",
20
+ "rules/dwdc010.ts": "0c619de07981b4b11bfa425bf4032142af1f90f255d3058a71551956124123f2",
21
+ "rules/dwdc011.ts": "88919f0d7460993b58e1883d0bfd48f6a8c8f4bc2d22c71902f9b0ee7b9edd07",
22
+ "rules/dwdc012.ts": "15434083488c5e617835e0ac3027cf92657c734076463abd526332f460cc7e8d",
23
+ "rules/dwdc013.ts": "1921d352c3cc0caeebdc679d1a241adc779a8d2dd62e97a272005b28dd3f2d9d",
24
+ "rules/dwde010.ts": "b39ecb0427fc19d9548a26dcd2b9e99d4eab289f57196da24374743c85553fb1",
25
+ "rules/dwde011.ts": "5e7f7dbcd9c581bba614fd5c17dcf1282a0b59caef931997c954cea46522251c",
26
+ "rules/dwds010.ts": "4939f7eb012998d7e27238db777ed7fec2721c2e25df0daec457ff2c62bfa648",
27
+ "rules/wasm-helpers.ts": "c4c3def1669a1818d19ff1864e78bdcbf956da31ca1a6adde7751830765dad6a",
28
+ "skills/chant-cedar-authoring.md": "1b036a72ef13342d402d0de1a68bec0a6f32365ab8485b95f63a971277fd249f",
29
+ "skills/chant-cedar-avp-embedding.md": "1096cc318374dc0683fae289040b089ffc0c7fa029c6b07d4acc19ebcd118b54",
30
+ "skills/chant-cedar-meta-policy.md": "050b310a87196a48c827f1129698e4c6bbcd96dc963782e22bf1a640bbc20a1a",
31
+ "skills/chant-cedar-dogwood.md": "fc8c9a2ea9cd7bf87037c156b0b419397d46fbf5cd201c09be721249ac91b8da"
20
32
  },
21
- "composite": "050414f43e9bfd30e46d4249e5493401c0dcbb7de270eb28980dbf7ec83ea9b7"
33
+ "composite": "dc7485b6a8f3831e6564a5ed5402ba4e0362065da05b54f481f29e3aabdba1a9"
22
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAoGtD,CAAC"}
1
+ {"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAoKtD,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Turning a build's emitted files into `dogwood` CLI invocations (#1659).
3
+ *
4
+ * The DWDE checks both need the same thing: which of the emitted `.dw` files
5
+ * is a policy set, which is a macro library, which `.cedarschema` backs
6
+ * `--policy-schema`, and which `.dwschema` backs `--event-schema`. Planning
7
+ * that once here keeps the two checks from disagreeing about what they ran —
8
+ * DWDE010 validates a bundle and DWDE011 lowers the *same* bundle, and a
9
+ * finding from one that names different inputs than the other would be a
10
+ * puzzle rather than a report.
11
+ *
12
+ * Excluded from check auto-discovery by the "helper" filename filter.
13
+ */
14
+ import type { PostSynthContext } from "@intentius/chant/lint/post-synth";
15
+ import type { DogwoodBundle } from "../../dogwood/cli.js";
16
+ /** One planned invocation: the files, and the names to blame in a finding. */
17
+ export interface PreparedBundle {
18
+ lexicon: string;
19
+ /** The `.dw` policy set filename. */
20
+ source: string;
21
+ /** The `.cedarschema` filename passed as `--policy-schema`. */
22
+ policySchemaSource: string;
23
+ /** The `.dwschema` filename passed as `--event-schema`, when one was emitted. */
24
+ eventSchemaSource?: string;
25
+ bundle: DogwoodBundle;
26
+ }
27
+ /** What the CLI-gated checks should do with this build. */
28
+ export interface DogwoodRunPlan {
29
+ /** True when the build emitted a `.dw` policy set at all. */
30
+ hasPolicies: boolean;
31
+ /** Every invocation to make. Empty when {@link blocked} is set. */
32
+ bundles: PreparedBundle[];
33
+ /** Why nothing can be run, when policies exist but a required input does not. */
34
+ blocked?: string;
35
+ /** The lexicon the `.dw` output came from, for a finding that names no file. */
36
+ lexicon?: string;
37
+ }
38
+ /**
39
+ * A `.dw` file holding only `def` declarations is a macro library, not a
40
+ * policy set.
41
+ *
42
+ * By structure rather than by filename: the serializer's default is
43
+ * `macros.dw`, but `MacroLibraryProps.filename` overrides it, and `chant
44
+ * audit` runs over trees chant never wrote. A policy set is a file with a
45
+ * `permit` or `forbid` head in it — upstream's policy grammar has no third
46
+ * effect — and a set with inlined macros still has one.
47
+ */
48
+ export declare function looksLikeMacroLibrary(text: string): boolean;
49
+ /**
50
+ * Plan every `dogwood` invocation this build calls for.
51
+ *
52
+ * One bundle per policy set per emitted event schema. A build with several
53
+ * `.dwschema` files means several services, and `--event-schema` takes exactly
54
+ * one file, so the set is run against each and every finding names the schema
55
+ * it was found under — the alternative is picking one silently and reporting
56
+ * against a schema the reader did not choose. Macro libraries do combine: a
57
+ * library is a sequence of `def`s, so several concatenate into the one file
58
+ * `--macros` accepts.
59
+ */
60
+ export declare function planDogwoodRuns(ctx: PostSynthContext): DogwoodRunPlan;
61
+ /** How a finding names the inputs a run was made with. */
62
+ export declare function describeBundle(prepared: PreparedBundle): string;
63
+ //# sourceMappingURL=dogwood-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dogwood-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dogwood-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,WAAW,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3D;AA0BD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,GAAG,cAAc,CAyCrE;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAI/D"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * DWDC010: a temporal predicate must name an event kind the schema declares
3
+ *
4
+ * Upstream rejects this outright — a predicate naming an undeclared kind fails
5
+ * `dogwood validate` with code `extension`: "predicate
6
+ * `Drupe::Action::\"Read\"::nosuchkind` does not name a declared event (no
7
+ * event kind `nosuchkind` derived for action `Read`)". Catching it in
8
+ * TypeScript is the point of the split epic #1646 drew: everything answerable
9
+ * without the binary runs always and gates, and this one is answerable.
10
+ *
11
+ * The check is on the event *kind*, not the action, and that is not a
12
+ * shortcut. Upstream's `.dwschema` grammar declares events against a symbolic
13
+ * action binder — `decision event <A>::request { … }` — so the file names no
14
+ * actions at all and cannot be asked whether one exists. The action half of
15
+ * that upstream error comes from the Cedar action schema
16
+ * (`--policy-schema`), which is #1659's CLI-gated leg.
17
+ *
18
+ * Silent when no `.dwschema` was emitted: with none supplied,
19
+ * `ServiceSchema::defaults()` decides the kinds at the far end, and guessing
20
+ * that a project's out-of-band schema matches upstream's default would fail
21
+ * builds for a policy set that is fine.
22
+ */
23
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
24
+ export declare const dwdc010: PostSynthCheck;
25
+ //# sourceMappingURL=dwdc010.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwdc010.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwdc010.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAoCrB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * DWDC011: a temporal window must fit inside the schema's `max_window`
3
+ *
4
+ * `formerly within 48h` under a 24h cap is an upstream validation error —
5
+ * "temporal window `48h` exceeds the maximum allowed window `24h` set by the
6
+ * event schema's `max_window`" — and it is arithmetic, so it needs no binary.
7
+ *
8
+ * Unlike DWDC010 this fires with no `.dwschema` emitted, because the cap
9
+ * applies either way: `ServiceSchema::defaults()` caps look-back at 24h, and
10
+ * so does an emitted schema that omits the directive. Where several schemas
11
+ * are emitted the tightest cap wins — a window one consumer accepts and
12
+ * another rejects is still a window that will be rejected.
13
+ *
14
+ * Macro-call intervals count. `once(48h, …)` expands to `formerly within 48h`
15
+ * through the default library's `within ?w`, so it looks back exactly as far.
16
+ */
17
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
18
+ export declare const dwdc011: PostSynthCheck;
19
+ //# sourceMappingURL=dwdc011.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwdc011.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwdc011.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAS9G,eAAO,MAAM,OAAO,EAAE,cAmCrB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * DWDC012: `formerly`, `previous` and `since` carry a mandatory window
3
+ *
4
+ * Upstream's grammar makes `within` non-optional on all three:
5
+ *
6
+ * ```
7
+ * once_op = { "formerly" ~ within ~ atom }
8
+ * previous_op = { "previous" ~ within ~ atom }
9
+ * conjunct_or_since = { neg_conjunct ~ ("since" ~ within ~ atom)? }
10
+ * ```
11
+ *
12
+ * The typed builders make this unrepresentable — `formerly(window, body)` has
13
+ * nowhere to put a missing window — which is most of the fix. This check is
14
+ * the other part: `raw()` exists as an escape hatch, a hand-written `.dw` can
15
+ * be built by any other tool, and `chant audit` runs over files chant never
16
+ * emitted. A wall that only holds for the path that cannot breach it is not
17
+ * a wall.
18
+ */
19
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
20
+ export declare const dwdc012: PostSynthCheck;
21
+ //# sourceMappingURL=dwdc012.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwdc012.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwdc012.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAwBrB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * DWDC013: a temporal statement embedded in AgentCore needs its event schema
3
+ * registered
4
+ *
5
+ * `AWS::BedrockAgentCore::Policy` carries one string. When that string is `.dw`
6
+ * text — `Definition.Policy.Statement`, the language-agnostic arm — the policy
7
+ * engine at the other end has to know what an event *is* before any temporal
8
+ * predicate in it can match: which kinds exist, what fields they carry, and
9
+ * what is pinned to the deciding request. That is the `.dwschema` half of the
10
+ * schema, and the resource has no property to put it in.
11
+ *
12
+ * So a build that embeds temporal text and emits no event schema has shipped
13
+ * half a policy. Nothing fails: the statement deploys, the predicates match
14
+ * nothing, and a `formerly`-guarded permit stops granting — or a
15
+ * `formerly`-guarded forbid stops denying, which is the direction that
16
+ * matters. That is the silent trap this check exists for — the emitted schema
17
+ * is the artifact that makes the other half reviewable, whether it is
18
+ * registered with the engine out of band or shipped to a `dogwood validate`
19
+ * run.
20
+ *
21
+ * Warning rather than error, because "not emitted here" is not the same as
22
+ * "does not exist": a project may register the service schema through a
23
+ * separate pipeline, and failing that build would be chant asserting a fact it
24
+ * cannot check. Emitting one with `TemporalEventSchema` silences it and makes
25
+ * the assumption visible in the diff.
26
+ *
27
+ * The complement of DWDC010, which asks whether the kinds a `.dw` file names
28
+ * are declared. This one asks the prior question, and only of statements that
29
+ * left the `.dw` file behind.
30
+ */
31
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
32
+ export declare const dwdc013: PostSynthCheck;
33
+ //# sourceMappingURL=dwdc013.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwdc013.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwdc013.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,OAAO,EAAE,cA6BrB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * DWDE010: the emitted `.dw` set validates clean under `dogwood validate`
3
+ *
4
+ * The CLI-gated half of the epic's validation split. Everything the DWDC walls
5
+ * ask is answerable in TypeScript and gates unconditionally; everything else —
6
+ * macro expansion, the temporal type checker, the Cedar body checked against
7
+ * the action schema *through upstream's own frontend* — needs upstream's Rust
8
+ * frontend, which ships as a binary and nothing else. No npm package, no wasm
9
+ * build, no bindings.
10
+ *
11
+ * So this check has two modes and says which one it is in:
12
+ *
13
+ * - **Binary present.** Runs `dogwood validate --format json` over each
14
+ * emitted policy set and reports every finding as an error. Byte-offset
15
+ * labels come through as byte offsets — see `../../dogwood/cli.ts` for why
16
+ * they are not converted to line/column.
17
+ * - **Binary absent.** Exactly one `info` finding naming the binary, where
18
+ * chant looked, and this issue. The epic's words are "an explicit,
19
+ * issue-linked exception, not a silent one" — a check that quietly passes
20
+ * when it could not run is claiming a guarantee it did not make, which is
21
+ * the same failure CEDE010's no-schema advisory exists to avoid.
22
+ *
23
+ * A run that could not be made at all — a spawn failure, an unknown flag, JSON
24
+ * in a shape this adapter does not know — is `warning`, not `error`. Upstream
25
+ * is a read-only squash-sync mirror with no tags and no changelog, and a flag
26
+ * rename in a sync would otherwise fail every build that has the binary
27
+ * installed. The adapter never reads exit 2 as "rejected" on its own for the
28
+ * same reason: clap spends that code on usage errors too.
29
+ */
30
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
31
+ export declare const dwde010: PostSynthCheck;
32
+ //# sourceMappingURL=dwde010.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwde010.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwde010.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAU9G,eAAO,MAAM,OAAO,EAAE,cA0FrB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * DWDE011: the lowered Cedar body validates clean under Cedar's own validator
3
+ *
4
+ * The epic's stated design for the non-temporal half: chant does not
5
+ * re-implement lowering — `dogwood lower` produces the analyzable plain-Cedar
6
+ * form, and a reimplementation would drift — but once that form exists, Cedar's
7
+ * own validator is the thing that judges it. The #1657 verification put all 86
8
+ * upstream example bundles through this exact path and every one parsed and
9
+ * validated clean in strict mode, which is what makes a finding here mean
10
+ * something: the lowered output is genuinely plain Cedar, so a validation error
11
+ * is the policy's, not the pipeline's.
12
+ *
13
+ * What this catches that DWDE010 does not is narrow but real. `dogwood
14
+ * validate` type-checks through upstream's vendored Cedar; this runs the
15
+ * *published* `@cedar-policy/cedar-wasm` over the same artifacts. A body that
16
+ * upstream's pinned Cedar accepts and the Cedar the rest of chant validates
17
+ * against rejects is exactly the drift the pin exists to make visible — and the
18
+ * augmented schema, with its hoisted `context.*` temporal slots, is the form a
19
+ * downstream Cedar policy store will actually receive.
20
+ *
21
+ * The cedar-wasm traps from #1648 all apply and are handled in
22
+ * `./wasm-helpers.ts`: `type: "success"` means validation *ran*, not that it
23
+ * passed; `validationErrors` comes back in a different order almost every call
24
+ * and is sorted before anything reads it; a malformed call throws rather than
25
+ * returning a failure answer.
26
+ *
27
+ * Silent when `lower` did not run — the binary is absent, or no action schema
28
+ * was emitted. Both cases are DWDE010's advisory to report, once, rather than
29
+ * twice in different words.
30
+ */
31
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
32
+ export declare const dwde011: PostSynthCheck;
33
+ //# sourceMappingURL=dwde011.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwde011.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwde011.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAK9G,eAAO,MAAM,OAAO,EAAE,cAwErB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * DWDS010: an emitted event schema with no pinned field widens every predicate
3
+ *
4
+ * The #1657 verification is specific about this one. `ServiceSchema::defaults()`
5
+ * — what runs when nobody passes `--event-schema` — uses
6
+ * `configuration/event-schemas/pinned.dwschema`, which carries
7
+ * `pin callerPrincipal: principalType(A) = principal` on every kind. Every
8
+ * temporal predicate is therefore correlated to the deciding request's
9
+ * principal, and events from other principals are invisible.
10
+ *
11
+ * Supplying any event schema opts out of that default wholesale. So a schema
12
+ * emitted without a pin does not merely "not add" a correlation: it removes
13
+ * one the policy author very likely assumed, and every `formerly` in the set
14
+ * starts matching other principals' events. That is a legitimate design —
15
+ * cross-principal correlation is the reason to write your own schema — but it
16
+ * is a decision, and a decision nobody can see in a diff is one nobody made.
17
+ *
18
+ * Report-only: chant does not know which the author wanted, only that it
19
+ * should be said out loud. `defaultEventSchema({ pinCallerPrincipal: false })`
20
+ * also stamps the reasoning into the emitted file.
21
+ */
22
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
23
+ export declare const dwds010: PostSynthCheck;
24
+ //# sourceMappingURL=dwds010.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dwds010.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/dwds010.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAqBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAYvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAW3C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAmBvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAkB3C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cedar",
3
- "version": "0.44.8",
3
+ "version": "0.44.10",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Cedar",
6
6
  "intrinsics": [],
package/dist/okf/index.md CHANGED
@@ -35,3 +35,10 @@ okf_version: '0.2'
35
35
  * [CEDS010](/rules/CEDS010.md) - A bare permit(principal, action, resource) with no scope constraints and no conditions grants everything
36
36
  * [CEDS011](/rules/CEDS011.md) - A policy set built entirely from permits carries no forbid to bound them
37
37
  * [CEDS012](/rules/CEDS012.md) - A permit that leaves the action scope unconstrained grants every action, including future ones
38
+ * [DWDC010](/rules/DWDC010.md) - A dogwood temporal predicate names an event kind the emitted .dwschema declares
39
+ * [DWDC011](/rules/DWDC011.md) - A dogwood temporal window stays inside the event schema's max_window cap
40
+ * [DWDC012](/rules/DWDC012.md) - A dogwood formerly/previous/since operator carries its mandatory within window
41
+ * [DWDC013](/rules/DWDC013.md) - An embedded AgentCore temporal statement has its event schema emitted beside it
42
+ * [DWDE010](/rules/DWDE010.md) - Emitted dogwood policy sets validate clean under `dogwood validate`, when the binary is available
43
+ * [DWDE011](/rules/DWDE011.md) - The Cedar `dogwood lower` produces validates clean against the augmented schema (cedar-wasm validate)
44
+ * [DWDS010](/rules/DWDS010.md) - An emitted dogwood event schema pins its temporal predicates to a request-side value
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDC010
4
+ description: A dogwood temporal predicate names an event kind the emitted .dwschema declares
5
+ id: DWDC010
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ A dogwood temporal predicate names an event kind the emitted .dwschema declares
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDC011
4
+ description: A dogwood temporal window stays inside the event schema's max_window cap
5
+ id: DWDC011
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ A dogwood temporal window stays inside the event schema's max_window cap
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDC012
4
+ description: A dogwood formerly/previous/since operator carries its mandatory within window
5
+ id: DWDC012
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ A dogwood formerly/previous/since operator carries its mandatory within window
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDC013
4
+ description: An embedded AgentCore temporal statement has its event schema emitted beside it
5
+ id: DWDC013
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ An embedded AgentCore temporal statement has its event schema emitted beside it
12
+
13
+ ## Applies to
14
+
15
+ - [Policy](/types/Policy.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDE010
4
+ description: Emitted dogwood policy sets validate clean under `dogwood validate`, when the binary is available
5
+ id: DWDE010
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ Emitted dogwood policy sets validate clean under `dogwood validate`, when the binary is available
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDE011
4
+ description: The Cedar `dogwood lower` produces validates clean against the augmented schema (cedar-wasm validate)
5
+ id: DWDE011
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ The Cedar `dogwood lower` produces validates clean against the augmented schema (cedar-wasm validate)
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: DWDS010
4
+ description: An emitted dogwood event schema pins its temporal predicates to a request-side value
5
+ id: DWDS010
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: cedar
9
+ docs: https://intentius.io/chant/lexicons/cedar/rules/
10
+ ---
11
+ An emitted dogwood event schema pins its temporal predicates to a request-side value
@@ -27,3 +27,4 @@ A Cedar policy — the unit this lexicon serializes to .cedar text and the JSON
27
27
  - [CEDE011](/rules/CEDE011.md): Cedar validation warnings (impossible policies, shadowed conditions) on an emitted policy set
28
28
  - [CEDS010](/rules/CEDS010.md): A bare permit(principal, action, resource) with no scope constraints and no conditions grants everything
29
29
  - [CEDS012](/rules/CEDS012.md): A permit that leaves the action scope unconstrained grants every action, including future ones
30
+ - [DWDC013](/rules/DWDC013.md): An embedded AgentCore temporal statement has its event schema emitted beside it
@@ -0,0 +1,18 @@
1
+ /**
2
+ * cedar Op activities — resolved by the core activity registry when a
3
+ * project's `chant.config.ts` lists the `cedar` lexicon.
4
+ *
5
+ * The registry keys every exported *function* in this module by its name
6
+ * (`loadActivities` → `collectActivities`), which is why only the activities
7
+ * themselves are exported here. `dogwoodReplay`'s helpers — the input
8
+ * resolver, the verdict comparison, the summary renderer — stay importable
9
+ * from `@intentius/chant-lexicon-cedar/dogwood/replay-activity` rather than
10
+ * being registered as activities nobody would ever name in a step.
11
+ *
12
+ * Contributed the `flyApply` way: a plain async function taking one args
13
+ * object, with no Temporal import anywhere beneath it, so the local executor
14
+ * runs it unchanged and a Temporal worker registers the same function.
15
+ */
16
+ export { dogwoodReplay, dogwoodReplayReport } from "../../dogwood/replay-activity.js";
17
+ export type { DogwoodReplayArgs, DogwoodReplayReportArgs, ExpectedVerdict, PolicyReplayDispatch, PolicyReplayMode, PolicyReplayReport, ReplayDivergence, ReplayExpectation, } from "../../dogwood/replay-activity.js";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,+BAA+B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;AAuB9G;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,aA2RzB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;AAuB9G;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,aAyTzB,CAAC"}