@haneinfo/identity-core 4.6.14 → 4.6.16

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.
package/README.md CHANGED
@@ -1,28 +1,28 @@
1
-
2
- # Identity core
3
-
4
- Provider-neutral identity storage and user management for Haneinfo plugins.
5
-
6
- ## Reader picker identity search
7
-
8
- IdentityStoreService implements optional IdentityStorePort.searchActiveByName. Active/name/excluded-user/keyset predicates and the 20-row cap run in PostgreSQL; only id and nullable name are selected. A caller transaction may be supplied. The method grants no instance access and exposes no new public user-search endpoint: collaboration performs the authorization. Upgrade identity-core together with collaboration for mention discovery.
9
-
10
- ## Batched active display names
11
-
12
- Identity-store optionally implements `findActiveNamesByIds(ids, transaction?)`, returning only `{ id, name }` for active matching users in one projected query, deduplicating ids and skipping empty input. Unknown, deleted and inactive users are omitted. Consumers use null for omitted names and for older providers without this optional method; they must authorize their objects before lookup and must not fall back to per-row findById calls. This adds no general-user HTTP endpoint or schema field.
13
-
14
-
15
- ## Authenticated name lookup
16
-
17
- GET /identity/users/lookup?q= uses InteractiveAuthGuard without AdminGuard. It trims q and requires
18
- 2–200 characters, otherwise INVALID_INPUT/400. It returns an array of at most twenty active users,
19
- each exactly { id, name }, with nullable name, ordered by name then id. Percent, underscore and
20
- backslash are literal search characters. There is no email/role disclosure, cursor or bulk export,
21
- and no new MCP tool. The existing identity-store keyset search keeps its id ordering; only this
22
- controller requests the concrete implementation's optional name sorting.
23
-
24
- ## Email matching preflight
25
-
26
- Before enabling this version, run `psql -X -v ON_ERROR_STOP=1 -f node_modules/@haneinfo/identity-core/scripts/check-email-duplicates.sql` against the target database with a read-only account. Configure the connection with standard PostgreSQL client settings. The SELECT prints existing case-insensitive duplicate emails to standard output; it does not write files, merge accounts, or modify data. Resolve duplicates manually before enabling authentication. Protect the output as personal data and do not redirect it to logs or files.
27
-
28
- New users are stored with lowercase email. Lookup ignores case and rejects ambiguous matches, including during import. Existing rows are not rewritten. The existing case-sensitive unique constraint cannot prevent an external writer from concurrently inserting mixed-case duplicates; all writers must follow this policy and operators should repeat the preflight as needed.
1
+
2
+ # Identity core
3
+
4
+ Provider-neutral identity storage and user management for Haneinfo plugins.
5
+
6
+ ## Reader picker identity search
7
+
8
+ IdentityStoreService implements optional IdentityStorePort.searchActiveByName. Active/name/excluded-user/keyset predicates and the 20-row cap run in PostgreSQL; only id and nullable name are selected. A caller transaction may be supplied. The method grants no instance access and exposes no new public user-search endpoint: collaboration performs the authorization. Upgrade identity-core together with collaboration for mention discovery.
9
+
10
+ ## Batched active display names
11
+
12
+ Identity-store optionally implements `findActiveNamesByIds(ids, transaction?)`, returning only `{ id, name }` for active matching users in one projected query, deduplicating ids and skipping empty input. Unknown, deleted and inactive users are omitted. Consumers use null for omitted names and for older providers without this optional method; they must authorize their objects before lookup and must not fall back to per-row findById calls. This adds no general-user HTTP endpoint or schema field.
13
+
14
+
15
+ ## Authenticated name lookup
16
+
17
+ GET /identity/users/lookup?q= uses InteractiveAuthGuard without AdminGuard. It trims q and requires
18
+ 2–200 characters, otherwise INVALID_INPUT/400. It returns an array of at most twenty active users,
19
+ each exactly { id, name }, with nullable name, ordered by name then id. Percent, underscore and
20
+ backslash are literal search characters. There is no email/role disclosure, cursor or bulk export,
21
+ and no new MCP tool. The existing identity-store keyset search keeps its id ordering; only this
22
+ controller requests the concrete implementation's optional name sorting.
23
+
24
+ ## Email matching preflight
25
+
26
+ Before enabling this version, run `psql -X -v ON_ERROR_STOP=1 -f node_modules/@haneinfo/identity-core/scripts/check-email-duplicates.sql` against the target database with a read-only account. Configure the connection with standard PostgreSQL client settings. The SELECT prints existing case-insensitive duplicate emails to standard output; it does not write files, merge accounts, or modify data. Resolve duplicates manually before enabling authentication. Protect the output as personal data and do not redirect it to logs or files.
27
+
28
+ New users are stored with lowercase email. Lookup ignores case and rejects ambiguous matches, including during import. Existing rows are not rewritten. The existing case-sensitive unique constraint cannot prevent an external writer from concurrently inserting mixed-case duplicates; all writers must follow this policy and operators should repeat the preflight as needed.
package/agent-guide.md CHANGED
@@ -1,9 +1,9 @@
1
- # identity-core
2
-
3
- ## Human picker lookup (decision 202610-e2a9)
4
-
5
- GET /identity/users/lookup?q= is available to every interactively authenticated person. A trimmed
6
- 2–200 character query matches literal active names, returns at most twenty { id, name } entries
7
- ordered by name/id, and never exposes email, roles or inactive records. Invalid input returns
8
- INVALID_INPUT/400. No MCP lookup/export tool or plugin-api port change is introduced. Existing
9
- searchActiveByName port consumers retain id cursor ordering.
1
+ # identity-core
2
+
3
+ ## Human picker lookup (decision 202610-e2a9)
4
+
5
+ GET /identity/users/lookup?q= is available to every interactively authenticated person. A trimmed
6
+ 2–200 character query matches literal active names, returns at most twenty { id, name } entries
7
+ ordered by name/id, and never exposes email, roles or inactive records. Invalid input returns
8
+ INVALID_INPUT/400. No MCP lookup/export tool or plugin-api port change is introduced. Existing
9
+ searchActiveByName port consumers retain id cursor ordering.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haneinfo/identity-core",
3
- "version": "4.6.14",
3
+ "version": "4.6.16",
4
4
  "private": false,
5
5
  "description": "Provider-neutral user and service-account identity for Haneinfo apps: the User model, Users CRUD and the haneinfo.identity-store capability.",
6
6
  "files": [
@@ -36,8 +36,8 @@
36
36
  "node": ">=22.0.0"
37
37
  },
38
38
  "dependencies": {
39
- "@haneinfo/frontend-shell": "1.6.1",
40
- "@haneinfo/plugin-api": "1.27.0"
39
+ "@haneinfo/frontend-shell": "1.6.2",
40
+ "@haneinfo/plugin-api": "1.28.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@haneinfo/common": "^0.6.1",
@@ -79,9 +79,9 @@
79
79
  "vitest": "^4.1.11",
80
80
  "zod": "^4.4.0",
81
81
  "@haneinfo/common": "0.6.1",
82
- "@haneinfo/frontend-shell": "1.6.1",
83
- "@haneinfo/plugin-host-nest": "2.1.1",
84
- "@haneinfo/plugin-testkit": "2.3.1"
82
+ "@haneinfo/frontend-shell": "1.6.2",
83
+ "@haneinfo/plugin-testkit": "2.3.1",
84
+ "@haneinfo/plugin-host-nest": "2.1.1"
85
85
  },
86
86
  "license": "UNLICENSED",
87
87
  "publishConfig": {
@@ -1,7 +1,7 @@
1
- -- Read-only preflight: run with psql -X -v ON_ERROR_STOP=1 -f check-email-duplicates.sql
2
- SELECT email
3
- FROM users
4
- WHERE lower(email) IN (
5
- SELECT lower(email) FROM users GROUP BY lower(email) HAVING count(*) > 1
6
- )
7
- ORDER BY lower(email), email;
1
+ -- Read-only preflight: run with psql -X -v ON_ERROR_STOP=1 -f check-email-duplicates.sql
2
+ SELECT email
3
+ FROM users
4
+ WHERE lower(email) IN (
5
+ SELECT lower(email) FROM users GROUP BY lower(email) HAVING count(*) > 1
6
+ )
7
+ ORDER BY lower(email), email;