@aventara/core 1.0.0-rc.1 → 1.0.0-rc.11

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 (261) hide show
  1. package/CHANGELOG.md +1022 -16
  2. package/ERRORS.md +142 -0
  3. package/README.md +330 -16
  4. package/dist/adapters/adapter-discovery-diagnostic.guidance.d.ts +6 -0
  5. package/dist/adapters/adapter-discovery-diagnostic.guidance.js +7 -0
  6. package/dist/adapters/adapter-field.d.ts +22 -0
  7. package/dist/adapters/adapter-identifier.d.ts +9 -0
  8. package/dist/adapters/adapter-identifier.js +6 -1
  9. package/dist/adapters/adapter-model.d.ts +9 -0
  10. package/dist/adapters/adapter-operation.d.ts +18 -3
  11. package/dist/adapters/adapter-resource.d.ts +5 -0
  12. package/dist/adapters/adapter.interface.d.ts +10 -0
  13. package/dist/avz/avz.d.ts +1 -1
  14. package/dist/avz/json-shape.registry.d.ts +2 -1
  15. package/dist/compiler/contract-compiler-diagnostic.guidance.d.ts +6 -0
  16. package/dist/compiler/contract-compiler-diagnostic.guidance.js +97 -0
  17. package/dist/compiler/contract.compiler.d.ts +6 -0
  18. package/dist/compiler/contract.compiler.js +281 -31
  19. package/dist/compiler/create-requirements.projector.js +1 -3
  20. package/dist/compiler/field-validator.compiler.js +1 -3
  21. package/dist/compiler/managed-elsewhere.projector.d.ts +52 -0
  22. package/dist/compiler/managed-elsewhere.projector.js +179 -0
  23. package/dist/compiler/managed-elsewhere.validator.d.ts +9 -0
  24. package/dist/compiler/managed-elsewhere.validator.js +74 -0
  25. package/dist/config/cache-stage.factory.d.ts +24 -0
  26. package/dist/config/cache-stage.factory.js +3 -0
  27. package/dist/config/computed-fields.d.ts +62 -0
  28. package/dist/config/computed-fields.js +73 -0
  29. package/dist/config/config-diagnostic.guidance.d.ts +6 -0
  30. package/dist/config/config-diagnostic.guidance.js +32 -0
  31. package/dist/config/config.resolver.d.ts +24 -0
  32. package/dist/config/config.resolver.js +66 -7
  33. package/dist/config/config.validator.js +283 -21
  34. package/dist/config/define-resource.d.ts +1 -5
  35. package/dist/config/entrypoint.normalizer.d.ts +3 -2
  36. package/dist/config/exact-framework-config.d.ts +73 -22
  37. package/dist/config/field-compute.resolver.d.ts +2 -0
  38. package/dist/config/field-compute.resolver.js +9 -3
  39. package/dist/config/framework-config.d.ts +53 -15
  40. package/dist/config/framework-resources-config.d.ts +25 -14
  41. package/dist/config/pipeline-config.d.ts +20 -4
  42. package/dist/config/pipeline-tree.resolver.d.ts +2 -2
  43. package/dist/config/pipeline-tree.resolver.js +2 -3
  44. package/dist/contracts/access-route.rules.d.ts +10 -0
  45. package/dist/contracts/access-route.rules.js +45 -0
  46. package/dist/contracts/canonical-json.writer.d.ts +7 -0
  47. package/dist/contracts/canonical-json.writer.js +55 -0
  48. package/dist/contracts/capability.d.ts +26 -1
  49. package/dist/contracts/capability.js +20 -0
  50. package/dist/contracts/client-contract-structure.validator.d.ts +365 -89
  51. package/dist/contracts/client-contract-structure.validator.js +49 -2
  52. package/dist/contracts/contract-access.d.ts +29 -0
  53. package/dist/contracts/contract-access.js +1 -0
  54. package/dist/contracts/contract-canonicalizer.d.ts +9 -1
  55. package/dist/contracts/contract-canonicalizer.js +35 -4
  56. package/dist/contracts/contract-hash.d.ts +0 -1
  57. package/dist/contracts/contract-hash.js +1 -1
  58. package/dist/contracts/contract-limits.d.ts +6 -0
  59. package/dist/contracts/contract-limits.js +2 -0
  60. package/dist/contracts/contract.d.ts +42 -1
  61. package/dist/contracts/field.d.ts +58 -1
  62. package/dist/contracts/json-schema.projector.d.ts +11 -0
  63. package/dist/contracts/json-schema.projector.js +76 -0
  64. package/dist/contracts/scalar-value-type.d.ts +3 -1
  65. package/dist/framework/access-facade.d.ts +116 -0
  66. package/dist/framework/access-facade.js +118 -0
  67. package/dist/framework/contract-view.d.ts +120 -16
  68. package/dist/framework/framework-construction.error.d.ts +14 -4
  69. package/dist/framework/framework-construction.error.js +18 -2
  70. package/dist/framework/framework.d.ts +26 -5
  71. package/dist/framework/framework.factory.d.ts +1 -1
  72. package/dist/framework/framework.factory.js +145 -24
  73. package/dist/framework/operation-facade.d.ts +141 -13
  74. package/dist/framework/operation-facade.js +9 -1
  75. package/dist/framework/operation-set.runner.d.ts +47 -0
  76. package/dist/framework/operation-set.runner.js +168 -0
  77. package/dist/index.d.ts +19 -5
  78. package/dist/index.js +3 -0
  79. package/dist/internal.d.ts +9 -2
  80. package/dist/internal.js +8 -0
  81. package/dist/operations/database-refusal.d.ts +51 -0
  82. package/dist/operations/database-refusal.js +45 -0
  83. package/dist/operations/operation-arguments.d.ts +148 -60
  84. package/dist/operations/operation-call.d.ts +9 -5
  85. package/dist/operations/operation-result.d.ts +6 -4
  86. package/dist/operations/operation-validator-core.js +160 -39
  87. package/dist/operations/operation-validator.d.ts +1 -1
  88. package/dist/operations/structural-limits.walker.d.ts +1 -1
  89. package/dist/operations/structural-limits.walker.js +1 -3
  90. package/dist/operations/validation-code.guidance.d.ts +6 -0
  91. package/dist/operations/validation-code.guidance.js +90 -0
  92. package/dist/operations/write-scope.resolver.d.ts +4 -0
  93. package/dist/operations/write-scope.resolver.js +2 -0
  94. package/dist/policy/access-provider.interface.d.ts +91 -0
  95. package/dist/policy/access-provider.interface.js +1 -0
  96. package/dist/policy/access-provider.registry.d.ts +17 -0
  97. package/dist/policy/access-provider.registry.js +15 -0
  98. package/dist/policy/access-question.d.ts +20 -0
  99. package/dist/policy/access-question.js +1 -0
  100. package/dist/policy/access-question.registry.d.ts +5 -0
  101. package/dist/policy/access-question.registry.js +19 -0
  102. package/dist/policy/access-question.runtime.d.ts +36 -0
  103. package/dist/policy/access-question.runtime.js +295 -0
  104. package/dist/policy/access-verb.table.d.ts +56 -0
  105. package/dist/policy/access-verb.table.js +21 -0
  106. package/dist/policy/access-verbs.d.ts +46 -0
  107. package/dist/policy/access-verbs.js +1 -0
  108. package/dist/policy/policy-admission.d.ts +20 -0
  109. package/dist/policy/policy-admission.js +407 -0
  110. package/dist/policy/policy-after-update.runtime.d.ts +79 -0
  111. package/dist/policy/policy-after-update.runtime.js +206 -0
  112. package/dist/policy/policy-condition.d.ts +15 -0
  113. package/dist/policy/policy-condition.js +36 -0
  114. package/dist/policy/policy-engine.d.ts +205 -0
  115. package/dist/policy/policy-engine.js +1 -0
  116. package/dist/policy/policy-named-rows.d.ts +18 -0
  117. package/dist/policy/policy-named-rows.js +51 -0
  118. package/dist/policy/policy-nested-write.runtime.d.ts +44 -0
  119. package/dist/policy/policy-nested-write.runtime.js +536 -0
  120. package/dist/policy/policy-read.runtime.d.ts +81 -0
  121. package/dist/policy/policy-read.runtime.js +501 -0
  122. package/dist/policy/policy-reference-write.runtime.d.ts +51 -0
  123. package/dist/policy/policy-reference-write.runtime.js +336 -0
  124. package/dist/policy/policy-request.d.ts +72 -0
  125. package/dist/policy/policy-request.js +115 -0
  126. package/dist/policy/policy-session.d.ts +106 -0
  127. package/dist/policy/policy-session.js +293 -0
  128. package/dist/policy/policy-startup.validator.d.ts +10 -0
  129. package/dist/policy/policy-startup.validator.js +112 -0
  130. package/dist/policy/policy-write.runtime.d.ts +39 -0
  131. package/dist/policy/policy-write.runtime.js +530 -0
  132. package/dist/prebuilt/core-version.generated.d.ts +2 -0
  133. package/dist/prebuilt/core-version.generated.js +1 -0
  134. package/dist/prebuilt/prebuilt-changes.d.ts +29 -0
  135. package/dist/prebuilt/prebuilt-changes.js +63 -0
  136. package/dist/prebuilt/prebuilt-contracts.d.ts +40 -0
  137. package/dist/prebuilt/prebuilt-contracts.emitter.d.ts +16 -0
  138. package/dist/prebuilt/prebuilt-contracts.emitter.js +50 -0
  139. package/dist/prebuilt/prebuilt-contracts.js +1 -0
  140. package/dist/prebuilt/prebuilt-contracts.loader.d.ts +19 -0
  141. package/dist/prebuilt/prebuilt-contracts.loader.js +75 -0
  142. package/dist/prebuilt/prebuilt-inputs.fingerprint.d.ts +16 -0
  143. package/dist/prebuilt/prebuilt-inputs.fingerprint.js +227 -0
  144. package/dist/protocol/absent-route.responder.d.ts +49 -14
  145. package/dist/protocol/absent-route.responder.js +92 -15
  146. package/dist/protocol/contract-document.responder.d.ts +9 -1
  147. package/dist/protocol/contract-document.responder.js +3 -2
  148. package/dist/protocol/http-request.decoder.d.ts +52 -3
  149. package/dist/protocol/http-request.decoder.js +45 -6
  150. package/dist/protocol/http-request.reader.d.ts +10 -3
  151. package/dist/protocol/http-request.reader.js +12 -2
  152. package/dist/protocol/http-response.encoder.d.ts +12 -0
  153. package/dist/protocol/http-response.encoder.js +17 -3
  154. package/dist/protocol/operation-response.guard.js +1 -3
  155. package/dist/protocol/operation-set.decoder.d.ts +48 -0
  156. package/dist/protocol/operation-set.decoder.js +185 -0
  157. package/dist/protocol/operation-set.handler.d.ts +27 -0
  158. package/dist/protocol/operation-set.handler.js +179 -0
  159. package/dist/protocol/protocol-headers.d.ts +12 -3
  160. package/dist/protocol/protocol-headers.js +12 -5
  161. package/dist/protocol/protocol-surface.d.ts +16 -3
  162. package/dist/protocol/protocol-surface.js +41 -1
  163. package/dist/protocol/protocol.binder.d.ts +52 -1
  164. package/dist/protocol/protocol.binder.js +6 -1
  165. package/dist/protocol/protocol.handler.d.ts +45 -1
  166. package/dist/protocol/protocol.handler.js +164 -19
  167. package/dist/protocol/read-cache.responder.d.ts +26 -0
  168. package/dist/protocol/read-cache.responder.js +47 -0
  169. package/dist/protocol/read-query.codec.d.ts +34 -0
  170. package/dist/protocol/read-query.codec.js +125 -0
  171. package/dist/runtime/caller-data.copier.d.ts +18 -3
  172. package/dist/runtime/caller-data.copier.js +21 -8
  173. package/dist/runtime/caller-data.door.d.ts +13 -6
  174. package/dist/runtime/computed-read-runtime.d.ts +6 -1
  175. package/dist/runtime/computed-read-runtime.js +229 -48
  176. package/dist/runtime/computed-value.error.d.ts +3 -2
  177. package/dist/runtime/computed-value.error.js +3 -2
  178. package/dist/runtime/context-executor.runtime.d.ts +4 -3
  179. package/dist/runtime/context-executor.runtime.js +4 -2
  180. package/dist/runtime/core-class.brand.d.ts +10 -0
  181. package/dist/runtime/core-class.brand.js +21 -0
  182. package/dist/runtime/create-requirement.d.ts +31 -5
  183. package/dist/runtime/create-requirement.js +130 -24
  184. package/dist/runtime/decimal.d.ts +14 -0
  185. package/dist/runtime/decimal.js +21 -0
  186. package/dist/runtime/diagnostics-reporter.d.ts +49 -9
  187. package/dist/runtime/diagnostics-reporter.js +16 -9
  188. package/dist/runtime/error-boundary.d.ts +9 -2
  189. package/dist/runtime/error-boundary.js +12 -0
  190. package/dist/runtime/error-guidance.d.ts +12 -0
  191. package/dist/runtime/error-guidance.js +1 -0
  192. package/dist/runtime/error.catalog.d.ts +49 -0
  193. package/dist/runtime/error.catalog.js +49 -0
  194. package/dist/runtime/execution-options.d.ts +8 -0
  195. package/dist/runtime/field-check.evaluator.d.ts +0 -2
  196. package/dist/runtime/field-check.evaluator.js +1 -1
  197. package/dist/runtime/field-compute.d.ts +11 -10
  198. package/dist/runtime/field-stage.runtime.d.ts +3 -3
  199. package/dist/runtime/field-stage.runtime.js +9 -11
  200. package/dist/runtime/field-validator.runtime.d.ts +19 -1
  201. package/dist/runtime/field-validator.runtime.js +49 -9
  202. package/dist/runtime/framework-error.js +9 -0
  203. package/dist/runtime/framework-warning.emitter.d.ts +6 -0
  204. package/dist/runtime/framework-warning.emitter.js +8 -0
  205. package/dist/runtime/json-value.d.ts +10 -5
  206. package/dist/runtime/level-lifecycle.runtime.d.ts +4 -3
  207. package/dist/runtime/level-lifecycle.runtime.js +3 -5
  208. package/dist/runtime/mutation-planner.d.ts +1 -6
  209. package/dist/runtime/mutation-planner.js +4 -17
  210. package/dist/runtime/nested-write.walker.js +2 -1
  211. package/dist/runtime/operation-code.guidance.d.ts +6 -0
  212. package/dist/runtime/operation-code.guidance.js +167 -0
  213. package/dist/runtime/operation-request.d.ts +16 -9
  214. package/dist/runtime/operation-runtime.d.ts +35 -17
  215. package/dist/runtime/operation-runtime.js +220 -49
  216. package/dist/runtime/outcome-mapper.d.ts +2 -1
  217. package/dist/runtime/output-validator.d.ts +1 -1
  218. package/dist/runtime/output-validator.js +1 -3
  219. package/dist/runtime/owned-execution.registry.d.ts +34 -4
  220. package/dist/runtime/pipe-output.validator.d.ts +10 -0
  221. package/dist/runtime/pipe-output.validator.js +4 -2
  222. package/dist/runtime/pipeline.d.ts +52 -23
  223. package/dist/runtime/readonly-value.d.ts +20 -5
  224. package/dist/runtime/readonly-value.js +74 -26
  225. package/dist/runtime/record.guard.d.ts +14 -0
  226. package/dist/runtime/record.guard.js +10 -0
  227. package/dist/runtime/referential-action.d.ts +1 -1
  228. package/dist/runtime/request-envelope.validator.js +13 -10
  229. package/dist/runtime/scalar-runtime.d.ts +4 -21
  230. package/dist/runtime/scalar-runtime.js +91 -31
  231. package/dist/runtime/thenable.guard.d.ts +7 -0
  232. package/dist/runtime/thenable.guard.js +5 -0
  233. package/dist/runtime/unsent-value.normalizer.d.ts +15 -0
  234. package/dist/runtime/unsent-value.normalizer.js +129 -0
  235. package/dist/transactions/operation-arguments-encoder.js +9 -10
  236. package/dist/transactions/operation-fingerprint.js +2 -2
  237. package/dist/transactions/sql-statement.d.ts +10 -2
  238. package/dist/transactions/sql-statement.validator.d.ts +2 -2
  239. package/dist/transactions/sql-statement.validator.js +40 -6
  240. package/dist/transactions/transaction-envelope.d.ts +5 -4
  241. package/dist/transactions/transaction-integrity-error.js +2 -0
  242. package/dist/transactions/transaction-plan-assembler.d.ts +12 -5
  243. package/dist/transactions/transaction-plan-assembler.js +49 -17
  244. package/dist/transactions/transaction-plan-validator.d.ts +23 -7
  245. package/dist/transactions/transaction-plan-validator.js +31 -7
  246. package/dist/transactions/transaction-reference-collector.js +8 -10
  247. package/dist/transactions/transaction-reference-resolver.d.ts +3 -2
  248. package/dist/transactions/transaction-reference-resolver.js +1 -3
  249. package/dist/transactions/transaction-reference-validator.d.ts +43 -3
  250. package/dist/transactions/transaction-reference-validator.js +83 -57
  251. package/dist/transactions/transaction-reference.d.ts +1 -1
  252. package/dist/transactions/transaction-reference.js +5 -0
  253. package/dist/transactions/transaction-request.d.ts +8 -8
  254. package/dist/transactions/transaction-runtime.d.ts +5 -2
  255. package/dist/transactions/transaction-runtime.js +108 -27
  256. package/dist/transactions/transaction-settlement.runtime.d.ts +4 -3
  257. package/dist/transactions/transaction-slot-path-error.js +2 -0
  258. package/dist/transactions/transaction-stage.runtime.d.ts +5 -3
  259. package/dist/transactions/transaction-stage.runtime.js +8 -7
  260. package/package.json +6 -5
  261. package/src/runtime/field-check.evaluator.ts +1 -1
package/ERRORS.md ADDED
@@ -0,0 +1,142 @@
1
+ # Aventara error codes
2
+
3
+ Every code `@aventara/core` 1.0.0-rc.11 answers, reports in a validation issue, or refuses to start with. Generated from `AvErrorCatalog` (exported by `@aventara/core`); do not edit.
4
+
5
+ Branch on the code, never on the message. In code, `AvErrorCatalog[code]` gives the same entry: `{ code, kind, message, cause, fix, docs }`.
6
+
7
+ ## Success codes (A1xxx)
8
+
9
+ An operation's `code` when it succeeded. The generated client resolves for these.
10
+
11
+ | Code | Meaning | Cause | Fix |
12
+ |---|---|---|---|
13
+ | [`A1000`](https://aventara.razor34.dev/framework/docs/error-codes#a1000) | Success. | A read, a count or another operation without a more specific success code succeeded. | Nothing: the call succeeded. |
14
+ | [`A1001`](https://aventara.razor34.dev/framework/docs/error-codes#a1001) | No match. | A first-style operation (find.first, update.first, delete.first) matched no row; data is null and the generated client resolves null. | Nothing: handle the null result. A unique operation answers A2003 instead. |
15
+ | [`A1002`](https://aventara.razor34.dev/framework/docs/error-codes#a1002) | Created. | create.one created a row. | Nothing: the call succeeded. |
16
+ | [`A1003`](https://aventara.razor34.dev/framework/docs/error-codes#a1003) | Created many. | create.many or create.count created rows. | Nothing: the call succeeded. |
17
+ | [`A1004`](https://aventara.razor34.dev/framework/docs/error-codes#a1004) | Updated. | update.first or update.unique updated a row. | Nothing: the call succeeded. |
18
+ | [`A1005`](https://aventara.razor34.dev/framework/docs/error-codes#a1005) | Updated many. | update.many or update.count updated rows. | Nothing: the call succeeded. |
19
+ | [`A1006`](https://aventara.razor34.dev/framework/docs/error-codes#a1006) | Deleted. | delete.first or delete.unique deleted a row. | Nothing: the call succeeded. |
20
+ | [`A1007`](https://aventara.razor34.dev/framework/docs/error-codes#a1007) | Deleted many. | delete.count deleted rows. | Nothing: the call succeeded. |
21
+ | [`A1008`](https://aventara.razor34.dev/framework/docs/error-codes#a1008) | Upserted. | upsert.unique created or updated a row. | Nothing: the call succeeded. |
22
+ | [`A1009`](https://aventara.razor34.dev/framework/docs/error-codes#a1009) | Transaction committed. | A whole transaction plan committed; data holds one result per step. | Nothing: the plan committed. |
23
+
24
+ ## Request errors (A2xxx)
25
+
26
+ The caller can fix these. The generated client and server-side calls throw the code's `AvError` subclass.
27
+
28
+ | Code | Meaning | Cause | Fix |
29
+ |---|---|---|---|
30
+ | [`A2000`](https://aventara.razor34.dev/framework/docs/error-codes#a2000) | Invalid request. | The HTTP request cannot be interpreted: malformed JSON, a body that is not a JSON object, an unknown `/_*` path, a body that does not decode in its Content-Encoding, or a missing Aventara-Protocol-Version or Aventara-Contract-Hash header (the message names it). | Send a JSON object with both identity headers. The generated client does this for you. |
31
+ | [`A2001`](https://aventara.razor34.dev/framework/docs/error-codes#a2001) | Unknown Resource. | The Resource is not in the caller's contract: misspelt, hidden by exposure, or added to the schema after aventara:prepare last ran. cause.message is "The requested Resource is not available." and the issue is V1005 at `["resource"]`. | Use the model's exact name. After a schema change run the adapter's generate step (`npm run aventara:prepare` in a scaffolded project), restart, and regenerate the client. A Resource hidden on purpose is reached from server code (framework.application). |
32
+ | [`A2002`](https://aventara.razor34.dev/framework/docs/error-codes#a2002) | Unknown operation. | The operation is not available on that Resource: a typo, removed by exposure, an operation the adapter does not offer (such as delete.many), or a ctx.$sql, appTx.$sql or ctx.$transaction the adapter or the layer cannot run. The issue is V1006 at `["family"]` or `["variant"]`. | Call an operation the contract lists (`GET <api>/_contract`), regenerate a stale client, and check the layer's exemptions and transactionsStyle. |
33
+ | [`A2003`](https://aventara.razor34.dev/framework/docs/error-codes#a2003) | Not found. | A unique operation (find.unique, update.unique, delete.unique) matched no row, or a $connect names a record that does not exist. The operation fails, so no after hook runs. Under a policy, a row outside the caller's read scope is a miss too, and so is a single-row update or delete of a row the caller cannot read, so the answer does not reveal that the row exists. A row the caller can read but not change answers A4002. | Catch AvNotFoundError, or use a first-style operation, which answers A1001 with null. Check the $connect identifier. |
34
+ | [`A2004`](https://aventara.razor34.dev/framework/docs/error-codes#a2004) | Validation failed. | The arguments break a contract rule or a field validator. cause.issues lists each problem by V-code and path; a validator's issue also has check and params. The validators judge the values after the pipes and write compute, so a computed value they refuse is here too, at its field. A required create field left out is here (V1000). So is a value the database itself refused: too long for its column or its index, or out of its range (V1004), or holding a character it cannot store or a pattern it cannot read (V1001), with the issue at `["arguments"]`, or at the value where the adapter can place it (a bigint its driver cannot bind), and its message saying what the database refused. So is a record written through a relation that writes that relation, or a field holding its reference, back (V1012, at that field), where the adapter admits no such write. | Fix the argument each issue's path points at, as its V-code says. A field the server must fill takes a compute.create stage. For a value the database refused, send one its column holds. For a nested write that writes its relation back, leave that field out: the parent supplies it. |
35
+ | [`A2005`](https://aventara.razor34.dev/framework/docs/error-codes#a2005) | Contract mismatch. | The caller's Aventara-Contract-Hash is not the server's current one: the schema, the configuration, the limits or the exposure changed, or the client targets another deployment. | Regenerate the client against the running server: `npm run avclient:generate`. |
36
+ | [`A2006`](https://aventara.razor34.dev/framework/docs/error-codes#a2006) | Protocol mismatch. | Aventara-Protocol-Version is not 1. | Send `Aventara-Protocol-Version: 1`, or upgrade the client. |
37
+ | [`A2007`](https://aventara.razor34.dev/framework/docs/error-codes#a2007) | Invalid transaction reference. | A transaction $ref or fingerprint is invalid: the issues are V1010, V1011, V1016, V1017 or V1018, and cause.operation is the step. A $ref with no fingerprint is A2004 / V1000. | Let the generated client or framework.appTx build plans; check the $ref path and that the referenced step comes earlier. |
38
+ | [`A2008`](https://aventara.razor34.dev/framework/docs/error-codes#a2008) | Conflict. | A uniqueness or reference constraint failed: a duplicate value, a missing parent, or a $disconnect or $set that would orphan a required child (also through update.first or a developer SQL statement). Sending it again unchanged fails the same way. | Change the data. For a duplicate, update the existing row or use upsert.unique. |
39
+ | [`A2009`](https://aventara.razor34.dev/framework/docs/error-codes#a2009) | Limit exceeded. | A contract limit was crossed: nesting depth (V1013), list or plan size (V1014), boolean nodes (V1015) or Json value depth (V1021). | Ask for less (paginate, split the plan), or raise the limit under `limits`. |
40
+ | [`A2010`](https://aventara.razor34.dev/framework/docs/error-codes#a2010) | Payload too large. | The decoded request body exceeds maxRequestBytes (default 1048576). | Send less, or raise limits.maxRequestBytes. |
41
+ | [`A2011`](https://aventara.razor34.dev/framework/docs/error-codes#a2011) | Unsupported media type. | The body is not application/json, or its Content-Encoding is not gzip, deflate or br. | Send `Content-Type: application/json`. |
42
+ | [`A2012`](https://aventara.razor34.dev/framework/docs/error-codes#a2012) | Method not allowed. | The HTTP method does not fit the route; the Allow header names the right one (`POST` on operations and `/_transactions`, `GET` on `/_contract`). | Use the method the Allow header names. |
43
+ | [`A2013`](https://aventara.razor34.dev/framework/docs/error-codes#a2013) | Concurrent modification. | A competing writer reached the state first; nothing was written. | Retry. No retry is automatic. |
44
+ | [`A2014`](https://aventara.razor34.dev/framework/docs/error-codes#a2014) | Stale selection. | The selected state changed before the write; nothing was written. | Read again, then retry. |
45
+
46
+ ## Server errors (A3xxx)
47
+
48
+ Not caller-actionable: `cause.message` is generic, and the real error goes to the root `diagnostics` sink.
49
+
50
+ | Code | Meaning | Cause | Fix |
51
+ |---|---|---|---|
52
+ | [`A3000`](https://aventara.razor34.dev/framework/docs/error-codes#a3000) | Internal error. | An unexpected failure on the server: a stage threw an error that is not an AvError, an interceptor called next() twice, a compute stage reached a write through its read-only ctx, a compute stage returned a value of the wrong type, or a compute.create returned undefined for a required field. cause.message is always "Internal framework error." | Read the real error in the diagnostics sink (the root `diagnostics` key) or the server log line for the request id, and fix that stage. To answer with a code of your choice, throw an AvError. |
53
+ | [`A3001`](https://aventara.razor34.dev/framework/docs/error-codes#a3001) | Adapter error. | A database or ORM failure that is not something the caller can fix. cause.message is always "Adapter execution failed." | Read the raw error in the diagnostics sink; check the database, its connection and the migration state. |
54
+ | [`A3002`](https://aventara.razor34.dev/framework/docs/error-codes#a3002) | Transaction error. | Transaction infrastructure failed (commit or rollback, or the transaction expired or was closed under a step), or a Resource transaction interceptor called next() twice or resolved without calling it. | Read the diagnostics sink. Call next() exactly once in a transaction interceptor; retry an infrastructure failure. |
55
+ | [`A3003`](https://aventara.razor34.dev/framework/docs/error-codes#a3003) | Serialization error. | A result could not be encoded for transport. | Read the diagnostics sink; make compute.read stages and Json values return plain data of the field's type. |
56
+ | [`A3004`](https://aventara.razor34.dev/framework/docs/error-codes#a3004) | Pipe output invalid. | A server pipe, field pipe or transaction pipe (or write compute) returned arguments the server's own contract refuses: a field the Resource does not have, a wrong type, a dropped required field, a reference written together with its relation (V1012), or a changed plan. cause.message is always "A server pipeline produced invalid arguments." | Read the server log line, which names the pipe, the operation and the path, and fix the pipe. A pipe returns a new object of the same shape, or undefined to keep the arguments. |
57
+
58
+ ## Authentication and authorization (A4xxx)
59
+
60
+ Produced by your guards; the framework never authenticates by itself.
61
+
62
+ | Code | Meaning | Cause | Fix |
63
+ |---|---|---|---|
64
+ | [`A4000`](https://aventara.razor34.dev/framework/docs/error-codes#a4000) | Unauthenticated. | A guard threw new AvError("A4000", ...): authentication is required or failed. The framework never authenticates by itself. | Send the credentials your guards expect, such as the Authorization header. |
65
+ | [`A4001`](https://aventara.razor34.dev/framework/docs/error-codes#a4001) | Forbidden. | A guard returned false ("Operation denied by a framework guard."), a field write guard or a nested write's target guard included, or a stage threw A4001. | Call as a caller the guard admits, or stop sending the guarded field. To answer another code, throw an AvError from the guard. |
66
+ | [`A4002`](https://aventara.razor34.dev/framework/docs/error-codes#a4002) | Policy denied. | The configuration's policy refused the request: its engine does not allow the operation, a field the request names, writes or returns, a row it reaches, a row it creates, or the row a change leaves (moved out of what the caller reads, or failing its grant's after condition, which rolls the write back); on a database without interactive transactions, a write the policy can only check after it runs; or a stage threw new AvError("A4002", ...). | Read cause.message, which names what the policy refused. Call as a principal the policy allows, leave the refused field or relation out (a governed one is named only where every row grants it), or change only rows the caller may change and still read afterwards. |
67
+
68
+ ## Validation issues (V1xxx)
69
+
70
+ Each entry of `cause.issues[]` under `A2001`, `A2002`, `A2004`, `A2007` or `A2009`: `{ code, path, message }`, plus `check` and `params` for a failed field validator.
71
+
72
+ | Code | Meaning | Cause | Fix |
73
+ |---|---|---|---|
74
+ | [`V1000`](https://aventara.razor34.dev/framework/docs/error-codes#v1000) | Required value missing. | A required value is absent: a create leaves out a required field that has no database default and no compute.create (the path names the field), a required relation and its reference field are both missing, a typed Json field lacks a required key, or a $ref has no fingerprint. | Send the value at the issue's path. When the server must fill it, give the field a compute.create stage or a database default; a pipe cannot fill it. |
75
+ | [`V1001`](https://aventara.razor34.dev/framework/docs/error-codes#v1001) | Invalid runtime/wire type. | A value of the wrong type: a string where a number is expected, a negative limit, a non-integer id, null given to an operator with no null meaning (gt, contains, in), two directives in one scalar action object (`{ $increment: 1, $decrement: 2 }`), or a server-side value that is not plain data. Also a value that would make the call reach more rows: `undefined` in a filter, a unique selector or a cursor, an empty boolean node (`NOT: {}`, `AND: []`, `OR: []`) in the where of a write (update or delete many, count or first, a to-many $update or $delete). | Send the type the contract states at that path (the generated client's types say it). |
76
+ | [`V1002`](https://aventara.razor34.dev/framework/docs/error-codes#v1002) | Invalid enum value. | A value that is not a member of the enum, or outside a typed Json field's AvZ.enum or AvZ.literal. | Send one of the enum's members. |
77
+ | [`V1003`](https://aventara.razor34.dev/framework/docs/error-codes#v1003) | Invalid format (for example UUID/DateTime/base64). | A malformed datetime, decimal, base64 or UUID string, or a failed pattern or format validator (`check: "string_format"`). | Send the canonical encoding (ISO-8601 UTC datetime, decimal string, base64 bytes) and satisfy the validator that check and params name. |
78
+ | [`V1004`](https://aventara.razor34.dev/framework/docs/error-codes#v1004) | Value outside accepted range. | A number, length or size outside its range: a failed bound, length or size validator, a BigInt outside signed 64 bits, an AvZ.int() outside the safe integer range, or a transaction with no operations. Under A2004 it is also a value the database refused as too long or out of its range, a BigInt beyond what the data source's driver can bind among them (some bind at most ±(2^53 − 1)). | Send a value inside the range; check and params name the validator that failed. |
79
+ | [`V1005`](https://aventara.razor34.dev/framework/docs/error-codes#v1005) | Unknown or inaccessible field. | A field that does not exist or is hidden in the caller's layer, an unknown Resource (under A2001), or a key a typed Json field's shape does not declare. | Use a field the caller's contract exposes, expose it through exemptions, or make the call from server code. |
80
+ | [`V1006`](https://aventara.razor34.dev/framework/docs/error-codes#v1006) | Unsupported filter/order/mutation directive. | An operator, directive or nested write the field does not offer (at any depth, inside not too; a to-many $update's data takes only what a bulk write takes), a mode it does not offer, or an operation that is not available (under A2002). | Use what the contract lists for that field or Resource, or expose it through exemptions. |
81
+ | [`V1007`](https://aventara.razor34.dev/framework/docs/error-codes#v1007) | Invalid unique identifier shape. | The where of a unique operation is not exactly one complete identifier. | Pass exactly one identifier: the id, or every field of one @unique or @@unique. |
82
+ | [`V1008`](https://aventara.razor34.dev/framework/docs/error-codes#v1008) | Invalid select/include/reducer projection. | Both select and include, a write-only field selected, or a relation that is not selectable there. | Use select or include, not both, and select only readable fields. |
83
+ | [`V1009`](https://aventara.razor34.dev/framework/docs/error-codes#v1009) | Invalid or non-deterministic cursor. | A cursor without an explicit orderBy, or cursor keys that do not match the ordered fields. | Give an orderBy and a cursor holding exactly its ordered fields. |
84
+ | [`V1010`](https://aventara.razor34.dev/framework/docs/error-codes#v1010) | Invalid transaction reference path. | A $ref path the earlier step does not return, a $ref to a step that is not in the transaction, or to a step with no single row (a many or count step). | Select the referenced field in the earlier step, and reference a single-row step. |
85
+ | [`V1011`](https://aventara.razor34.dev/framework/docs/error-codes#v1011) | Transaction reference type mismatch. | The referenced value's type does not fit its target, a nullable source where only a non-null value is accepted included. | Reference a field of the target's type, non-null where the target needs it. |
86
+ | [`V1012`](https://aventara.razor34.dev/framework/docs/error-codes#v1012) | Invalid relation action/cardinality. | A nested write that does not fit the relation (a list where one record is expected), a reference field set together with its own relation, one record mixing reference fields and relation writes where the adapter cannot run both, or a record written through a relation that writes that relation (or a field holding its reference) back, where the adapter admits no such write. Also a to-one $update or $upsert beside $connect, $connectOrCreate, $create, $set or $disconnect on the same relation: the row it would update is the newly linked one. | Write either the relation or its reference field, in the relation's cardinality. Relink a to-one relation in one write and update the linked row in another. |
87
+ | [`V1013`](https://aventara.razor34.dev/framework/docs/error-codes#v1013) | Maximum nesting depth exceeded. | Nested projections, filters or writes deeper than maxNestingDepth. | Nest less, or raise limits.maxNestingDepth. |
88
+ | [`V1014`](https://aventara.razor34.dev/framework/docs/error-codes#v1014) | Configured limit exceeded. | A limit above maxListLimit, or more steps than maxTransactionOperations. | Paginate or split the plan, or raise the limit. |
89
+ | [`V1015`](https://aventara.razor34.dev/framework/docs/error-codes#v1015) | Boolean/filter node limit exceeded. | A where tree with more nodes than maxBooleanNodes. | Simplify the filter (in instead of many OR clauses), or raise limits.maxBooleanNodes. |
90
+ | [`V1016`](https://aventara.razor34.dev/framework/docs/error-codes#v1016) | Invalid transaction reference index. | A $ref to the referencing step itself or a later one, or to an index no step has. | Reference an earlier step only. |
91
+ | [`V1017`](https://aventara.razor34.dev/framework/docs/error-codes#v1017) | Transaction fingerprint mismatch. | A hand-written plan whose fingerprint does not match its step. | Let the generated client, framework.appTx or framework.clientTx build the plan. |
92
+ | [`V1018`](https://aventara.razor34.dev/framework/docs/error-codes#v1018) | Transaction reference resolved to no value. | The referenced step returned no value at that path, such as a first step that matched no row. | Make sure the earlier step returns a row, or use a unique step, which fails with A2003. |
93
+ | [`V1019`](https://aventara.razor34.dev/framework/docs/error-codes#v1019) | Transaction step depends on a row removed by an earlier step's cascade | A later step uses a row that an earlier step's delete removed through a database cascade. | Reorder or drop the dependent step. |
94
+ | [`V1020`](https://aventara.razor34.dev/framework/docs/error-codes#v1020) | Transaction mixes application and client steps. | One framework.transaction([...]) list mixes appTx and clientTx steps. | Build every step of a plan from one origin. |
95
+ | [`V1021`](https://aventara.razor34.dev/framework/docs/error-codes#v1021) | Json value depth limit exceeded. | A Json field's value nests deeper than maxJsonDepth. | Flatten the value, or raise limits.maxJsonDepth. |
96
+
97
+ ## Startup: configuration
98
+
99
+ `createFramework` (and `AventaraModule`) throws one `AvConstructionError` with `stage: "configuration"`; each diagnostic is `{ code, path, message, docs }`.
100
+
101
+ | Code | Meaning | Cause | Fix |
102
+ |---|---|---|---|
103
+ | [`CONFIG_REQUIRED`](https://aventara.razor34.dev/framework/docs/error-codes#config_required) | A required configuration key is missing. | A key that must be present is absent: api, adapter, or an overlay's exposed when the overlay sets exemptions, or policy.engine or policy.principal when policy is set. | Add the key at the diagnostic's path. |
104
+ | [`CONFIG_UNKNOWN_PROPERTY`](https://aventara.razor34.dev/framework/docs/error-codes#config_unknown_property) | Unknown configuration key. | A key the configuration does not define at that place: a typo, or a key written at the wrong level of the tree. `policy` and `prebuilt` are root-only keys; in an overlay they read as unknown. | Remove it, or move it where it belongs (the configuration reference's "Where a key can go"). |
105
+ | [`CONFIG_INVALID_TYPE`](https://aventara.razor34.dev/framework/docs/error-codes#config_invalid_type) | A configuration key has the wrong type. | A value of the wrong type, or a key set to an explicit undefined. | Give the value the type the reference states; leave a key out rather than setting it to undefined. |
106
+ | [`CONFIG_INVALID_VALUE`](https://aventara.razor34.dev/framework/docs/error-codes#config_invalid_value) | A configuration value is not allowed. | A malformed api or mcp path, a negative limit, an unknown transactionsStyle, a format that is not a named zod format, forceTransaction under an effective transactionsStyle "none", an after check on any action but update, or a policy engine's governed, paths or afterChecks naming a Resource, field or path the Core Contract does not have, or its unheld naming a Resource the data source's model does not have (the message names the Resource or the rule). | Use a value the message allows. |
107
+ | [`CONFIG_MOVED_PROPERTY`](https://aventara.razor34.dev/framework/docs/error-codes#config_moved_property) | A configuration key moved in rc.1. | Configuration written for 1.0.0-rc.0: restrictions, entrypoint, fields, behaviors, transactions or pipelines.before/after. | Move it where the message says: restrictions to exposed + exemptions, entrypoint to api, fields to `resources.<R>.fields.<f>.definition`, transactions to transactionsStyle, before/after to pipelines.hooks. |
108
+ | [`CONFIG_FORBIDDEN_IN_OVERLAY`](https://aventara.razor34.dev/framework/docs/error-codes#config_forbidden_in_overlay) | A root-only key is written in an overlay. | A field definition in application, client or agent. | Define the field once at the root (`resources.<R>.fields.<f>.definition`); an overlay only chooses its visibility. |
109
+
110
+ ## Startup: discovery
111
+
112
+ `AvConstructionError` with `stage: "discovery"`: what the adapter reported does not hold together.
113
+
114
+ | Code | Meaning | Cause | Fix |
115
+ |---|---|---|---|
116
+ | [`DISCOVERY_TRANSACTION_CAPABILITY_MISMATCH`](https://aventara.razor34.dev/framework/docs/error-codes#discovery_transaction_capability_mismatch) | The adapter's transaction capability does not match it. | The adapter declares interactive transactions but provides no transaction function. | A defect of the adapter: install the adapter release that matches @aventara/core exactly. |
117
+
118
+ ## Startup: contract compilation
119
+
120
+ `AvConstructionError` with `stage: "contract-compilation"`; a diagnostic's `path` starts with its layer (`root.`, `application.`, `client.`, `agent.`).
121
+
122
+ | Code | Meaning | Cause | Fix |
123
+ |---|---|---|---|
124
+ | [`COMPILER_UNKNOWN_RESOURCE`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_unknown_resource) | Unknown Resource. | A Resource name the adapter's model does not have, in resources or in exemptions; or a client or agent entry for a Resource managed elsewhere, which those layers never have. | Use the model's exact name. After a schema change run `npm run aventara:prepare`. Configure a Resource managed elsewhere at the root or in application only. |
125
+ | [`COMPILER_UNKNOWN_FIELD`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_unknown_field) | Unknown field. | A field that is neither in the schema nor defined at the root. | Fix the name, run aventara:prepare after a schema change, or add the field with a root definition. |
126
+ | [`COMPILER_RELATION_FIELD_CONFIG_UNSUPPORTED`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_relation_field_config_unsupported) | A relation field takes write guards only. | Field pipes or compute on a relation field. | Put the stage on the relation's reference field, or use an operation pipe. |
127
+ | [`COMPILER_INCOMPLETE_FIELD`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_incomplete_field) | An added field is incomplete. | A definition that adds a field leaves out type, nullable or list. | Spell out type, nullable and list, with lifecycle: ["VIRTUAL"] for a field that has no column. |
128
+ | [`COMPILER_STRUCTURAL_FIELD_OVERRIDE`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_structural_field_override) | A discovered field's structure was redefined. | A definition on a field the adapter discovered changes its type, format or capabilities. | Restate only its type, nullable and list. Change capabilities through exemptions and the column through the schema. |
129
+ | [`COMPILER_MISSING_SCALAR`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_missing_scalar) | Unknown scalar type. | A definition names a scalar type that does not exist. | Use a built-in scalar: string, boolean, int, float, bigint, decimal, datetime, bytes or json. |
130
+ | [`COMPILER_MISSING_ENUM`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_missing_enum) | Unknown enum. | A definition names an enum the model does not have. | Use an enum of the schema, and run aventara:prepare after adding one. |
131
+ | [`COMPILER_DANGLING_RELATION`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_dangling_relation) | A visible relation points at a hidden Resource. | A layer hides a Resource but still exposes a relation field that targets it. | Hide the relation field too (`exemptions.resources.<R>.fields.<relation>: true`), or expose the target. |
132
+ | [`COMPILER_UNAVAILABLE_OPERATION`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_unavailable_operation) | Operation not available. | An operation the adapter does not offer (such as delete.many), or an overlay granting one that its parent hid. | Remove it. To reach an operation from one overlay only, expose it at the root and hide it in the other overlay. |
133
+ | [`COMPILER_UNAVAILABLE_CAPABILITY`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_unavailable_capability) | Capability not available. | A capability or token the field does not offer, or an overlay (or the agent layer) granting one its parent hid. Overlays only narrow. | Remove it, or expose it in the parent layer and hide it in the layer it must not reach. |
134
+ | [`COMPILER_INVALID_LIFECYCLE`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_invalid_lifecycle) | Invalid field lifecycle. | An added field declares a lifecycle other than VIRTUAL, a VIRTUAL field claims a database-generated lifecycle or a provider-side capability, or a definition redefines a discovered field's lifecycle. | Give an added field lifecycle: ["VIRTUAL"] and only the capabilities it can serve; computed lifecycles come from compute stages. |
135
+ | [`COMPILER_MISSING_READ_COMPUTE`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_missing_read_compute) | A selectable virtual field has no compute.read. | A VIRTUAL field that can be selected has no pipelines.compute.read stage. | Add a compute.read stage, or make the field write-only with capabilities.select: false. |
136
+ | [`COMPILER_INVALID_COMPUTE_DEPENDENCY`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_invalid_compute_dependency) | Invalid compute.read dependency. | A dependsOn entry that is not a stored scalar field of the same Resource. | List only stored scalar fields of the Resource in dependsOn. |
137
+ | [`COMPILER_RESERVED_RESOURCE_NAME`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_reserved_resource_name) | Reserved Resource name. | A model name starts with $, which is reserved for the framework's own names (ctx.$sql, $ref), or is the name of a member beside the Resources: all on serverClient (and so on Next.js's avClient), and on a host that adds its own, one of those (on Next.js: tx and transaction on avClient, appTx and transaction on avApp). | Rename the model; the table it maps to can keep its name. A host member's name is also left free when the layer it belongs to hides the Resource. |
138
+ | [`COMPILER_MISSING_IDENTIFIER`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_missing_identifier) | A unique operation has no identifier. | A layer exposes a unique variant (find.unique, update.unique, delete.unique, upsert.unique) and no complete identifier of the Resource: a Pick that did not pick one, or an Omit that hid every one. | Expose an identifier field (id, or every field of one unique), or exempt the unique variants. |
139
+ | [`COMPILER_HIDDEN_REQUIRED_FIELD`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_hidden_required_field) | A layer that creates a Resource hides a required field. | A layer still creates the Resource (a create or upsert variant, or a nested create) while a required field, or a required relation's reference field, is hidden or has its create capability exempted, and no compute.create fills it. | Expose the field, give it a compute.create stage, or exempt the layer's create operations. |
140
+ | [`COMPILER_INVALID_VALIDATOR`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_invalid_validator) | A field validator cannot apply. | A validator that is not built with AvZ, does not fit the field's type (AvZ.maxLength on an int, AvZ.maxItems on a field that is not a list), or sits on a relation or Json field. | Use an AvZ check that fits the field's type; a Json field's checks go in its json shape. |
141
+ | [`COMPILER_INVALID_JSON_SHAPE`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_invalid_json_shape) | A Json shape cannot apply. | A json shape on a field that is not a discovered Json field, a shape not built with AvZ, or one that admits null or absence at its top level. | Put the shape on a Json field, build it with AvZ, and keep its top level non-null (the column's nullability decides null). |
142
+ | [`COMPILER_INVALID_CLIENT_CONTRACT`](https://aventara.razor34.dev/framework/docs/error-codes#compiler_invalid_client_contract) | The compiled client contract is invalid. | The finished client contract failed its own structural check: a framework defect. | Report it with the diagnostic's path and message. |
package/README.md CHANGED
@@ -16,7 +16,7 @@ npx @aventara/cli@rc init # or: add Aventara to an existing NestJS 12
16
16
  npm install @aventara/core@rc # the package on its own
17
17
  ```
18
18
 
19
- Node `^22.18.0 || >=24.2.0`. ES modules, with a CommonJS `default` condition.
19
+ Node `^22.23.4 || >=24.22.1`. ES modules, with a CommonJS `default` condition.
20
20
 
21
21
  ## Documentation
22
22
 
@@ -53,7 +53,7 @@ of generic JSON. So does a client generated with `avclient`, which emits the typ
53
53
 
54
54
  The shape is also one of `meta`'s validators. Every write of `meta` is checked against it before the database is
55
55
  asked: a create, update, upsert, nested write or transaction step, including a value a transaction step takes from an
56
- earlier step. It is checked where validators run, after every pipe and before any interceptor or hook, and its issues
56
+ earlier step. It is checked where validators run, after every pipe and write compute and before any interceptor or hook, and its issues
57
57
  come in field order with the other validators'. A value out of shape is refused with `A2004`, one issue per problem at its
58
58
  exact path:
59
59
 
@@ -118,6 +118,47 @@ try {
118
118
  generated client throws the same classes by the same table. `framework.execute` and `framework.executeTransaction`, the
119
119
  entries a transport calls, still answer the envelope.
120
120
 
121
+ ## The client layer, called with your own values
122
+
123
+ `framework.client` reads its arguments in the wire forms a decoded request body carries: a `datetime` is its ISO string,
124
+ a `bigint` its base-10 string. That suits a test that should behave like a remote caller. Server code that acts for a
125
+ remote caller, such as a Server Component or a Server Action, holds `Date`s and `bigint`s instead. It calls
126
+ `framework.serverClient`:
127
+
128
+ ```ts
129
+ const recent = await framework.serverClient.Post.find.many({
130
+ where: { createdAt: { gt: new Date(Date.now() - 86_400_000) } },
131
+ select: ["id", "title"],
132
+ });
133
+ ```
134
+
135
+ `serverClient` has the client layer's types and rules: what the client layer hides is absent, and the client
136
+ pipelines, validation, exposure and policy run. Its arguments are the application forms (`Date`, `bigint`,
137
+ `AvDecimal`, `Uint8Array`), the same ones `framework.application` takes, and its results are `framework.client`'s.
138
+ Each call copies its arguments, encodes them into the wire forms and runs the request `framework.client` would run.
139
+ `framework.serverClientTx` builds client-layer transaction handles the same way; one `framework.transaction([...])`
140
+ may hold them beside `clientTx` handles, never beside `appTx` ones.
141
+
142
+ `framework.serverClient.all({ key: call, … }, { settle?, signal? })` awaits an object of calls together, in process,
143
+ as the generated client's `avClient.all` does in the browser. A call runs when it is made; wrap it in
144
+ `avLazy(() => call)` for `all` to start it, at most `limits.maxAllConcurrency` at once. It takes any number of
145
+ entries: `limits.maxAll` bounds `POST /_all` only. Strict by default (the first
146
+ failure rejects it and its `avLazy` entries not yet started never start); `settle: true` settles every key as
147
+ `{ status, value }` or `{ status, reason }`. Its `signal` aborts each entry; a call takes its own `signal` too.
148
+
149
+ ## Every code, explained
150
+
151
+ `AvErrorCatalog` holds every code this package answers, reports in a validation issue, or refuses to start with: its
152
+ `kind`, `message`, `cause`, `fix` and `docs` URL. The same catalog ships beside `dist` as `ERRORS.md`, and each entry
153
+ of a startup `AvConstructionError`'s `diagnostics` carries its code's `docs` URL.
154
+
155
+ ```ts
156
+ import { AvErrorCatalog } from "@aventara/core";
157
+
158
+ AvErrorCatalog.A2004.fix; // "Fix the argument each issue's path points at, …"
159
+ AvErrorCatalog.V1000.docs; // "https://aventara.razor34.dev/framework/docs/error-codes#v1000"
160
+ ```
161
+
121
162
  ## Required create fields are typed
122
163
 
123
164
  Each Resource's Contract states what a create cannot do without (`createRequirements`), as the adapter reads it off
@@ -149,13 +190,16 @@ it a `compute.create`, or exempt `create.many` and `create.count` in that layer
149
190
  A field your operation pipe fills server-side is now required of the caller. Give it a `compute.create` stage (or a
150
191
  database default) so callers can leave it out, or have them pass it.
151
192
 
193
+ Inside the pipeline the requirements hold from write compute on. A variant's guards, pipes and filters run before
194
+ compute, and their typed arguments require no field of a create, since compute may still fill it: `args.data.slug` is
195
+ `string | undefined` in a pipe, and a pipe may return a create without it. The variant's hooks and interceptors run
196
+ after compute and see every required field present.
197
+
152
198
  ## Returning a façade from a method
153
199
 
154
200
  A Nest project emits declarations (`declaration: true`), so a method without a return type has its type written out.
155
- Every node of the typed façades has a name for that: a whole surface (`AvApplicationFacade`), one Resource
156
- (`AvApplicationResourceFacade`), one family (`AvApplicationFamilyFacade`), and the same three for `client`, `appTx` and
157
- `clientTx` (`AvClientFacade`, `AvAppTxResourceFacade`, …). The declaration writes the name, with the Contract view as
158
- its argument, so this compiles:
201
+ Every node of the typed façades has a name for that, and so does the Contract view they are typed over, so a method can
202
+ return any of them without an annotation:
159
203
 
160
204
  ```ts
161
205
  @Injectable()
@@ -165,21 +209,48 @@ export class PostsService {
165
209
  posts() {
166
210
  return this.framework.application.Post;
167
211
  }
212
+
213
+ findMany() {
214
+ return this.framework.application.Post.find.many;
215
+ }
168
216
  }
169
217
  ```
170
218
 
171
- The view is written out in full, about 400 KB of declaration per such method over 50 Resources. Give the method a
172
- return type to keep it small: `AppFramework["application"]["Post"]` is written as that reference, about 0.2 KB.
219
+ The declaration file writes a short reference, under half a kilobyte per method at any schema size:
173
220
 
174
221
  ```ts
175
- posts(): AppFramework["application"]["Post"] {
176
- return this.framework.application.Post;
177
- }
222
+ posts(): import("@aventara/core").AvApplicationResourceFacade<
223
+ import("@aventara/core").AvContractView<import("…/discovery.artifact.js").AvModel, never, "omit", never, "omit", never, never>,
224
+ "Post">;
225
+ findMany(): import("@aventara/core").AvApplicationProjectingCall<
226
+ import("@aventara/core").AvContractView<import("…/discovery.artifact.js").AvModel, never, "omit", never, "omit", never, never>,
227
+ "Post", { readonly family: "find"; readonly variant: "many" }>;
178
228
  ```
179
229
 
180
- A variant (`this.framework.application.Post.find.many`) is a call type the declaration cannot name: give that method a
181
- return type, or return the call's result, whose row type is small. An application that publishes no declarations can
182
- set `"declaration": false` and skip the question.
230
+ The names, one set per surface (`application`, `client`, `serverClient`, `appTx`, `clientTx`, `serverClientTx`):
231
+
232
+ | Node | `framework.application` | the others |
233
+ | --- | --- | --- |
234
+ | the whole surface | `AvApplicationFacade` | `AvClientFacade`, `AvServerClientFacade`, `AvAppTxFacade`, `AvClientTxFacade`, `AvServerClientTxFacade` |
235
+ | one Resource | `AvApplicationResourceFacade` | `AvClientResourceFacade`, … |
236
+ | one family | `AvApplicationFamilyFacade` | `AvClientFamilyFacade`, … |
237
+ | a variant that takes a `select` or `include` | `AvApplicationProjectingCall` | `AvClientProjectingCall`, `AvServerClientProjectingCall`, `AvAppTxProjectingCall`, `AvClientTxProjectingCall`, `AvServerClientTxProjectingCall` |
238
+ | a variant that does not (the `count` variants: `find.count`, `update.count`, …) | `AvApplicationPlainCall` | `AvClientPlainCall`, `AvServerClientPlainCall`, `AvAppTxPlainCall`, `AvClientTxPlainCall`, `AvServerClientTxPlainCall` |
239
+
240
+ Each takes the view, `AvContractView`, as its first argument. The view's arguments are your model by its name, the root's
241
+ and the overlay's exposure as written, and the `fields` entries your configuration's `resources` blocks hold. A
242
+ configuration with no `fields` entries writes `never` there. One that has them writes those entries, stages erased, after
243
+ every reference: measured at about 23 KB per method over 50 Resources that each configure a field. Annotate the method
244
+ (`posts(): AppFramework["application"]["Post"]`) if that matters to you; the annotation is written as that reference.
245
+
246
+ You never need to write these names yourself. They exist so a declaration file can name what a method returns, and a
247
+ project that reads only your declarations types the method exactly as your Framework does. An application that publishes
248
+ no declarations can set `"declaration": false` and skip the question.
249
+
250
+ The configuration itself costs almost nothing to declare. The Prisma adapter's discovery artifact names the model's
251
+ type (`AvModel`), so the scaffold's `aventaraConfig()`, a `buildFramework` and its `AppFramework` alias write
252
+ `AvAdapter<AvModel>` and `AvFramework<AvModel, …>`: about 0.5 KB at any schema size, where rc.1 wrote
253
+ the model out once per mention (1.2 MB over 50 Resources).
183
254
 
184
255
  An exported `defineResource(...)` result, and an exported configuration or Framework builder holding typed stages,
185
256
  need no annotation: their stages are written by their public types (`readonly AvGuard[]`, `readonly AvPipe[]`, …),
@@ -187,8 +258,8 @@ never with the model the inline stages were typed from.
187
258
 
188
259
  ## Server-side calls copy their input
189
260
 
190
- `framework.application`, `framework.client`, `framework.execute`, `framework.executeTransaction`, and the `appTx` /
191
- `clientTx` builders read what you pass them once, when you call them, and copy it into plain data the framework owns.
261
+ `framework.application`, `framework.client`, `framework.serverClient`, `framework.execute`,
262
+ `framework.executeTransaction`, and the `appTx` / `clientTx` / `serverClientTx` builders read what you pass them once, when you call them, and copy it into plain data the framework owns.
192
263
  Validation, your guards and pipes, computed values and the adapter all see only the copy, and your stages see it
193
264
  frozen: only a pipe changes the arguments, by returning new ones, so what the validators checked is what the adapter
194
265
  writes. In practice:
@@ -287,6 +358,249 @@ It compiles to `framework.contracts.agent`, identified by its own hash, and `fra
287
358
  endpoint. A host runs agent calls through `AvProtocol.bind(framework, { origin: "agent" })`, which validates them
288
359
  exactly as client calls are validated, against the Agent Contract.
289
360
 
361
+ ## A policy engine
362
+
363
+ `policy` hands authorization to an engine Aventara never imports. The engine answers three questions per
364
+ Resource — may the principal run this action (`can`), which rows (`scopeOf`, a `where` fragment), which fields
365
+ (`fieldsOf`) — and core enforces the answers on every client and agent request:
366
+
367
+ ```ts
368
+ const framework = await createFramework({
369
+ api: "/api",
370
+ adapter,
371
+ policy: {
372
+ engine, // satisfies AvPolicyEngine
373
+ principal: ({ $state }) => $state.user ?? null,
374
+ },
375
+ });
376
+
377
+ await framework.application.Note.find.many({}, { as: user }); // checked as `user`
378
+ await framework.application.Note.find.many({}); // server code: not checked
379
+ ```
380
+
381
+ The read scope is applied at the adapter call, after every developer stage, to the root `where`, every to-many include
382
+ and its `$count`, and every relation filter. A field the engine governs (its `governed` list) is never in a default
383
+ projection; name it to get it, `select: ["$defaults", "email"]`. A refusal answers `403 A4002`.
384
+
385
+ Writes are checked too. A create asks `can` about each new row, whose rules may look rows up through `exists`. An
386
+ update or delete acts only on rows the caller may change and read; a single-row one that misses answers `A4002` when
387
+ the caller can read the row and `A2003` when it cannot. A field the write sends must be in
388
+ `fieldsOf({ access: "write", action })`, `action` being `"create"` or `"update"` (an upsert's branches and a nested
389
+ record's directive each their own), so a field can be locked on update and still written at create. A rule that
390
+ reaches another Resource through a relation (a note only in a campaign its author plays in) reads which of the
391
+ target's fields the reference names from the Core Contract (`framework.contracts.core`, a relation's `references`
392
+ beside its `referenceFields`); no Contract a caller is served states them. An update that moves a row out of what the caller reads, or fails an `after` condition
393
+ (`can` asked about the row the update returned), is rolled back. For an update the engine lists in `afterChecks`, that
394
+ question also carries `before`, the row as it was before the update; it is present only then. An engine that also
395
+ answers the optional `grantsOf` is asked, before the write, which of its grants cover that row (`exists` then sees
396
+ nothing the request writes), and gets the answer back on the after check as `beforeGrants`. Such an engine refuses
397
+ an after check that carries `before` without `beforeGrants` rather than deciding `before` after the write.
398
+ A typed literal in a fragment the engine answers may be in its application form (`Date`, `AvDecimal`, `bigint`) or its
399
+ wire form (an ISO string, a decimal string, a digit string), as a policy read from JSON states it. Where `transactionsStyle` is `"interactive"`, a
400
+ checked write with a check after it (an update, a nested write) runs in a transaction of its own, and a create or
401
+ delete checked before it runs is one statement; where it is `"none"`, a write that could only be checked after it runs
402
+ is refused (for after conditions, the updates the engine lists in `afterChecks`).
403
+
404
+ Nested writes (`$create`, `$connect` and the other relation directives) run as one call inside that transaction. Before
405
+ it, every row they link is held to the right scope: a linked row that holds the reference must be one the caller may
406
+ change, one whose parent holds it one the caller may read. Writing a reference field itself (`authorId: "u2"`) links
407
+ the same row, and is held the same way: the row it names must be one the caller may read. Where the adapter can link
408
+ the row in that write, core hands it the reference as a `$connect` carrying the read scope, so the write itself refuses
409
+ a row outside it (`A4002`), with no query of its own; where it cannot (a bulk write on Prisma), one `exists` per target
410
+ Resource asks before the write. Nothing is asked where that Resource is read by everyone, and a `null` reference is not
411
+ asked about. Only a reference to a Resource the Core Contract shows is held; one the root's exemptions hide is not, nor
412
+ one the engine lists in its optional `unheld`: a Resource its rules read in conditions and decide no read of (a
413
+ Resource another service owns, say), so its read scope is `false` for every caller. A reference to one of those, and a
414
+ `$connect` or `$set` that links one by the reference's own values where the writing row holds the reference, is
415
+ decided by the write's own grant
416
+ (`can`, and the after check `afterChecks` lists); reads of it are decided by `scopeOf` as always. An engine that has the
417
+ optional `hosted` is told the held Resources once the Framework is built (`hosted({ held })`), so it can check its own
418
+ rules against them; it answers nothing differently. A to-many `$update` or
419
+ `$delete` acts only on the rows the caller may change or delete, as `update.many` does. After the call, every row they changed is checked as an update is
420
+ (the after check, the move-out re-read), and every row they created is read back as stored and asked `can`; one refusal
421
+ rolls the whole write back. Where `transactionsStyle` is `"none"`, a nested write under a policy is refused.
422
+
423
+ ## An access provider
424
+
425
+ `access` takes the policy engine and the request state from one object, an `AvAccessProvider`. Aventara Access
426
+ provides one, and you can write your own. It has two members:
427
+
428
+ - `policy`: the engine, as `policy.engine` takes it.
429
+ - `state({ headers, request })`: seeds each request's `ctx.$state`. Its `me` is the principal the engine is asked
430
+ about (`null` for an anonymous caller).
431
+
432
+ The host calls `state` once per request: `@aventara/nest` with the platform request's headers and the request itself,
433
+ `@aventara/next` with the request's headers (and the route's `Request` on a route call). With `access`, leave out
434
+ `policy` and the host's own `state` option; either one beside it is refused at startup, and as a type error where the
435
+ configuration's type shows both. Server code that calls the Framework directly passes the state itself,
436
+ `{ state: await access.state({ headers }) }`.
437
+
438
+ A point-of-sale till with its own PIN sign-in, written by hand:
439
+
440
+ ```ts
441
+ import type { AvAccessProvider } from "@aventara/core";
442
+
443
+ type Cashier = { id: string; role: "cashier" | "manager" };
444
+
445
+ declare module "@aventara/core" {
446
+ interface AvState {
447
+ me?: Cashier | null;
448
+ }
449
+ }
450
+
451
+ export const tillAccess = {
452
+ // The till sends the PIN the cashier typed as `x-pos-pin`.
453
+ state: async ({ headers }) => ({ me: await cashierByPin(headers.get("x-pos-pin")) }),
454
+ policy: {
455
+ can: ({ principal, resource, action }) => {
456
+ const me = principal as Cashier | null;
457
+ if (me === null) return false; // no PIN, no till
458
+ if (resource === "Refund" && action !== "read") return me.role === "manager";
459
+ return true;
460
+ },
461
+ scopeOf: () => true,
462
+ fieldsOf: () => ({ always: "all", perRow: {} }),
463
+ },
464
+ } satisfies AvAccessProvider;
465
+
466
+ const framework = await createFramework({ api: "/api", adapter, access: tillAccess });
467
+ ```
468
+
469
+ Every stage reads the cashier as `ctx.$state.me`, typed by the `AvState` declaration above.
470
+
471
+ ### `$access` and the provider's `client`
472
+
473
+ A provider may also state `client`: where the app mounted Aventara Access (`url`, absolute `http(s)` or root-relative)
474
+ and the verbs it offers (`signIn`, `signUp`, `signOut`, `resetPassword`, `me`, and on Access's `kiosk` profile
475
+ `switchUser`, `lock`, `setPin`, `enrollDevice`, `revokeDevice`; each optional, any other name refused), each with its route
476
+ (`method`, `path`), the JSON Schema of its arguments and result (the subset a `json` field's shape uses), and `call`,
477
+ the verb run in process. Aventara Access fills it in. It is compiled into the Client Contract's `access` section with
478
+ each `call` dropped, so the hash changes only for apps whose provider states it. Every client then carries `$access`:
479
+
480
+ - `can(questions, options?)`: the batched `POST {api}/_access/can`, one boolean per question. An empty list answers
481
+ `[]` (`200 A1000`), not a refusal: a page with nothing to ask is no client bug, unlike an empty `/_transactions` plan.
482
+ - `me()`: the token identity `{ sub, claims }`, or `null`; and the sign-in verbs the provider offers. A verb the
483
+ provider leaves out (a `service` profile has no `signIn`/`signUp`; only a `kiosk` profile has `switchUser`, `lock`,
484
+ `setPin`, `enrollDevice`, `revokeDevice`) is no member of `$access`. `switchUser` and `enrollDevice` resolve
485
+ Access's answer, `lock`, `setPin` and `revokeDevice` nothing, as `signIn` and `signOut` do.
486
+
487
+ `framework.serverClient.$access` answers `can` in process under the call's `state` (or, with `headers` and no
488
+ `state`, the state the provider seeds from them; with neither, anonymously), and runs each verb through its `call` with
489
+ the headers you pass. The section's `url` and each verb's `path` are checked wherever a ClientContract is read: an
490
+ absolute `http(s)` URL or a root-relative path other than `/`, a path starting with one `/`, neither holding a control
491
+ character, a space or a `.`/`..` segment (percent-encoded too). Under Nest, hand the platform request and response too, so Access can read the
492
+ session and set a sign-in's cookie:
493
+
494
+ ```ts
495
+ const me = await framework.serverClient.$access.me({ headers: req.headers });
496
+ await framework.serverClient.$access.signIn(body, { headers: req.headers, request: req, response: res });
497
+ const [canRefund] = await framework.serverClient.$access.can([{ resource: "Refund", action: "create" }], { state });
498
+ ```
499
+
500
+ Without `access`, `serverClient` has no `$access` at all; a provider without `client` offers `can` alone.
501
+
502
+ On Access's `kiosk` profile, `switchUser`, `lock` and `enrollDevice` rotate the device's credential cookie: under
503
+ Nest, call them with the platform `response` (`{ headers, request, response }`), or the rotated cookie never reaches
504
+ the device and its next switch is refused. Under Next, call them from a Server Action. Never call a verb that changes
505
+ anything inside a cache (Next's `"use cache"`, a memoized helper): a cached answer replays one caller's result to
506
+ another and skips the call. Every verb's answer is projected onto its result schema, so no session token or device
507
+ secret reaches server code either.
508
+
509
+ ## A model managed elsewhere
510
+
511
+ Some tables belong to another service: Better Auth's `user`, or another service's schema in the same database. Your
512
+ service joins into them and must not write or migrate them. Mark such a model at the root:
513
+
514
+ ```ts
515
+ const framework = await createFramework({
516
+ api: "/api",
517
+ adapter,
518
+ resources: { Account: { managedElsewhere: true } },
519
+ });
520
+ ```
521
+
522
+ - `Account` has no `create`, `update`, `delete` or `upsert` in any layer, and its fields take no write. A call is a
523
+ type error, and an untyped one is refused with `A2002`.
524
+ - A relation into it keeps only `$connect` and `$disconnect`, and only where your model holds the key (`Post.authorId`
525
+ for `Post.author`). A nested `$create`, `$update` or `$upsert` into it is a type error and `A2004` (`V1006`).
526
+ - `framework.application` reads `Account` and filters and includes through `Post.author`. The client and agent layers
527
+ leave out `Account` and every relation into it, so `/_contract`, the generated client and the MCP tools never show
528
+ it. An overlay can't bring it back.
529
+ - A stage on one of its write families is refused at startup (`COMPILER_UNAVAILABLE_OPERATION`), and
530
+ `managedElsewhere` in an overlay is `CONFIG_FORBIDDEN_IN_OVERLAY`. So is any `client.resources.Account` or
531
+ `agent.resources.Account` entry (`COMPILER_UNKNOWN_RESOURCE`): those layers never have it, so nothing there runs.
532
+ - A delete that would write it through a referential action is refused at startup (`CONFIG_INVALID_VALUE` at
533
+ `resources.Account.managedElsewhere`): if any layer can delete a row whose deletion cascades into `Account` or sets
534
+ its reference to null or its default, directly or through other cascades. Take those deletes away at the root, or
535
+ make the reference `onDelete: Restrict`.
536
+ - A create that only the hidden relation could satisfy is refused at startup (`COMPILER_HIDDEN_REQUIRED_FIELD`), naming
537
+ the reference field to expose instead, so no client advertises a create that can't succeed.
538
+ - `framework.contracts.core` marks it `managedElsewhere: true`, and states every Resource's database `schema` where
539
+ the adapter knows it (`@@schema("auth")` with `@aventara/prisma7-adapter`). No other Contract carries either.
540
+
541
+ Two things stay yours. A key update follows the owner's foreign key (`ON UPDATE CASCADE` rewrites `Account`'s rows;
542
+ core has no `onUpdate` facts). And your own code — `ctx.$sql`, an application transaction's SQL step, a stage that
543
+ calls Prisma directly — can still write `Account`.
544
+
545
+ Aventara doesn't migrate anything, so tell Prisma too: list the table as external in `prisma.config.ts`.
546
+
547
+ ```ts
548
+ export default defineConfig({
549
+ schema: "prisma/schema.prisma",
550
+ experimental: { externalTables: true },
551
+ tables: { external: ["auth.Account"] },
552
+ });
553
+ ```
554
+
555
+ ## Caching reads
556
+
557
+ Reads are POST by default, which no browser or CDN caches. To let one keep a read, give it a `cache` stage:
558
+
559
+ ```ts
560
+ import { cache, createFramework } from "@aventara/core";
561
+
562
+ const framework = await createFramework({
563
+ api: "/api",
564
+ adapter,
565
+ resources: {
566
+ Product: { pipelines: { cache: cache({ for: "everyone", maxAge: 300 }) } },
567
+ Post: {
568
+ operations: {
569
+ find: { many: { pipelines: { cache: cache({ for: "anonymous", maxAge: 60 }) } } },
570
+ },
571
+ },
572
+ Order: { pipelines: { cache: cache({ for: "user", maxAge: 30 }) } },
573
+ },
574
+ });
575
+ ```
576
+
577
+ `for` says who may share one answer:
578
+
579
+ - `for: "user"`: the answer is the caller's own. `Cache-Control: private, max-age=<maxAge>`, `Vary: Authorization,
580
+ Cookie`: only the caller's browser keeps it.
581
+ - `for: "anonymous"`: every anonymous caller gets the same answer, which a CDN may keep (`public`); a signed-in caller's
582
+ stays `private`.
583
+ - `for: "everyone"`: every caller gets the same answer, and a CDN may hand it to anyone (`public`). Use it only where
584
+ nothing makes the answer differ by caller: no stage that reads the caller, no read compute that does, no policy that
585
+ scopes the rows or fields.
586
+
587
+ Always write `for`, even for the default `"user"`: the audience is the promise this read makes, and it should be visible
588
+ in the code. Aventara doesn't check the promise; it serves the headers you asked for.
589
+
590
+ - Put the stage at the root or `client` layer, a Resource, the `find` family or one `find` variant. The most specific one
591
+ wins; at one level, `client`'s replaces the root's. A write, a transaction, `application` or `agent` refuses it at
592
+ startup (`CONFIG_INVALID_VALUE`).
593
+ - A cached read is also served as `GET /api/_resources/<Resource>/find/<variant>?q=<arguments>&v=<contract hash>`. The
594
+ Client Contract marks it, so the generated client sends it that way.
595
+ - "Anonymous" means: with a policy (or `access`), the principal derived from the request's state is `null`; without one,
596
+ the request sends no `Cookie` and no `Authorization` header. If your callers sign in with a custom header, configure a
597
+ policy, or don't use `"anonymous"` or `"everyone"`.
598
+ - Every answer to a GET carries `Referrer-Policy: no-referrer`, `X-Content-Type-Options: nosniff` and an `ETag`; a matching
599
+ `If-None-Match` is `304`; anything but a `200` is `no-store`. A public answer echoes no `Aventara-Request-Id`.
600
+ - A new deploy changes the contract hash in the URL, so nothing cached before it is served after it.
601
+ - The URL holds the read's arguments: it shows up in server logs and browser history. A browser's prefetch is a GET
602
+ too, and runs your pipelines; they see `ctx.$transport.method === "GET"`.
603
+
290
604
  ## License
291
605
 
292
606
  PolyForm Shield 1.0.0 with an additional permission. It is free to use, including in commercial applications, but you
@@ -0,0 +1,6 @@
1
+ import type { ErrorCodeDescription } from "../runtime/error-guidance.js";
2
+ import type { AvAdapterDiscoveryDiagnosticCode } from "./adapter-discovery-diagnostic.js";
3
+ /** Meaning, cause and fix of every discovery diagnostic code. */
4
+ export declare const ADAPTER_DISCOVERY_DIAGNOSTIC_GUIDANCE: {
5
+ readonly [C in AvAdapterDiscoveryDiagnosticCode]: ErrorCodeDescription;
6
+ };
@@ -0,0 +1,7 @@
1
+ export const ADAPTER_DISCOVERY_DIAGNOSTIC_GUIDANCE = {
2
+ DISCOVERY_TRANSACTION_CAPABILITY_MISMATCH: {
3
+ message: "The adapter's transaction capability does not match it.",
4
+ cause: "The adapter declares interactive transactions but provides no transaction function.",
5
+ fix: "A defect of the adapter: install the adapter release that matches @aventara/core exactly.",
6
+ },
7
+ };