@happyvertical/smrt-users 0.61.2 → 0.61.4

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 (34) hide show
  1. package/README.md +6 -1
  2. package/agents/oidc-provisioning.md +3 -1
  3. package/dist/chunks/{PasswordCredentialService-CYBl9GAn.js → PasswordCredentialService-BfYi-lfi.js} +37 -11
  4. package/dist/chunks/PasswordCredentialService-BfYi-lfi.js.map +1 -0
  5. package/dist/chunks/TerminalAuthService-BMa7Wdm1.js +4144 -0
  6. package/dist/chunks/TerminalAuthService-BMa7Wdm1.js.map +1 -0
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +32 -11
  10. package/dist/index.js.map +1 -1
  11. package/dist/manifest.json +1640 -634
  12. package/dist/migrations/backfillLegacyUserProfiles.d.ts +21 -1
  13. package/dist/migrations/backfillLegacyUserProfiles.d.ts.map +1 -1
  14. package/dist/models/CliAuthRequest.d.ts.map +1 -1
  15. package/dist/models/GroupMember.d.ts.map +1 -1
  16. package/dist/models/LoginAttempt.d.ts.map +1 -1
  17. package/dist/models/MembershipOverride.d.ts.map +1 -1
  18. package/dist/models/OAuthAuthorization.d.ts.map +1 -1
  19. package/dist/models/PasskeyChallenge.d.ts.map +1 -1
  20. package/dist/models/PasskeyCredential.d.ts.map +1 -1
  21. package/dist/models/PasswordCredential.d.ts.map +1 -1
  22. package/dist/models/PinCredential.d.ts.map +1 -1
  23. package/dist/models/ResourceGrant.d.ts.map +1 -1
  24. package/dist/models/RolePermission.d.ts.map +1 -1
  25. package/dist/models/TenantPermissionOverride.d.ts.map +1 -1
  26. package/dist/operator.js +1 -1
  27. package/dist/services/canonical-mailbox-identity.d.ts.map +1 -1
  28. package/dist/smrt-knowledge.json +7 -7
  29. package/dist/smrt-knowledge.okf.md +2 -2
  30. package/dist/sveltekit.js +2 -2
  31. package/package.json +12 -12
  32. package/dist/chunks/PasswordCredentialService-CYBl9GAn.js.map +0 -1
  33. package/dist/chunks/TerminalAuthService-BwZMBqmX.js +0 -4137
  34. package/dist/chunks/TerminalAuthService-BwZMBqmX.js.map +0 -1
@@ -4,6 +4,22 @@ export declare const LEGACY_USER_PROFILE_BACKFILL_NAME = "@happyvertical/smrt-us
4
4
  export interface BackfillLegacyUserProfilesResult {
5
5
  created: number;
6
6
  linked: number;
7
+ /**
8
+ * Profileless Users without an email that were left untouched. Always `0`
9
+ * unless `withoutEmail: 'skip'` is passed.
10
+ */
11
+ skipped: number;
12
+ }
13
+ export interface BackfillLegacyUserProfilesOptions {
14
+ /**
15
+ * How to treat a User with no Profile and no nonblank email.
16
+ *
17
+ * - `'fail'` (default): throw `LegacyUserProfileBackfillError('missing_email')`.
18
+ * - `'skip'`: leave the User unchanged and count it in `skipped`. Use this
19
+ * for non-person principals (service and agent identities) that have
20
+ * neither a Profile nor an email.
21
+ */
22
+ withoutEmail?: 'fail' | 'skip';
7
23
  }
8
24
  export type LegacyUserProfileBackfillErrorCode = 'duplicate_user_email' | 'missing_email' | 'profile_conflict' | 'profile_email_backfill_required' | 'profile_type_conflict' | 'reservation_conflict' | 'stale_user_email_key' | 'transaction_required' | 'user_email_backfill_required';
9
25
  /** Fail-closed deploy-time legacy User/Profile migration error. */
@@ -22,9 +38,13 @@ export declare class LegacyUserProfileBackfillError extends Error {
22
38
  * same-email Profiles are rejected for explicit operator reconciliation; this
23
39
  * migration never infers ownership and never creates an OIDC identity.
24
40
  *
41
+ * A profileless User with no email fails closed by default. Pass
42
+ * `{ withoutEmail: 'skip' }` to leave such non-person identities untouched and
43
+ * report them in `skipped`; Users with an email are still backfilled.
44
+ *
25
45
  * The completion marker records a successful pass but does not skip later
26
46
  * calls. A newly imported legacy User is therefore processed on the next run.
27
47
  */
28
- export declare function backfillLegacyUserProfiles(db: DatabaseInterface): Promise<BackfillLegacyUserProfilesResult>;
48
+ export declare function backfillLegacyUserProfiles(db: DatabaseInterface, options?: BackfillLegacyUserProfilesOptions): Promise<BackfillLegacyUserProfilesResult>;
29
49
  export {};
30
50
  //# sourceMappingURL=backfillLegacyUserProfiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"backfillLegacyUserProfiles.d.ts","sourceRoot":"","sources":["../../src/migrations/backfillLegacyUserProfiles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,KAAK,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;AAEjE,eAAO,MAAM,iCAAiC,sDACO,CAAC;AAEtD,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kCAAkC,GAC1C,sBAAsB,GACtB,eAAe,GACf,kBAAkB,GAClB,iCAAiC,GACjC,uBAAuB,GACvB,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,8BAA8B,CAAC;AAEnC,mEAAmE;AACnE,qBAAa,8BAA+B,SAAQ,KAAK;IAErD,QAAQ,CAAC,IAAI,EAAE,kCAAkC;gBAAxC,IAAI,EAAE,kCAAkC,EACjD,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAKhC;AAQD;;;;;;;;;;;GAWG;AACH,wBAAsB,0BAA0B,CAC9C,EAAE,EAAE,iBAAiB,GACpB,OAAO,CAAC,gCAAgC,CAAC,CA0M3C"}
1
+ {"version":3,"file":"backfillLegacyUserProfiles.d.ts","sourceRoot":"","sources":["../../src/migrations/backfillLegacyUserProfiles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,KAAK,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;AAEjE,eAAO,MAAM,iCAAiC,sDACO,C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AAI,CAAQ;IAE7B,uEAAuE;IAEvE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,iFAAiF;IAEjF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhC;;;;;OAKG;IAEH,SAAS,OAAc;IAEvB,wEAAwE;IAExE,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;CAChC;AAED,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"CliAuthRequest.d.ts","sourceRoot":"","sources":["../../src/models/CliAuthRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,qBASa,mBAAoB,SAAQ,UAAU;IACjD;;;;;OAKG;IAOH,QAAQ,SAAM;IAEd;;;;;OAKG;IAOH,cAAc,SAAM;IAEpB,2EAA2E;IAE3E,MAAM,EAAE,oBAAoB,CAAa;IAEzC,uEAAuE;IAEvE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B,uEAAuE;IAEvE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,iFAAiF;IAEjF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhC;;;;;OAKG;IAEH,SAAS,OAAc;IAEvB,wEAAwE;IAExE,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;CAChC;AAED,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GroupMember.d.ts","sourceRoot":"","sources":["../../src/models/GroupMember.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAaa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEJ,OAAO,GAAE,kBAAuB;CAK7C"}
1
+ {"version":3,"file":"GroupMember.d.ts","sourceRoot":"","sources":["../../src/models/GroupMember.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAaa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAMH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAMH,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEJ,OAAO,GAAE,kBAAuB;CAK7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LoginAttempt.d.ts","sourceRoot":"","sources":["../../src/models/LoginAttempt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAS,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAEnE,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErD,2EAA2E;AAC3E,qBASa,iBAAkB,SAAQ,UAAU;IAC/C,0DAA0D;IAE1D,UAAU,SAAM;IAEhB,iFAAiF;IAEjF,KAAK,EAAE,iBAAiB,CAAa;IAErC,0EAA0E;IAE1E,YAAY,SAAK;IAEjB,sDAAsD;IAEtD,eAAe,OAAc;IAE7B;;;OAGG;IAEH,aAAa,SAAK;IAElB;;;;;OAKG;IAEH,WAAW,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEhC;;;;;;;OAOG;IAEH,YAAY,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEjC;;;;;OAKG;IAEH,WAAW,OAAc;CAC1B"}
1
+ {"version":3,"file":"LoginAttempt.d.ts","sourceRoot":"","sources":["../../src/models/LoginAttempt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAS,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAEnE,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErD,2EAA2E;AAC3E,qBASa,iBAAkB,SAAQ,UAAU;IAC/C,0DAA0D;IAO1D,UAAU,SAAM;IAEhB,iFAAiF;IAEjF,KAAK,EAAE,iBAAiB,CAAa;IAErC,0EAA0E;IAE1E,YAAY,SAAK;IAEjB,sDAAsD;IAEtD,eAAe,OAAc;IAE7B;;;OAGG;IAEH,aAAa,SAAK;IAElB;;;;;OAKG;IAEH,WAAW,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEhC;;;;;;;OAOG;IAEH,YAAY,EAAE,IAAI,GAAG,IAAI,CAAQ;IAEjC;;;;;OAKG;IAEH,WAAW,OAAc;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"MembershipOverride.d.ts","sourceRoot":"","sources":["../../src/models/MembershipOverride.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAaa,kBAAmB,SAAQ,UAAU;IAChD;;OAEG;IAEH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEH,MAAM,EAAE,cAAc,CAAwB;gBAElC,OAAO,GAAE,yBAA8B;IASnD;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,MAAM,IAAI,OAAO;CAGlB"}
1
+ {"version":3,"file":"MembershipOverride.d.ts","sourceRoot":"","sources":["../../src/models/MembershipOverride.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAaa,kBAAmB,SAAQ,UAAU;IAChD;;OAEG;IAMH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAMH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEH,MAAM,EAAE,cAAc,CAAwB;gBAElC,OAAO,GAAE,yBAA8B;IASnD;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,MAAM,IAAI,OAAO;CAGlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthAuthorization.d.ts","sourceRoot":"","sources":["../../src/models/OAuthAuthorization.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,EAAS,UAAU,EAAQ,MAAM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,IAAI,MAAM,EAAE;IAGhC,SAAS,IAAI,MAAM,EAAE;CAGtB;AAED,gFAAgF;AAChF,qBAOa,uBAAwB,SAAQ,UAAU;IACX,eAAe,EAAE,MAAM,GAAG,IAAI,CACjE;IACsC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;CAC5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasskeyChallenge.d.ts","sourceRoot":"","sources":["../../src/models/PasskeyChallenge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAS,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAEnE,+EAA+E;AAC/E,eAAO,MAAM,qCAAqC,QAAU,CAAC;AAE7D,gDAAgD;AAChD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAExE,qBAQa,qBAAsB,SAAQ,UAAU;IACnD,uEAAuE;IAEvE,aAAa,SAAM;IAEnB,0CAA0C;IAE1C,OAAO,EAAE,uBAAuB,CAAoB;IAEpD;;;;OAIG;IAEH,SAAS,OAAc;CACxB"}
1
+ {"version":3,"file":"PasskeyChallenge.d.ts","sourceRoot":"","sources":["../../src/models/PasskeyChallenge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAS,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAEnE,+EAA+E;AAC/E,eAAO,MAAM,qCAAqC,QAAU,CAAC;AAE7D,gDAAgD;AAChD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAExE,qBAQa,qBAAsB,SAAQ,UAAU;IACnD,uEAAuE;IAOvE,aAAa,SAAM;IAEnB,0CAA0C;IAE1C,OAAO,EAAE,uBAAuB,CAAoB;IAEpD;;;;OAIG;IAEH,SAAS,OAAc;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasskeyCredential.d.ts","sourceRoot":"","sources":["../../src/models/PasskeyCredential.ts"],"names":[],"mappings":"AAA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GAAG,IAAI,CAAQ;CACjC"}
1
+ {"version":3,"file":"PasswordCredential.d.ts","sourceRoot":"","sources":["../../src/models/PasswordCredential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E,qBAQa,uBAAwB,SAAQ,UAAU;IACrD,yCAAyC;IAEzC,MAAM,SAAM;IAEZ,oDAAoD;IAOpD,YAAY,SAAM;IAElB,6EAA6E;IAE7E,OAAO,SAAK;IAEZ;;;OAGG;IAEH,UAAU,UAAS;IAEnB,yCAAyC;IAEzC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE9B,mEAAmE;IAEnE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PinCredential.d.ts","sourceRoot":"","sources":["../../src/models/PinCredential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E,qBAQa,kBAAmB,SAAQ,UAAU;IAChD,oCAAoC;IAEpC,MAAM,SAAM;IAEZ,oDAAoD;IAEpD,OAAO,SAAM;IAEb,mFAAmF;IAEnF,OAAO,SAAK;IAEZ,oFAAoF;IAEpF,SAAS,UAAS;IAElB,yCAAyC;IAEzC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE9B,mEAAmE;IAEnE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;CACjC"}
1
+ {"version":3,"file":"PinCredential.d.ts","sourceRoot":"","sources":["../../src/models/PinCredential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAE/E,qBAQa,kBAAmB,SAAQ,UAAU;IAChD,oCAAoC;IAEpC,MAAM,SAAM;IAEZ,oDAAoD;IAOpD,OAAO,SAAM;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AAE,oBAAyB;IAe9C,QAAQ,IAAI,OAAO;CAGpB"}
1
+ {"version":3,"file":"ResourceGrant.d.ts","sourceRoot":"","sources":["../../src/models/ResourceGrant.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnD,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;GAKG;AACH,qBAaa,aAAc,SAAQ,UAAU;IAE3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,YAAY,EAAE,MAAM,CAAM;IAK1B,UAAU,EAAE,MAAM,CAAM;IAKxB,UAAU,EAAE,MAAM,CAAM;IAMxB,MAAM,EAAE,mBAAmB,CAAW;IAKtC,WAAW,EAAE,OAAO,CAAS;IAK7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAK9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBACd,OAAO,GAAE,oBAAyB;IAe9C,QAAQ,IAAI,OAAO;CAGpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"RolePermission.d.ts","sourceRoot":"","sources":["../../src/models/RolePermission.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAWa,cAAe,SAAQ,UAAU;IAC5C;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAEH,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEV,OAAO,GAAE,qBAA0B;CAMhD"}
1
+ {"version":3,"file":"RolePermission.d.ts","sourceRoot":"","sources":["../../src/models/RolePermission.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAWa,cAAe,SAAQ,UAAU;IAC5C;;OAEG;IAMH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAMH,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEV,OAAO,GAAE,qBAA0B;CAMhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"TenantPermissionOverride.d.ts","sourceRoot":"","sources":["../../src/models/TenantPermissionOverride.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iBAAiB;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IACl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,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;OAEG;IACH,iBAAiB,IAAI,OAAO;CAG7B"}
package/dist/operator.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Dt as normalizeUsername, Et as normalizeEmail, I as UserCollection, P as verifySecretHash, Tt as isValidEmail, U as TenantCollection, _ as PermissionResolver, ct as UsersPasswordCredentialCollection, f as PasswordCredentialService, ft as MembershipCollection, ot as RoleCollection } from "./chunks/PasswordCredentialService-CYBl9GAn.js";
1
+ import { Dt as normalizeUsername, Et as normalizeEmail, I as UserCollection, P as verifySecretHash, Tt as isValidEmail, U as TenantCollection, _ as PermissionResolver, ct as UsersPasswordCredentialCollection, f as PasswordCredentialService, ft as MembershipCollection, ot as RoleCollection } from "./chunks/PasswordCredentialService-BfYi-lfi.js";
2
2
  import { a as MembershipStatus, l as TenantStatus, u as UserStatus } from "./chunks/types-DqUZxluX.js";
3
3
  import { isPostgresDatabase, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
4
4
  import { withSystemContext } from "@happyvertical/smrt-tenancy";
@@ -1 +1 @@
1
- {"version":3,"file":"canonical-mailbox-identity.d.ts","sourceRoot":"","sources":["../../src/services/canonical-mailbox-identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,8EAA8E;AAC9E,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE;IACL,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qBAAqB,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAAC;IAC5D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC;CACpC;;;GAkEF"}
1
+ {"version":3,"file":"canonical-mailbox-identity.d.ts","sourceRoot":"","sources":["../../src/services/canonical-mailbox-identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,8EAA8E;AAC9E,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE;IACL,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qBAAqB,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAAC;IAC5D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC;CACpC;;;GAkEF"}
@@ -3,15 +3,15 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-users",
6
- "packageVersion": "0.61.2",
6
+ "packageVersion": "0.61.4",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "fa0654a90e0a7b37fa0756c8a9e85ca1eb7c2ba1d2d2cde25bcf148002f518aa",
11
- "packageJson": "521f9b49c5a248beed868e4ba77b9b8096c7cf425b95fe57ff64616e79859572",
10
+ "manifest": "72ce6b0b60114fb137a11bd5d8be75d0d6dff41f2db16059ca2860bb4d9f302e",
11
+ "packageJson": "2a1378c4124adf1dc094d8de84bcfcdaa24046e63c05d5bc80e91b1aa6733cfc",
12
12
  "agents": "30b71cb25de701433b9b10de8968eaafb6f30e4dd933dc1328feac416c439d70",
13
13
  "moduleDoc:agents/permissions.md": "58e001789afc770ba904c1d971ada63b634684a04f69657514ce466422a90dee",
14
- "moduleDoc:agents/oidc-provisioning.md": "b73f3fdaf61136720132a614c7e14237b7bd35f7bf5d43eabb29f565485803b9",
14
+ "moduleDoc:agents/oidc-provisioning.md": "8408153424b22c6648f062151e261fe4b72271d5c0812b55e6d09a558a4386fd",
15
15
  "moduleDoc:agents/mobile-auth.md": "25e85e83f43e3a46383a92fa809f3a003b4545c3026e78dbe1bccbbc35161e18",
16
16
  "moduleDoc:agents/terminal-auth-testing.md": "ca6bdf325fe4edc3c875e6da38e3f5b4ae287bc0e7035002d275cf15de36e906",
17
17
  "moduleDoc:agents/family-invitations.md": "8598bfc3540b4c5ee2aef611db55dc2a8f6b6993fce9619f84a8ce32608a2954",
@@ -4930,7 +4930,7 @@
4930
4930
  {
4931
4931
  "name": "kind",
4932
4932
  "type": "text",
4933
- "required": true,
4933
+ "required": false,
4934
4934
  "columnType": "TEXT"
4935
4935
  },
4936
4936
  {
@@ -5911,7 +5911,7 @@
5911
5911
  {
5912
5912
  "name": "name",
5913
5913
  "type": "text",
5914
- "required": true,
5914
+ "required": false,
5915
5915
  "columnType": "TEXT"
5916
5916
  },
5917
5917
  {
@@ -8345,7 +8345,7 @@
8345
8345
  {
8346
8346
  "path": "agents/oidc-provisioning.md",
8347
8347
  "module": "oidc-provisioning",
8348
- "content": "# OIDC provisioning\n\nRead for changes to `src/collections/UserCollection.ts`, `src/services/OidcLoginService.ts`,\nOIDC handlers, or identity migrations. The canonical scenario matrix is\n`packages/profiles/src/testing/oidcProvisioningDecisionMatrix.ts`.\n\n- **OIDC `email_verified` is enforced.** `UserCollection.getOrCreateFromOidc`\n refuses to provision a user when the IdP explicitly returns\n `email_verified: false` (opt out with `{ allowUnverifiedEmail: true }`). An\n absent claim makes no assertion and is not enforced.\n- **RFC 9207 response issuer is exact.** OIDC callbacks validate a supplied\n `iss` against discovered metadata with exact string comparison before trusting\n a code or error. If metadata advertises issuer-response support, `iss` is\n required.\n- **The login start route is the IdP landing URL (#3569).** Kanidm drops a\n pending authorization after any detour through its `/ui/login` and strands the\n user in its apps panel; the client landing URL is the only way back.\n `getOidcClientRegistration()` derives it from `loginPath` (default\n `/auth/<provider>/login`) alongside the callback URL; keep the login handler\n safe to enter with no query string.\n- **Verified-email Profile reuse is fail-closed.** The typed canonical scenarios\n live in\n `packages/profiles/src/testing/oidcProvisioningDecisionMatrix.ts`; both\n package suites execute that matrix and public docs reference it rather than\n maintaining another behavioral table. Default provisioning reuses only one\n unowned, global `Person`. Tenant-scoped, non-Person, duplicate-email,\n and already-owned matches fail before User/session creation. An existing\n issuer/subject link without a User must still be the unique global Person for\n the current verified claim email; once owned, the stable issuer/subject link\n reuses its canonical Person and owner.\n Issuer and subject are opaque, case-sensitive identifiers; preserve their\n exact value and use trim only to reject blank claims.\n- **`resolveProfile` is the application reconciliation boundary.** The\n SvelteKit handlers, `OidcLoginService`, and `getOrCreateFromOidc` accept the\n same hook inside the provisioning transaction. The service/handler path\n supplies protocol-validated claims; direct collection callers must validate\n and trust their claim source before calling `getOrCreateFromOidc`.\n Token/userinfo merging keeps `email` and `email_verified` paired to the same\n claim source; verification is never borrowed across sources.\n Resolver reads/writes use the supplied `db`, and the hook must be idempotent\n because a concurrent unique-key conflict can retry it. `undefined` chooses\n the secure default and `null` rejects, including exact issuer/subject reuse.\n For a new identity, a supplied Profile is still validated as the unique,\n unowned global Person for the verified email. For an exact existing identity,\n it must be the already-linked Profile and cannot rebind identity authority;\n stable-link owner and canonical-Person checks still apply. The hook receives a\n separate frozen claims snapshot; internal retry and persistence state is not\n exposed for mutation.\n- **Owned first binding requires `authorizeProfileOwner`.** An invitation or\n approval workflow may explicitly return both its pre-provisioned canonical\n global `Person` and existing approved `User` from this transaction-bound\n hook. `undefined` keeps the secure `profile_owned` default and `null`\n rejects. SMRT treats only the selected IDs as input, reloads them in the\n provisioning transaction, and requires `email_verified === true`, the unique\n canonical global Person for the normalized claim email, exactly one owner,\n that owner as the selected User, and the same normalized User email. The\n hook runs before identity/User/session creation and may be retried, so use\n only its supplied `db` and `users` handles and keep application authorization\n idempotent. Never authorize from email matching alone. Existing exact\n identities cannot be rebound; when `resolveProfile` is also present both\n hooks must select the same Profile.\n- **OIDC first login is atomic.** The Profile, `OidcIdentity`, and User are one\n transaction. The database arbiters are `OidcIdentity.identityKey`,\n private `oidc_profile_email_reservations.email_key`, `User.emailKey`, and the\n unique `User.profileId`; local callbacks acquire exact issuer/subject and normalized\n email locks in deterministic order so changed email claims also serialize.\n SQLite and DuckDB callbacks additionally serialize every root-handle statement\n the coordinator owns per database URL — `_smrt_backfills` initialization, the\n transaction, and the post-commit rebind — because one adapter multiplexes a\n single native connection and cannot safely overlap unrelated root\n transactions. Never overlap two statements on one such handle, inside a\n transaction or not: rebind and owner/email candidate reads are sequential,\n never `Promise.all`. Owner-authorized DuckDB callbacks use that same\n root-handle serialization;\n PostgreSQL deadlock and serialization errors use a bounded transaction retry.\n Newly provisioned Profiles use non-semantic per-profile slugs so equal IdP\n display names cannot trigger a natural-key upsert;\n run\n `smrt db:status`, `smrt db:migrate`, then `smrt db:status` before deployment.\n Stop or upgrade old writers first. Before migration, group\n non-null `users.profile_id` values, then reconcile duplicates. After\n migration, run public `backfillProfileEmailKeys(db)`,\n `backfillUserEmailKeys(db)`, then `backfillLegacyUserProfiles(db)` from one\n deploy process. The first two use the shared\n TypeScript `normalizeIdentityEmail()` implementation transactionally and are\n idempotent; the User backfill fails before writes if normalized duplicates\n remain. The legacy Profile backfill transactionally creates canonical global\n Persons for null/blank User links without creating OIDC identities or\n inferring ownership; reconcile any same-email Profile or reservation before\n retrying. Its marker records a completed pass but never skips newly imported\n legacy Users on a later run. Every OIDC path requires the Profile email-key\n readiness marker; creating a User or checking User email uniqueness\n additionally requires the User marker. A stable issuer/subject with an\n existing owning User skips only the User email-key lookup and marker. Full\n scans remain in the explicit deploy step; guarded runtime paths use indexed\n keys and validate only returned candidates. Multiple null links remain valid.\n Legacy race keys backfill only after canonical validation. Pass a root\n database on adapters such as DuckDB that cannot create nested savepoints.\n Root adapters must expose `beginTransaction`; transaction-only handles are\n ambiguous and fail closed before provisioning writes. Caller-owned\n transactions never run `_smrt_backfills` DDL and require that table to\n already exist; use the root database when initialization or recovery is\n needed.\n"
8348
+ "content": "# OIDC provisioning\n\nRead for changes to `src/collections/UserCollection.ts`, `src/services/OidcLoginService.ts`,\nOIDC handlers, or identity migrations. The canonical scenario matrix is\n`packages/profiles/src/testing/oidcProvisioningDecisionMatrix.ts`.\n\n- **OIDC `email_verified` is enforced.** `UserCollection.getOrCreateFromOidc`\n refuses to provision a user when the IdP explicitly returns\n `email_verified: false` (opt out with `{ allowUnverifiedEmail: true }`). An\n absent claim makes no assertion and is not enforced.\n- **RFC 9207 response issuer is exact.** OIDC callbacks validate a supplied\n `iss` against discovered metadata with exact string comparison before trusting\n a code or error. If metadata advertises issuer-response support, `iss` is\n required.\n- **The login start route is the IdP landing URL (#3569).** Kanidm drops a\n pending authorization after any detour through its `/ui/login` and strands the\n user in its apps panel; the client landing URL is the only way back.\n `getOidcClientRegistration()` derives it from `loginPath` (default\n `/auth/<provider>/login`) alongside the callback URL; keep the login handler\n safe to enter with no query string.\n- **Verified-email Profile reuse is fail-closed.** The typed canonical scenarios\n live in\n `packages/profiles/src/testing/oidcProvisioningDecisionMatrix.ts`; both\n package suites execute that matrix and public docs reference it rather than\n maintaining another behavioral table. Default provisioning reuses only one\n unowned, global `Person`. Tenant-scoped, non-Person, duplicate-email,\n and already-owned matches fail before User/session creation. An existing\n issuer/subject link without a User must still be the unique global Person for\n the current verified claim email; once owned, the stable issuer/subject link\n reuses its canonical Person and owner.\n Issuer and subject are opaque, case-sensitive identifiers; preserve their\n exact value and use trim only to reject blank claims.\n- **`resolveProfile` is the application reconciliation boundary.** The\n SvelteKit handlers, `OidcLoginService`, and `getOrCreateFromOidc` accept the\n same hook inside the provisioning transaction. The service/handler path\n supplies protocol-validated claims; direct collection callers must validate\n and trust their claim source before calling `getOrCreateFromOidc`.\n Token/userinfo merging keeps `email` and `email_verified` paired to the same\n claim source; verification is never borrowed across sources.\n Resolver reads/writes use the supplied `db`, and the hook must be idempotent\n because a concurrent unique-key conflict can retry it. `undefined` chooses\n the secure default and `null` rejects, including exact issuer/subject reuse.\n For a new identity, a supplied Profile is still validated as the unique,\n unowned global Person for the verified email. For an exact existing identity,\n it must be the already-linked Profile and cannot rebind identity authority;\n stable-link owner and canonical-Person checks still apply. The hook receives a\n separate frozen claims snapshot; internal retry and persistence state is not\n exposed for mutation.\n- **Owned first binding requires `authorizeProfileOwner`.** An invitation or\n approval workflow may explicitly return both its pre-provisioned canonical\n global `Person` and existing approved `User` from this transaction-bound\n hook. `undefined` keeps the secure `profile_owned` default and `null`\n rejects. SMRT treats only the selected IDs as input, reloads them in the\n provisioning transaction, and requires `email_verified === true`, the unique\n canonical global Person for the normalized claim email, exactly one owner,\n that owner as the selected User, and the same normalized User email. The\n hook runs before identity/User/session creation and may be retried, so use\n only its supplied `db` and `users` handles and keep application authorization\n idempotent. Never authorize from email matching alone. Existing exact\n identities cannot be rebound; when `resolveProfile` is also present both\n hooks must select the same Profile.\n- **OIDC first login is atomic.** The Profile, `OidcIdentity`, and User are one\n transaction. The database arbiters are `OidcIdentity.identityKey`,\n private `oidc_profile_email_reservations.email_key`, `User.emailKey`, and the\n unique `User.profileId`; local callbacks acquire exact issuer/subject and normalized\n email locks in deterministic order so changed email claims also serialize.\n SQLite and DuckDB callbacks additionally serialize every root-handle statement\n the coordinator owns per database URL — `_smrt_backfills` initialization, the\n transaction, and the post-commit rebind — because one adapter multiplexes a\n single native connection and cannot safely overlap unrelated root\n transactions. Never overlap two statements on one such handle, inside a\n transaction or not: rebind and owner/email candidate reads are sequential,\n never `Promise.all`. Owner-authorized DuckDB callbacks use that same\n root-handle serialization;\n PostgreSQL deadlock and serialization errors use a bounded transaction retry.\n Newly provisioned Profiles use non-semantic per-profile slugs so equal IdP\n display names cannot trigger a natural-key upsert;\n run\n `smrt db:status`, `smrt db:migrate`, then `smrt db:status` before deployment.\n Stop or upgrade old writers first. Before migration, group\n non-null `users.profile_id` values, then reconcile duplicates. After\n migration, run public `backfillProfileEmailKeys(db)`,\n `backfillUserEmailKeys(db)`, then `backfillLegacyUserProfiles(db)` from one\n deploy process. The first two use the shared\n TypeScript `normalizeIdentityEmail()` implementation transactionally and are\n idempotent; the User backfill fails before writes if normalized duplicates\n remain. The legacy Profile backfill transactionally creates canonical global\n Persons for null/blank User links without creating OIDC identities or\n inferring ownership; reconcile any same-email Profile or reservation before\n retrying. It returns `{ created, linked, skipped }`; a profileless User without\n an email fails with `missing_email` unless `{ withoutEmail: 'skip' }` is passed\n for non-person identities. Its marker records a completed pass but never skips newly imported\n legacy Users on a later run. Every OIDC path requires the Profile email-key\n readiness marker; creating a User or checking User email uniqueness\n additionally requires the User marker. A stable issuer/subject with an\n existing owning User skips only the User email-key lookup and marker. Full\n scans remain in the explicit deploy step; guarded runtime paths use indexed\n keys and validate only returned candidates. Multiple null links remain valid.\n Legacy race keys backfill only after canonical validation. Pass a root\n database on adapters such as DuckDB that cannot create nested savepoints.\n Root adapters must expose `beginTransaction`; transaction-only handles are\n ambiguous and fail closed before provisioning writes. Caller-owned\n transactions never run `_smrt_backfills` DDL and require that table to\n already exist; use the root database when initialization or recovery is\n needed.\n"
8349
8349
  },
8350
8350
  {
8351
8351
  "path": "agents/mobile-auth.md",
@@ -5,10 +5,10 @@ description: "Multi-tenant user management for the SMRT framework - users, tenan
5
5
  status: "stable"
6
6
  generated:
7
7
  by: "smrt/scripts/generate-knowledge-okf.ts"
8
- at: "2026-11-12T05:53:42Z"
8
+ at: "2026-11-16T03:15:28Z"
9
9
  audience: "internal"
10
10
  evidence_level: "source-inspected"
11
- source_revision: "sha256:29899b6cef3620acbd0d9defe5a9d102798784759783bd21b102426491d77726"
11
+ source_revision: "sha256:f250b4c81d7371e8a933ea7b8114a4e68895ef70d0d71aff37339cd48ef1c723"
12
12
  sources:
13
13
  - id: "manifest"
14
14
  resource: "https://github.com/happyvertical/smrt/blob/main/packages/users/package.json"
package/dist/sveltekit.js CHANGED
@@ -1,5 +1,5 @@
1
- import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-CYBl9GAn.js";
2
- import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-BwZMBqmX.js";
1
+ import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-BfYi-lfi.js";
2
+ import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-BMa7Wdm1.js";
3
3
  import { DiscoveryArtifactValidationError, SMRT_APP_RESULT_CONTRACT, SMRT_APP_RESULT_SCHEMA, SMRT_APP_RESULT_VERSION, SMRT_DISCOVERY_CONFORMANCE_ARTIFACT_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_VERSION, SMRT_MCP_RESULT_METADATA_KEY, canonicalizeDiscoveryArtifact, createDiscoveryConformanceArtifact, deriveCommandRequirements, validateDiscoveryConformanceArtifact } from "./app-contract.js";
4
4
  import { ObjectRegistry, createClassNamePredicate, resolveCustomActionMetadata, resolveEffectiveActionMetadata } from "@happyvertical/smrt-core";
5
5
  import { createLogger } from "@happyvertical/logger";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-users",
3
- "version": "0.61.2",
3
+ "version": "0.61.4",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Multi-tenant user management for the SMRT framework - users, tenants, roles, permissions, groups",
6
6
  "type": "module",
@@ -59,22 +59,22 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@happyvertical/auth": "^0.112.3",
63
- "@happyvertical/logger": "^0.112.3",
64
- "@happyvertical/smrt-config": "0.61.2",
65
- "@happyvertical/smrt-core": "0.61.2",
66
- "@happyvertical/smrt-mobile-contract": "0.61.2",
67
- "@happyvertical/smrt-profiles": "0.61.2",
68
- "@happyvertical/smrt-tenancy": "0.61.2",
69
- "@happyvertical/smrt-types": "0.61.2",
70
- "@happyvertical/smrt-ui": "0.61.2",
71
- "@happyvertical/sql": "^0.112.3",
62
+ "@happyvertical/auth": "^0.113.0",
63
+ "@happyvertical/logger": "^0.113.0",
64
+ "@happyvertical/smrt-config": "0.61.4",
65
+ "@happyvertical/smrt-core": "0.61.4",
66
+ "@happyvertical/smrt-mobile-contract": "0.61.4",
67
+ "@happyvertical/smrt-profiles": "0.61.4",
68
+ "@happyvertical/smrt-tenancy": "0.61.4",
69
+ "@happyvertical/smrt-types": "0.61.4",
70
+ "@happyvertical/smrt-ui": "0.61.4",
71
+ "@happyvertical/sql": "^0.113.0",
72
72
  "@simplewebauthn/browser": "^14.0.0",
73
73
  "@simplewebauthn/server": "^14.0.3",
74
74
  "jose": "^6.2.12"
75
75
  },
76
76
  "devDependencies": {
77
- "@happyvertical/smrt-vitest": "0.61.2",
77
+ "@happyvertical/smrt-vitest": "0.61.4",
78
78
  "@sveltejs/package": "^2.5.8",
79
79
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
80
80
  "@types/node": "24.13.6",