@astram/guide 0.2.27 → 0.2.28

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 (2) hide show
  1. package/CAPABILITIES.md +8 -1
  2. package/package.json +1 -1
package/CAPABILITIES.md CHANGED
@@ -82,7 +82,14 @@ imports: [
82
82
  - **Live roles** — a role posting change, a grant change or a user disable bumps the permission
83
83
  version; the next request reloads facts and roles. No re-login needed.
84
84
  - **Engine errors → HTTP** — `AuthorizationDeniedError` → 403, `ValidationError` → 400,
85
- `EngineUnavailableError` → 503 for your controllers too (global filter; id-free messages).
85
+ `EngineUnavailableError` → 503, `UniqueConflictError` → 409 `unique_conflict` for your
86
+ controllers too (global filter; id-free, value-free messages).
87
+ - **Duplicate keys** — a create / update that hits a UNIQUE index throws `UniqueConflictError`
88
+ (`typeKey`, `constraint` = the index name, `rowIndex` for `createMany`). Match it with
89
+ `isUniqueConflict(err, '<constraint>')`, never by message text. Inside `transaction(fn)` the
90
+ transaction is then rollback-only (a further write is a 503): re-read in a fresh transaction for
91
+ the idempotent answer. On a tenant type, lead every UNIQUE index with the tenant column, or a
92
+ 409 reveals that another tenant holds the value.
86
93
 
87
94
  ## Authentication and sessions (`@astram/guard`, `auth: true`)
88
95
  - `POST /auth/login` `{ identityHint, password }` → `{ session, tokens }`, or an MFA challenge.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astram/guide",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "license": "MIT",
5
5
  "description": "Astram framework — the AI/dev GUIDE layer (ADR-0025). Ships the framework's hard rules + capabilities manifest as installed, upgrade-refreshed docs. A consumer app's CLAUDE.md references FRAMEWORK_RULES.md from this package; `npm update` replaces it wholesale so new rules arrive cleanly, while the app's own .astram/guide/ layer is never touched. This is the framework-owned FLOOR: an app rule may tighten it, never weaken it.",
6
6
  "type": "commonjs",