@happyvertical/smrt-profiles 0.54.2 → 0.54.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.
- package/AGENTS.md +1 -1
- package/dist/agent-profile.d.ts +2 -2
- package/dist/agent-profile.d.ts.map +1 -1
- package/dist/audit-trail.d.ts +24 -0
- package/dist/audit-trail.d.ts.map +1 -0
- package/dist/auth/index.d.ts +5 -5
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/magicLinkService.d.ts +2 -2
- package/dist/auth/magicLinkService.d.ts.map +1 -1
- package/dist/auth/nip05Handler.d.ts +1 -1
- package/dist/auth/nip05Handler.d.ts.map +1 -1
- package/dist/auth/oidcProvisioningPrimitives.d.ts +2 -2
- package/dist/auth/oidcProvisioningPrimitives.d.ts.map +1 -1
- package/dist/auth/resolveIdentity.d.ts +5 -5
- package/dist/auth/resolveIdentity.d.ts.map +1 -1
- package/dist/chunks/{ApiKey-BZmbOTnL.js → ApiKey-CVmlf3V6.js} +11 -3
- package/dist/chunks/ApiKey-CVmlf3V6.js.map +1 -0
- package/dist/chunks/{ApiKeyCollection-Bfb_nw81.js → ApiKeyCollection-CiiDNFdD.js} +3 -3
- package/dist/chunks/{ApiKeyCollection-Bfb_nw81.js.map → ApiKeyCollection-CiiDNFdD.js.map} +1 -1
- package/dist/chunks/{AuditLogCollection-B1YonCAP.js → AuditLogCollection-WDHL-_AF.js} +30 -12
- package/dist/chunks/AuditLogCollection-WDHL-_AF.js.map +1 -0
- package/dist/chunks/{NostrIdentity-n70E0vck.js → NostrIdentity-AC8fAdxe.js} +12 -4
- package/dist/chunks/{NostrIdentity-n70E0vck.js.map → NostrIdentity-AC8fAdxe.js.map} +1 -1
- package/dist/chunks/{NostrIdentityCollection-Ca74dkaL.js → NostrIdentityCollection-CctlECpX.js} +2 -2
- package/dist/chunks/{NostrIdentityCollection-Ca74dkaL.js.map → NostrIdentityCollection-CctlECpX.js.map} +1 -1
- package/dist/chunks/{OidcIdentity-Cb1bxreM.js → OidcIdentity-BjRu3n1g.js} +11 -3
- package/dist/chunks/OidcIdentity-BjRu3n1g.js.map +1 -0
- package/dist/chunks/{OidcIdentityCollection-TV8VdK69.js → OidcIdentityCollection-B4jYh36_.js} +3 -3
- package/dist/chunks/{OidcIdentityCollection-TV8VdK69.js.map → OidcIdentityCollection-B4jYh36_.js.map} +1 -1
- package/dist/chunks/{ProfileAssetCollection-B9hacUJa.js → ProfileAssetCollection-HeMtjBc0.js} +12 -3
- package/dist/chunks/ProfileAssetCollection-HeMtjBc0.js.map +1 -0
- package/dist/chunks/{ProfileCollection-DuJT7Mum.js → ProfileCollection-Bt6IJK49.js} +49 -25
- package/dist/chunks/ProfileCollection-Bt6IJK49.js.map +1 -0
- package/dist/chunks/{ProfileLinkCollection-4uNURz32.js → ProfileLinkCollection-u1hhzKTm.js} +11 -3
- package/dist/chunks/ProfileLinkCollection-u1hhzKTm.js.map +1 -0
- package/dist/chunks/{ProfileMetadataCollection-DQhbfEfa.js → ProfileMetadataCollection-BIYKy4Y3.js} +10 -2
- package/dist/chunks/ProfileMetadataCollection-BIYKy4Y3.js.map +1 -0
- package/dist/chunks/{ProfileMetafieldCollection-CoBuM_5G.js → ProfileMetafieldCollection-Buz7gzag.js} +10 -2
- package/dist/chunks/ProfileMetafieldCollection-Buz7gzag.js.map +1 -0
- package/dist/chunks/{ProfileRelationshipCollection-DUVgaIqf.js → ProfileRelationshipCollection-C4g_QLI4.js} +13 -5
- package/dist/chunks/ProfileRelationshipCollection-C4g_QLI4.js.map +1 -0
- package/dist/chunks/{ProfileRelationshipTermCollection-DtA9OM23.js → ProfileRelationshipTermCollection-C9J7mC7P.js} +10 -2
- package/dist/chunks/ProfileRelationshipTermCollection-C9J7mC7P.js.map +1 -0
- package/dist/chunks/{ProfileRelationshipType-BRiRka6t.js → ProfileRelationshipType-U7IwF6Wf.js} +10 -2
- package/dist/chunks/ProfileRelationshipType-U7IwF6Wf.js.map +1 -0
- package/dist/chunks/{ProfileRelationshipTypeCollection-BdXwd7Kf.js → ProfileRelationshipTypeCollection-_n22WqTb.js} +3 -3
- package/dist/chunks/{ProfileRelationshipTypeCollection-BdXwd7Kf.js.map → ProfileRelationshipTypeCollection-_n22WqTb.js.map} +1 -1
- package/dist/chunks/{oidcProvisioningPrimitives-D9OYu5-F.js → oidcProvisioningPrimitives-CYood-2M.js} +14 -4
- package/dist/chunks/{oidcProvisioningPrimitives-D9OYu5-F.js.map → oidcProvisioningPrimitives-CYood-2M.js.map} +1 -1
- package/dist/chunks/{resolveIdentity-B-PK6RwU.js → resolveIdentity-CvGDegU6.js} +16 -16
- package/dist/chunks/{resolveIdentity-B-PK6RwU.js.map → resolveIdentity-CvGDegU6.js.map} +1 -1
- package/dist/collections/ApiKeyCollection.d.ts +2 -2
- package/dist/collections/ApiKeyCollection.d.ts.map +1 -1
- package/dist/collections/AuditLogCollection.d.ts +5 -3
- package/dist/collections/AuditLogCollection.d.ts.map +1 -1
- package/dist/collections/MagicLinkTokenCollection.d.ts +1 -1
- package/dist/collections/MagicLinkTokenCollection.d.ts.map +1 -1
- package/dist/collections/NostrIdentityCollection.d.ts +2 -2
- package/dist/collections/NostrIdentityCollection.d.ts.map +1 -1
- package/dist/collections/OidcIdentityCollection.d.ts +2 -2
- package/dist/collections/OidcIdentityCollection.d.ts.map +1 -1
- package/dist/collections/OidcProfileEmailReservationCollection.d.ts +1 -1
- package/dist/collections/OidcProfileEmailReservationCollection.d.ts.map +1 -1
- package/dist/collections/ProfileAssetCollection.d.ts +1 -1
- package/dist/collections/ProfileAssetCollection.d.ts.map +1 -1
- package/dist/collections/ProfileCollection.d.ts +1 -1
- package/dist/collections/ProfileCollection.d.ts.map +1 -1
- package/dist/collections/ProfileLinkCollection.d.ts +1 -1
- package/dist/collections/ProfileLinkCollection.d.ts.map +1 -1
- package/dist/collections/ProfileMetadataCollection.d.ts +1 -1
- package/dist/collections/ProfileMetadataCollection.d.ts.map +1 -1
- package/dist/collections/ProfileMetafieldCollection.d.ts +2 -2
- package/dist/collections/ProfileMetafieldCollection.d.ts.map +1 -1
- package/dist/collections/ProfileRelationshipCollection.d.ts +1 -1
- package/dist/collections/ProfileRelationshipCollection.d.ts.map +1 -1
- package/dist/collections/ProfileRelationshipTermCollection.d.ts +1 -1
- package/dist/collections/ProfileRelationshipTermCollection.d.ts.map +1 -1
- package/dist/collections/ProfileRelationshipTypeCollection.d.ts +1 -1
- package/dist/collections/ProfileRelationshipTypeCollection.d.ts.map +1 -1
- package/dist/collections/ProfileTypeCollection.d.ts +1 -1
- package/dist/collections/ProfileTypeCollection.d.ts.map +1 -1
- package/dist/collections/index.d.ts +15 -15
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +51 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -24
- package/dist/index.js.map +1 -1
- package/dist/internal/oidc-provisioning.d.ts +1 -1
- package/dist/internal/oidc-provisioning.d.ts.map +1 -1
- package/dist/internal/oidc-provisioning.js +2 -2
- package/dist/manifest.json +126 -33
- package/dist/models/ApiKey.d.ts +1 -1
- package/dist/models/ApiKey.d.ts.map +1 -1
- package/dist/models/AuditLog.d.ts +10 -2
- package/dist/models/AuditLog.d.ts.map +1 -1
- package/dist/models/MagicLinkToken.d.ts +1 -1
- package/dist/models/MagicLinkToken.d.ts.map +1 -1
- package/dist/models/NostrIdentity.d.ts +1 -1
- package/dist/models/NostrIdentity.d.ts.map +1 -1
- package/dist/models/OidcIdentity.d.ts +1 -1
- package/dist/models/OidcIdentity.d.ts.map +1 -1
- package/dist/models/Profile.d.ts +10 -8
- package/dist/models/Profile.d.ts.map +1 -1
- package/dist/models/ProfileMetafield.d.ts +1 -1
- package/dist/models/ProfileMetafield.d.ts.map +1 -1
- package/dist/models/ProfileRelationship.d.ts +1 -1
- package/dist/models/ProfileRelationship.d.ts.map +1 -1
- package/dist/models/ProfileRelationshipType.d.ts +1 -1
- package/dist/models/ProfileRelationshipType.d.ts.map +1 -1
- package/dist/models/ProfileTypes.d.ts +1 -1
- package/dist/models/ProfileTypes.d.ts.map +1 -1
- package/dist/models/index.d.ts +15 -15
- package/dist/models/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +62 -366
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -4
- package/package.json +12 -12
- package/dist/chunks/ApiKey-BZmbOTnL.js.map +0 -1
- package/dist/chunks/AuditLogCollection-B1YonCAP.js.map +0 -1
- package/dist/chunks/OidcIdentity-Cb1bxreM.js.map +0 -1
- package/dist/chunks/ProfileAssetCollection-B9hacUJa.js.map +0 -1
- package/dist/chunks/ProfileCollection-DuJT7Mum.js.map +0 -1
- package/dist/chunks/ProfileLinkCollection-4uNURz32.js.map +0 -1
- package/dist/chunks/ProfileMetadataCollection-DQhbfEfa.js.map +0 -1
- package/dist/chunks/ProfileMetafieldCollection-CoBuM_5G.js.map +0 -1
- package/dist/chunks/ProfileRelationshipCollection-DUVgaIqf.js.map +0 -1
- package/dist/chunks/ProfileRelationshipTermCollection-DtA9OM23.js.map +0 -1
- package/dist/chunks/ProfileRelationshipType-BRiRka6t.js.map +0 -1
package/dist/models/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SMRT model exports for profiles package
|
|
3
3
|
*/
|
|
4
|
-
export { ApiKey, type ApiKeyOptions, type GenerateKeyResult } from
|
|
5
|
-
export { AuditLog, type AuditLogOptions, type AuditSource } from
|
|
6
|
-
export { type GenerateTokenResult, MagicLinkToken, type MagicLinkTokenOptions, } from
|
|
7
|
-
export { NostrIdentity, type NostrIdentityOptions } from
|
|
8
|
-
export { OidcIdentity, type OidcIdentityOptions } from
|
|
9
|
-
export { OidcProfileEmailReservation, type OidcProfileEmailReservationOptions, } from
|
|
10
|
-
export { Profile } from
|
|
11
|
-
export { isProfileLinkPlatform, normalizeProfileLinkUrl, PROFILE_LINK_MAX_LABEL_LENGTH, PROFILE_LINK_MAX_URL_LENGTH, PROFILE_LINK_PLATFORMS, ProfileLink, type ProfileLinkOptions, type ProfileLinkPlatform, } from
|
|
12
|
-
export { ProfileMetadata } from
|
|
13
|
-
export { ProfileMetafield } from
|
|
14
|
-
export { ProfileRelationship } from
|
|
15
|
-
export { ProfileRelationshipTerm } from
|
|
16
|
-
export { ProfileRelationshipType } from
|
|
17
|
-
export { ProfileType } from
|
|
18
|
-
export { Bot, Organization, Person } from
|
|
4
|
+
export { ApiKey, type ApiKeyOptions, type GenerateKeyResult } from "./ApiKey.js";
|
|
5
|
+
export { AuditLog, type AuditLogOptions, type AuditSource } from "./AuditLog.js";
|
|
6
|
+
export { type GenerateTokenResult, MagicLinkToken, type MagicLinkTokenOptions, } from "./MagicLinkToken.js";
|
|
7
|
+
export { NostrIdentity, type NostrIdentityOptions } from "./NostrIdentity.js";
|
|
8
|
+
export { OidcIdentity, type OidcIdentityOptions } from "./OidcIdentity.js";
|
|
9
|
+
export { OidcProfileEmailReservation, type OidcProfileEmailReservationOptions, } from "./OidcProfileEmailReservation.js";
|
|
10
|
+
export { Profile } from "./Profile.js";
|
|
11
|
+
export { isProfileLinkPlatform, normalizeProfileLinkUrl, PROFILE_LINK_MAX_LABEL_LENGTH, PROFILE_LINK_MAX_URL_LENGTH, PROFILE_LINK_PLATFORMS, ProfileLink, type ProfileLinkOptions, type ProfileLinkPlatform, } from "./ProfileLink.js";
|
|
12
|
+
export { ProfileMetadata } from "./ProfileMetadata.js";
|
|
13
|
+
export { ProfileMetafield } from "./ProfileMetafield.js";
|
|
14
|
+
export { ProfileRelationship } from "./ProfileRelationship.js";
|
|
15
|
+
export { ProfileRelationshipTerm } from "./ProfileRelationshipTerm.js";
|
|
16
|
+
export { ProfileRelationshipType } from "./ProfileRelationshipType.js";
|
|
17
|
+
export { ProfileType } from "./ProfileType.js";
|
|
18
|
+
export { Bot, Organization, Person } from "./ProfileTypes.js";
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAU,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,eAAY,CAAC;AAC9E,OAAO,EACL,KAAK,mBAAmB,EACxB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAiB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAgB,CAAC;AACxE,OAAO,EACL,2BAA2B,EAC3B,KAAK,kCAAkC,GACxC,MAAM,kCAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,sBAAsB,EACtB,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,kBAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA2B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAe,CAAC;AAE5C,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAgB,CAAC"}
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-profiles",
|
|
6
|
-
"packageVersion": "0.54.
|
|
6
|
+
"packageVersion": "0.54.4",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "af2666e6116f3719ebb954c50cff67409a7b6ea217084260f2e922285850c3ba",
|
|
11
|
+
"packageJson": "ecd8c37d00698065cdaeb10a6716671b9e85b06f3a9267d3118861fe6e8e556c",
|
|
12
|
+
"agents": "6f73ea6628f32d4799d6c0f9da4ab98a2ae7c5e7e43e2554b8d874233789e170"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
15
15
|
".",
|
|
@@ -407,166 +407,62 @@
|
|
|
407
407
|
"returns": "Promise<AuditLog>"
|
|
408
408
|
}
|
|
409
409
|
],
|
|
410
|
-
"surfaces": [
|
|
411
|
-
|
|
412
|
-
"kind": "api",
|
|
413
|
-
"name": "auditlogs.findByProfile",
|
|
414
|
-
"operation": "findByProfile",
|
|
415
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
416
|
-
"path": "/auditlogs/findByProfile",
|
|
417
|
-
"method": "POST"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"kind": "api",
|
|
421
|
-
"name": "auditlogs.findByResource",
|
|
422
|
-
"operation": "findByResource",
|
|
423
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
424
|
-
"path": "/auditlogs/findByResource",
|
|
425
|
-
"method": "POST"
|
|
426
|
-
},
|
|
410
|
+
"surfaces": [],
|
|
411
|
+
"withheldSurfaces": [
|
|
427
412
|
{
|
|
428
413
|
"kind": "api",
|
|
429
|
-
"name": "auditlogs.findByAction",
|
|
430
414
|
"operation": "findByAction",
|
|
431
|
-
"
|
|
432
|
-
"
|
|
433
|
-
"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"kind": "api",
|
|
437
|
-
"name": "auditlogs.findBySource",
|
|
438
|
-
"operation": "findBySource",
|
|
439
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
440
|
-
"path": "/auditlogs/findBySource",
|
|
441
|
-
"method": "POST"
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
"kind": "api",
|
|
445
|
-
"name": "auditlogs.findOnBehalfOf",
|
|
446
|
-
"operation": "findOnBehalfOf",
|
|
447
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
448
|
-
"path": "/auditlogs/findOnBehalfOf",
|
|
449
|
-
"method": "POST"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"kind": "api",
|
|
453
|
-
"name": "auditlogs.getRecentActivity",
|
|
454
|
-
"operation": "getRecentActivity",
|
|
455
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
456
|
-
"path": "/auditlogs/getRecentActivity",
|
|
457
|
-
"method": "POST"
|
|
415
|
+
"code": "api-disabled",
|
|
416
|
+
"reason": "api is disabled",
|
|
417
|
+
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
458
418
|
},
|
|
459
419
|
{
|
|
460
420
|
"kind": "api",
|
|
461
|
-
"name": "auditlogs.getResourceTimeline",
|
|
462
|
-
"operation": "getResourceTimeline",
|
|
463
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
464
|
-
"path": "/auditlogs/getResourceTimeline",
|
|
465
|
-
"method": "POST"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"kind": "cli",
|
|
469
|
-
"name": "auditlogcollection_findByProfile",
|
|
470
421
|
"operation": "findByProfile",
|
|
422
|
+
"code": "api-disabled",
|
|
423
|
+
"reason": "api is disabled",
|
|
471
424
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
472
425
|
},
|
|
473
426
|
{
|
|
474
|
-
"kind": "
|
|
475
|
-
"name": "auditlogcollection_findByResource",
|
|
427
|
+
"kind": "api",
|
|
476
428
|
"operation": "findByResource",
|
|
429
|
+
"code": "api-disabled",
|
|
430
|
+
"reason": "api is disabled",
|
|
477
431
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
478
432
|
},
|
|
479
433
|
{
|
|
480
|
-
"kind": "
|
|
481
|
-
"name": "auditlogcollection_findByAction",
|
|
482
|
-
"operation": "findByAction",
|
|
483
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
"kind": "cli",
|
|
487
|
-
"name": "auditlogcollection_findBySource",
|
|
434
|
+
"kind": "api",
|
|
488
435
|
"operation": "findBySource",
|
|
436
|
+
"code": "api-disabled",
|
|
437
|
+
"reason": "api is disabled",
|
|
489
438
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
490
439
|
},
|
|
491
440
|
{
|
|
492
|
-
"kind": "
|
|
493
|
-
"name": "auditlogcollection_findOnBehalfOf",
|
|
441
|
+
"kind": "api",
|
|
494
442
|
"operation": "findOnBehalfOf",
|
|
443
|
+
"code": "api-disabled",
|
|
444
|
+
"reason": "api is disabled",
|
|
495
445
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
496
446
|
},
|
|
497
447
|
{
|
|
498
|
-
"kind": "
|
|
499
|
-
"name": "auditlogcollection_record",
|
|
500
|
-
"operation": "record",
|
|
501
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"kind": "cli",
|
|
505
|
-
"name": "auditlogcollection_getRecentActivity",
|
|
448
|
+
"kind": "api",
|
|
506
449
|
"operation": "getRecentActivity",
|
|
450
|
+
"code": "api-disabled",
|
|
451
|
+
"reason": "api is disabled",
|
|
507
452
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
508
453
|
},
|
|
509
454
|
{
|
|
510
|
-
"kind": "
|
|
511
|
-
"name": "auditlogcollection_getResourceTimeline",
|
|
455
|
+
"kind": "api",
|
|
512
456
|
"operation": "getResourceTimeline",
|
|
457
|
+
"code": "api-disabled",
|
|
458
|
+
"reason": "api is disabled",
|
|
513
459
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
514
460
|
},
|
|
515
|
-
{
|
|
516
|
-
"kind": "mcp",
|
|
517
|
-
"name": "auditlogcollection_findbyprofile",
|
|
518
|
-
"operation": "findByProfile",
|
|
519
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
"kind": "mcp",
|
|
523
|
-
"name": "auditlogcollection_findbyresource",
|
|
524
|
-
"operation": "findByResource",
|
|
525
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"kind": "mcp",
|
|
529
|
-
"name": "auditlogcollection_findbyaction",
|
|
530
|
-
"operation": "findByAction",
|
|
531
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
"kind": "mcp",
|
|
535
|
-
"name": "auditlogcollection_findbysource",
|
|
536
|
-
"operation": "findBySource",
|
|
537
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
"kind": "mcp",
|
|
541
|
-
"name": "auditlogcollection_findonbehalfof",
|
|
542
|
-
"operation": "findOnBehalfOf",
|
|
543
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
"kind": "mcp",
|
|
547
|
-
"name": "auditlogcollection_record",
|
|
548
|
-
"operation": "record",
|
|
549
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"kind": "mcp",
|
|
553
|
-
"name": "auditlogcollection_getrecentactivity",
|
|
554
|
-
"operation": "getRecentActivity",
|
|
555
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"kind": "mcp",
|
|
559
|
-
"name": "auditlogcollection_getresourcetimeline",
|
|
560
|
-
"operation": "getResourceTimeline",
|
|
561
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
562
|
-
}
|
|
563
|
-
],
|
|
564
|
-
"withheldSurfaces": [
|
|
565
461
|
{
|
|
566
462
|
"kind": "api",
|
|
567
463
|
"operation": "record",
|
|
568
|
-
"code": "
|
|
569
|
-
"reason": "
|
|
464
|
+
"code": "api-disabled",
|
|
465
|
+
"reason": "api is disabled",
|
|
570
466
|
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
571
467
|
}
|
|
572
468
|
],
|
|
@@ -3057,6 +2953,20 @@
|
|
|
3057
2953
|
"columnType": "TEXT",
|
|
3058
2954
|
"default": ""
|
|
3059
2955
|
},
|
|
2956
|
+
{
|
|
2957
|
+
"name": "reason",
|
|
2958
|
+
"type": "text",
|
|
2959
|
+
"required": false,
|
|
2960
|
+
"columnType": "TEXT",
|
|
2961
|
+
"default": ""
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
"name": "changes",
|
|
2965
|
+
"type": "json",
|
|
2966
|
+
"required": false,
|
|
2967
|
+
"columnType": "JSON",
|
|
2968
|
+
"default": {}
|
|
2969
|
+
},
|
|
3060
2970
|
{
|
|
3061
2971
|
"name": "resourceType",
|
|
3062
2972
|
"type": "text",
|
|
@@ -3071,6 +2981,13 @@
|
|
|
3071
2981
|
"columnType": "TEXT",
|
|
3072
2982
|
"default": ""
|
|
3073
2983
|
},
|
|
2984
|
+
{
|
|
2985
|
+
"name": "occurredAt",
|
|
2986
|
+
"type": "datetime",
|
|
2987
|
+
"required": false,
|
|
2988
|
+
"columnType": "TIMESTAMP",
|
|
2989
|
+
"default": "current_timestamp"
|
|
2990
|
+
},
|
|
3074
2991
|
{
|
|
3075
2992
|
"name": "source",
|
|
3076
2993
|
"type": "text",
|
|
@@ -3151,69 +3068,34 @@
|
|
|
3151
3068
|
"slug",
|
|
3152
3069
|
"context"
|
|
3153
3070
|
],
|
|
3154
|
-
"surfaces": [
|
|
3155
|
-
{
|
|
3156
|
-
"kind": "api",
|
|
3157
|
-
"name": "auditlogs.list",
|
|
3158
|
-
"operation": "list",
|
|
3159
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog",
|
|
3160
|
-
"path": "/auditlogs",
|
|
3161
|
-
"method": "GET"
|
|
3162
|
-
},
|
|
3163
|
-
{
|
|
3164
|
-
"kind": "api",
|
|
3165
|
-
"name": "auditlogs.get",
|
|
3166
|
-
"operation": "get",
|
|
3167
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog",
|
|
3168
|
-
"path": "/auditlogs/[id]",
|
|
3169
|
-
"method": "GET"
|
|
3170
|
-
},
|
|
3171
|
-
{
|
|
3172
|
-
"kind": "cli",
|
|
3173
|
-
"name": "auditlog_list",
|
|
3174
|
-
"operation": "list",
|
|
3175
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3176
|
-
},
|
|
3177
|
-
{
|
|
3178
|
-
"kind": "mcp",
|
|
3179
|
-
"name": "auditlog_list",
|
|
3180
|
-
"operation": "list",
|
|
3181
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3182
|
-
},
|
|
3183
|
-
{
|
|
3184
|
-
"kind": "mcp",
|
|
3185
|
-
"name": "auditlog_get",
|
|
3186
|
-
"operation": "get",
|
|
3187
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3188
|
-
}
|
|
3189
|
-
],
|
|
3071
|
+
"surfaces": [],
|
|
3190
3072
|
"withheldSurfaces": [
|
|
3191
3073
|
{
|
|
3192
3074
|
"kind": "api",
|
|
3193
3075
|
"operation": "getEffectiveActor",
|
|
3194
|
-
"code": "
|
|
3195
|
-
"reason": "
|
|
3076
|
+
"code": "api-disabled",
|
|
3077
|
+
"reason": "api is disabled",
|
|
3196
3078
|
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3197
3079
|
},
|
|
3198
3080
|
{
|
|
3199
3081
|
"kind": "api",
|
|
3200
3082
|
"operation": "getOnBehalfOf",
|
|
3201
|
-
"code": "
|
|
3202
|
-
"reason": "
|
|
3083
|
+
"code": "api-disabled",
|
|
3084
|
+
"reason": "api is disabled",
|
|
3203
3085
|
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3204
3086
|
},
|
|
3205
3087
|
{
|
|
3206
3088
|
"kind": "api",
|
|
3207
3089
|
"operation": "getProfile",
|
|
3208
|
-
"code": "
|
|
3209
|
-
"reason": "
|
|
3090
|
+
"code": "api-disabled",
|
|
3091
|
+
"reason": "api is disabled",
|
|
3210
3092
|
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3211
3093
|
},
|
|
3212
3094
|
{
|
|
3213
3095
|
"kind": "api",
|
|
3214
3096
|
"operation": "record",
|
|
3215
|
-
"code": "
|
|
3216
|
-
"reason": "
|
|
3097
|
+
"code": "api-disabled",
|
|
3098
|
+
"reason": "api is disabled",
|
|
3217
3099
|
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
3218
3100
|
}
|
|
3219
3101
|
],
|
|
@@ -7594,7 +7476,7 @@
|
|
|
7594
7476
|
"kind": "api",
|
|
7595
7477
|
"operation": "recordAction",
|
|
7596
7478
|
"code": "not-wireable",
|
|
7597
|
-
"reason": "not routed:
|
|
7479
|
+
"reason": "not routed: the declared type of `options` could not be resolved by the scanner",
|
|
7598
7480
|
"objectName": "@happyvertical/smrt-profiles:Person"
|
|
7599
7481
|
},
|
|
7600
7482
|
{
|
|
@@ -8690,7 +8572,7 @@
|
|
|
8690
8572
|
"kind": "api",
|
|
8691
8573
|
"operation": "recordAction",
|
|
8692
8574
|
"code": "not-wireable",
|
|
8693
|
-
"reason": "not routed:
|
|
8575
|
+
"reason": "not routed: the declared type of `options` could not be resolved by the scanner",
|
|
8694
8576
|
"objectName": "@happyvertical/smrt-profiles:Organization"
|
|
8695
8577
|
},
|
|
8696
8578
|
{
|
|
@@ -9786,7 +9668,7 @@
|
|
|
9786
9668
|
"kind": "api",
|
|
9787
9669
|
"operation": "recordAction",
|
|
9788
9670
|
"code": "not-wireable",
|
|
9789
|
-
"reason": "not routed:
|
|
9671
|
+
"reason": "not routed: the declared type of `options` could not be resolved by the scanner",
|
|
9790
9672
|
"objectName": "@happyvertical/smrt-profiles:Bot"
|
|
9791
9673
|
},
|
|
9792
9674
|
{
|
|
@@ -9973,158 +9855,6 @@
|
|
|
9973
9855
|
"operation": "cleanupExpired",
|
|
9974
9856
|
"objectName": "@happyvertical/smrt-profiles:ApiKeyCollection"
|
|
9975
9857
|
},
|
|
9976
|
-
{
|
|
9977
|
-
"kind": "api",
|
|
9978
|
-
"name": "auditlogs.findByProfile",
|
|
9979
|
-
"operation": "findByProfile",
|
|
9980
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
9981
|
-
"path": "/auditlogs/findByProfile",
|
|
9982
|
-
"method": "POST"
|
|
9983
|
-
},
|
|
9984
|
-
{
|
|
9985
|
-
"kind": "api",
|
|
9986
|
-
"name": "auditlogs.findByResource",
|
|
9987
|
-
"operation": "findByResource",
|
|
9988
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
9989
|
-
"path": "/auditlogs/findByResource",
|
|
9990
|
-
"method": "POST"
|
|
9991
|
-
},
|
|
9992
|
-
{
|
|
9993
|
-
"kind": "api",
|
|
9994
|
-
"name": "auditlogs.findByAction",
|
|
9995
|
-
"operation": "findByAction",
|
|
9996
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
9997
|
-
"path": "/auditlogs/findByAction",
|
|
9998
|
-
"method": "POST"
|
|
9999
|
-
},
|
|
10000
|
-
{
|
|
10001
|
-
"kind": "api",
|
|
10002
|
-
"name": "auditlogs.findBySource",
|
|
10003
|
-
"operation": "findBySource",
|
|
10004
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
10005
|
-
"path": "/auditlogs/findBySource",
|
|
10006
|
-
"method": "POST"
|
|
10007
|
-
},
|
|
10008
|
-
{
|
|
10009
|
-
"kind": "api",
|
|
10010
|
-
"name": "auditlogs.findOnBehalfOf",
|
|
10011
|
-
"operation": "findOnBehalfOf",
|
|
10012
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
10013
|
-
"path": "/auditlogs/findOnBehalfOf",
|
|
10014
|
-
"method": "POST"
|
|
10015
|
-
},
|
|
10016
|
-
{
|
|
10017
|
-
"kind": "api",
|
|
10018
|
-
"name": "auditlogs.getRecentActivity",
|
|
10019
|
-
"operation": "getRecentActivity",
|
|
10020
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
10021
|
-
"path": "/auditlogs/getRecentActivity",
|
|
10022
|
-
"method": "POST"
|
|
10023
|
-
},
|
|
10024
|
-
{
|
|
10025
|
-
"kind": "api",
|
|
10026
|
-
"name": "auditlogs.getResourceTimeline",
|
|
10027
|
-
"operation": "getResourceTimeline",
|
|
10028
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection",
|
|
10029
|
-
"path": "/auditlogs/getResourceTimeline",
|
|
10030
|
-
"method": "POST"
|
|
10031
|
-
},
|
|
10032
|
-
{
|
|
10033
|
-
"kind": "cli",
|
|
10034
|
-
"name": "auditlogcollection_findByProfile",
|
|
10035
|
-
"operation": "findByProfile",
|
|
10036
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10037
|
-
},
|
|
10038
|
-
{
|
|
10039
|
-
"kind": "cli",
|
|
10040
|
-
"name": "auditlogcollection_findByResource",
|
|
10041
|
-
"operation": "findByResource",
|
|
10042
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10043
|
-
},
|
|
10044
|
-
{
|
|
10045
|
-
"kind": "cli",
|
|
10046
|
-
"name": "auditlogcollection_findByAction",
|
|
10047
|
-
"operation": "findByAction",
|
|
10048
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10049
|
-
},
|
|
10050
|
-
{
|
|
10051
|
-
"kind": "cli",
|
|
10052
|
-
"name": "auditlogcollection_findBySource",
|
|
10053
|
-
"operation": "findBySource",
|
|
10054
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10055
|
-
},
|
|
10056
|
-
{
|
|
10057
|
-
"kind": "cli",
|
|
10058
|
-
"name": "auditlogcollection_findOnBehalfOf",
|
|
10059
|
-
"operation": "findOnBehalfOf",
|
|
10060
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10061
|
-
},
|
|
10062
|
-
{
|
|
10063
|
-
"kind": "cli",
|
|
10064
|
-
"name": "auditlogcollection_record",
|
|
10065
|
-
"operation": "record",
|
|
10066
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10067
|
-
},
|
|
10068
|
-
{
|
|
10069
|
-
"kind": "cli",
|
|
10070
|
-
"name": "auditlogcollection_getRecentActivity",
|
|
10071
|
-
"operation": "getRecentActivity",
|
|
10072
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10073
|
-
},
|
|
10074
|
-
{
|
|
10075
|
-
"kind": "cli",
|
|
10076
|
-
"name": "auditlogcollection_getResourceTimeline",
|
|
10077
|
-
"operation": "getResourceTimeline",
|
|
10078
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10079
|
-
},
|
|
10080
|
-
{
|
|
10081
|
-
"kind": "mcp",
|
|
10082
|
-
"name": "auditlogcollection_findbyprofile",
|
|
10083
|
-
"operation": "findByProfile",
|
|
10084
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10085
|
-
},
|
|
10086
|
-
{
|
|
10087
|
-
"kind": "mcp",
|
|
10088
|
-
"name": "auditlogcollection_findbyresource",
|
|
10089
|
-
"operation": "findByResource",
|
|
10090
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10091
|
-
},
|
|
10092
|
-
{
|
|
10093
|
-
"kind": "mcp",
|
|
10094
|
-
"name": "auditlogcollection_findbyaction",
|
|
10095
|
-
"operation": "findByAction",
|
|
10096
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10097
|
-
},
|
|
10098
|
-
{
|
|
10099
|
-
"kind": "mcp",
|
|
10100
|
-
"name": "auditlogcollection_findbysource",
|
|
10101
|
-
"operation": "findBySource",
|
|
10102
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10103
|
-
},
|
|
10104
|
-
{
|
|
10105
|
-
"kind": "mcp",
|
|
10106
|
-
"name": "auditlogcollection_findonbehalfof",
|
|
10107
|
-
"operation": "findOnBehalfOf",
|
|
10108
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10109
|
-
},
|
|
10110
|
-
{
|
|
10111
|
-
"kind": "mcp",
|
|
10112
|
-
"name": "auditlogcollection_record",
|
|
10113
|
-
"operation": "record",
|
|
10114
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10115
|
-
},
|
|
10116
|
-
{
|
|
10117
|
-
"kind": "mcp",
|
|
10118
|
-
"name": "auditlogcollection_getrecentactivity",
|
|
10119
|
-
"operation": "getRecentActivity",
|
|
10120
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10121
|
-
},
|
|
10122
|
-
{
|
|
10123
|
-
"kind": "mcp",
|
|
10124
|
-
"name": "auditlogcollection_getresourcetimeline",
|
|
10125
|
-
"operation": "getResourceTimeline",
|
|
10126
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLogCollection"
|
|
10127
|
-
},
|
|
10128
9858
|
{
|
|
10129
9859
|
"kind": "api",
|
|
10130
9860
|
"name": "magiclinktokens.findByTokenHash",
|
|
@@ -11325,40 +11055,6 @@
|
|
|
11325
11055
|
"operation": "get",
|
|
11326
11056
|
"objectName": "@happyvertical/smrt-profiles:ApiKey"
|
|
11327
11057
|
},
|
|
11328
|
-
{
|
|
11329
|
-
"kind": "api",
|
|
11330
|
-
"name": "auditlogs.list",
|
|
11331
|
-
"operation": "list",
|
|
11332
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog",
|
|
11333
|
-
"path": "/auditlogs",
|
|
11334
|
-
"method": "GET"
|
|
11335
|
-
},
|
|
11336
|
-
{
|
|
11337
|
-
"kind": "api",
|
|
11338
|
-
"name": "auditlogs.get",
|
|
11339
|
-
"operation": "get",
|
|
11340
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog",
|
|
11341
|
-
"path": "/auditlogs/[id]",
|
|
11342
|
-
"method": "GET"
|
|
11343
|
-
},
|
|
11344
|
-
{
|
|
11345
|
-
"kind": "cli",
|
|
11346
|
-
"name": "auditlog_list",
|
|
11347
|
-
"operation": "list",
|
|
11348
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
11349
|
-
},
|
|
11350
|
-
{
|
|
11351
|
-
"kind": "mcp",
|
|
11352
|
-
"name": "auditlog_list",
|
|
11353
|
-
"operation": "list",
|
|
11354
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
11355
|
-
},
|
|
11356
|
-
{
|
|
11357
|
-
"kind": "mcp",
|
|
11358
|
-
"name": "auditlog_get",
|
|
11359
|
-
"operation": "get",
|
|
11360
|
-
"objectName": "@happyvertical/smrt-profiles:AuditLog"
|
|
11361
|
-
},
|
|
11362
11058
|
{
|
|
11363
11059
|
"kind": "api",
|
|
11364
11060
|
"name": "magiclinktokens.list",
|
|
@@ -14475,5 +14171,5 @@
|
|
|
14475
14171
|
"polymorphicAssociations": 0,
|
|
14476
14172
|
"uuidColumns": 91
|
|
14477
14173
|
},
|
|
14478
|
-
"agentDoc": "# @happyvertical/smrt-profiles\n\nCentral identity system with multi-auth, relationships, controlled metadata, and audit logging.\n\n## Models\n\n- **Profile** (STI base → Bot, Organization, Person): email (optional; identity uniqueness is arbitrated by `oidc_profile_email_reservations.email_key`, not a DB constraint — legacy duplicates are tolerated and fail closed, #2359), readonly indexed `emailKey` derived with `normalizeIdentityEmail()` for adapter-independent identity lookup, `typeId` FK to ProfileType, plus a `metadata` `@oneToMany('ProfileMetadata')` relationship for controlled per-profile values.\n- **ProfileAsset**: dedicated owned-asset join in `profile_assets` with `relationship` and `sortOrder`.\n- **ProfileLink**: ordered web links in `profile_links` (`platform` from `PROFILE_LINK_PLATFORMS`, validated http(s) `url`, optional `label`, `sortOrder`). `profileId` FK is `onDelete: 'CASCADE'`. Slug is the id (never url/label, so a new link cannot adopt another row through the natural key). Write through `ProfileLinkCollection.replaceForProfile()` / `reorder()` (one transaction each; resolve the profile in the current tenant context and stamp its tenant) or `Profile.setLinks()` / `getLinks()`.\n- **Profile.isPublic**: optional public-figure flag (boolean, default false). Records the fact only; consumers decide visibility.\n- **ProfileRelationship**: bidirectional — creating one auto-creates reciprocal inverse. `contextProfileId` for tertiary relationships. `ProfileRelationshipTerm` tracks start/end dates.\n- **ProfileMetafield**: controlled vocabulary with `validationSchema`. **ProfileMetadata**: per-profile values linked to metafields. `addMetadata()` stamps new rows with the profile's `tenantId` (never rely on auto-population, which super-admin/system context skips, #3235) and resolves the metafield as profile-tenant first, then global, never another tenant's.\n- **AuditLog**: action, resourceType/Id, `source` (web/cli/ci/webhook/mcp), `onBehalfOfId` for CI pass-through identity. `allowSuperAdminBypass: true`.\n\n## Auth Methods\n\n| Model | Pattern |\n|-------|---------|\n| NostrIdentity | Encrypted keypair (AES-256-GCM). Requires `SERVER_MASTER_SECRET` env var for decryption. NIP-05 address generation. |\n| OidcIdentity | Multiple issuers (Keycloak/Google/GitHub). Lookup by `issuer + subject` pair. Transactional provisioning derives the readonly nullable unique `identityKey` and backfills legacy rows. |\n| ApiKey | SHA-256 hashed. **Plaintext returned once only** on `generate()`. `keyPrefix` for identification. Scope-based with expiry. |\n| MagicLinkToken | One-time token with expiry for passwordless auth. |\n\n## Identity Resolution\n\nAuth helpers in `src/auth/` build profiles from external identity claims:\n\n- `resolveIdentity()` — top-level dispatcher that returns/creates a Profile from Nostr signatures, OIDC claims, magic link tokens, or API keys.\n- `createProfileFromOidc(claims, provider, options)` — creates `Profile` + `OidcIdentity` for first-time OIDC sign-in using a transaction-capable root database in `options.db`.\n- `ProfileCollection.findUniqueGlobalPersonByEmail(email)` — supported\n verified-identity lookup; fails closed on tenant-scoped, non-Person, or\n duplicate case-insensitive matches.\n- `ProfileCollection.requireCanonicalGlobalPerson(profileId, email?)` —\n validates an application-selected Profile against the same canonical global\n Person invariant.\n- `ProfileCollection.reserveCanonicalIdentityEmail(profileId, email?)` —\n validates and synchronizes the private unique\n `oidc_profile_email_reservations.email_key` used as the database arbiter for\n concurrent external-identity provisioning. Omitting `email` uses the\n Profile's stored address, moving or removing an existing reservation as the\n canonical Profile changes.\n- `createProfileFromNostr(email, nostrData)` — creates `Profile` + `NostrIdentity` for Nostr-authenticated users.\n\n## Agent (bot) profiles (#2995)\n\nAn automated agent is an author, and every authoring seam in the framework\n(`ChatMessage.senderProfileId`, `ChatParticipant.profileId`, a persona's\n`actsAsProfileId`) is a `crossPackageRef` to `Profile` — a native uuid column on\nPostgreSQL/DuckDB. A slug-style agent id is therefore not a representable author\n(`22P02`). `src/agent-profile.ts` is the owning-package API that turns one into\na real Profile so no consumer mints bot profiles itself and no uuid column is\nweakened to text:\n\n- `resolveAgentProfile(profiles, { agentId, tenantId, name? })` /\n `resolveAgentProfileId(...)` — resolve, creating on first use, the `bot`\n Profile an agent authors as. Idempotent and tenant-bound: identity is keyed on\n `(tenantId, slug = agentId, context = AGENT_PROFILE_CONTEXT)`, matching the\n model's `(tenant_id, slug, context, _meta_type)` unique key, so an agent id\n resolves to a distinct profile per tenant and never collides with a\n person/organization sharing the slug. Classification is the `bot` ProfileType\n (`AGENT_PROFILE_TYPE_SLUG`), created on demand. Parallel first use converges\n on the natural key rather than on whoever's INSERT won (each attempt re-reads\n before and after writing), which matters because NULLs are distinct in the\n `(tenant_id, slug, context)` unique index, so an untenanted agent is not\n arbitrated by the database (smrt#2360). Pinned against real PostgreSQL by\n `src/__tests__/agent-profile-postgres.test.ts`\n (`pnpm --filter @happyvertical/smrt-profiles test:postgres`).\n\nFirst consumer: `@happyvertical/smrt-chat`'s `ChatService`.\n\n## Key Methods\n\n- `Profile.getAssets()` / `addAsset()` / `removeAsset()` and the matching `ProfileCollection` wrappers — canonical owned asset helpers backed by `profile_assets`.\n- `Profile.addMetadata(metafieldSlug, value)` / `Profile.getMetadata()` — validates against metafield schema. `ProfileCollection.batchGetMetadata()` / `batchUpdateMetadata()` for bulk reads/writes.\n- `Profile.getRelationships({ direction: 'from'|'to'|'all' })` — direction matters.\n- `Profile.getRelationshipsFrom()` / `getRelationshipsTo()` — R10-generated `@oneToMany` accessors. ProfileRelationship has two FKs back to Profile, so each `@oneToMany` annotates its inverse explicitly (`{ foreignKey: 'fromProfileId' }` / `'toProfileId'`). Return raw `ProfileRelationship[]`; use `getRelationships()` for slug/direction filtering.\n- AI: `generateBio()` (uses `smrtProfiles.profile.generateBio` prompt via `@happyvertical/smrt-prompts`), `matches(criteria)` (delegates to `is()`).\n\n## Prompt Registry\n\n`generateBio()` is registered with `@happyvertical/smrt-prompts` so tenants can override template/model/params at runtime:\n\n```typescript\nimport { smrtProfilesGenerateBioPrompt } from '@happyvertical/smrt-profiles';\n// key: 'smrtProfiles.profile.generateBio'\n```\n\n## Gotchas\n\n- **SERVER_MASTER_SECRET required** for Nostr private key decryption — centralized key management\n- **API key never returned again**: `ApiKey.generate()` returns plaintext once; only `keyPrefix` visible later\n- **OIDC unique per issuer+subject**: same subject from different issuers =\n different identities. Both claims are opaque and case-sensitive; preserve\n exact whitespace after using trim only to reject blank values.\n- **OIDC identity mutations are trusted-only**: generated REST, MCP, and CLI\n surfaces are read-only. Link or update identities through transactional\n provisioning APIs so callers cannot rebind issuer/subject authority to an\n arbitrary Profile. Deprecated `OidcIdentity.findOrCreate()` preserves only\n transaction-safe exact-link reuse and refuses to create new links;\n `OidcIdentityCollection.linkToProfile()` and `Profile.linkOidcIdentity()`\n delegate to that same non-creating compatibility path.\n- **Apply schema migrations for identity race keys**: run `smrt db:status`,\n `smrt db:migrate`, then `smrt db:status` before deploying. Transactional OIDC\n provisioning populates `OidcIdentity.identityKey` and\n `oidc_profile_email_reservations`; legacy rows reserve an address only after\n safe validation. Stop/upgrade old Profile writers, then run the public,\n transactional and idempotent `backfillProfileEmailKeys(db)` from one deploy\n process. Verified-email provisioning and public email-key lookup require the\n standard `_smrt_backfills` readiness marker and fail closed immediately when\n it is absent. This keeps table scans in the explicit deploy step; runtime\n reads use the indexed key and validate only returned candidates.\n- **Public OIDC provisioning requires transactions**:\n `createProfileFromOidc()` owns a root transaction or uses a savepoint on an\n already-bound handle. Root adapters must expose `beginTransaction`;\n transaction-only handles are ambiguous and fail closed. Pass the root\n database for adapters without nested savepoints, including DuckDB;\n provisioning fails before durable writes if neither path is safe. Trusted\n framework packages use the private\n `@happyvertical/smrt-profiles/internal/oidc-provisioning` subpath instead of\n duplicating adapter probing, locking, or retry policy, and supply both exact\n issuer/subject and normalized-email lock keys in deterministic order. The\n coordinator additionally serializes every root-handle statement it owns per\n database URL on SQLite/DuckDB — shared `_smrt_backfills` initialization, the\n provisioning transaction, and the post-commit rebind — because those adapters\n multiplex one native connection and cannot overlap unrelated root\n transactions safely. **Never overlap two statements on one such handle,\n transaction-bound or not** — no `Promise.all` over reads, not even\n primary-key rebinds — because DuckDB fails the losing prepared statement or\n aborts the process outright. It retries\n bounded PostgreSQL deadlock/serialization failures. New OIDC Profiles use per-profile,\n non-semantic slugs so duplicate display names never invoke natural-key upsert.\n Caller-owned transactions never execute `_smrt_backfills` DDL; paths that\n perform canonical email lookup or reservation require the table to already\n exist or the caller must retry with the root database. Exact issuer/subject\n reuse skips the email-key readiness-marker lookup, but root coordination still\n initializes the shared tracker table. Caller-owned exact reuse does not\n consult the tracker and therefore does not require that table.\n- **Profile-only OIDC linking fails closed on existing email matches**:\n the typed canonical scenario contract is\n `src/testing/oidcProvisioningDecisionMatrix.ts`, executed by both Profiles\n and Users tests; keep public docs pointed at it instead of adding a second\n behavioral table.\n `createProfileFromOidc()` preserves exact issuer/subject reuse, including\n legacy tenant-scoped and non-Person links, but profiles cannot prove whether a\n User owns a same-email Profile. New identities therefore never attach to an\n existing email match through this helper; User/session provisioning still\n rejects unsafe linked Profiles before creating authentication state. Use\n `UserCollection.getOrCreateFromOidc()` for owner-aware verified-email reuse and\n its supported transaction-bound hooks. A pre-provisioned owned Person remains\n fail-closed unless the application explicitly uses `authorizeProfileOwner`\n to select both the canonical Profile and its existing approved sole owner;\n the users package revalidates those IDs, emails, and identity authority in\n the provisioning transaction.\n- **Email storage and identity matching differ**: `Profile.email` has an\n exact-value DB constraint. Identity boundaries query readonly indexed\n `Profile.emailKey`, derived by the shared TypeScript\n `normalizeIdentityEmail()` helper rather than adapter-specific SQL casing or\n trimming, and deliberately fail closed on duplicate normalized keys.\n- **Manifest objects must remain root-importable**: the non-API\n `OidcProfileEmailReservation` model and collection are public root exports\n because generated consumer registration imports every advertised manifest\n symbol from `@happyvertical/smrt-profiles`. Release-pack validation imports\n the actual generated register file from the packed tarball.\n- **Optional tenancy** on Profile; AuditLog allows super-admin bypass\n"
|
|
14174
|
+
"agentDoc": "# @happyvertical/smrt-profiles\n\nCentral identity system with multi-auth, relationships, controlled metadata, and audit logging.\n\n## Models\n\n- **Profile** (STI base → Bot, Organization, Person): email (optional; identity uniqueness is arbitrated by `oidc_profile_email_reservations.email_key`, not a DB constraint — legacy duplicates are tolerated and fail closed, #2359), readonly indexed `emailKey` derived with `normalizeIdentityEmail()` for adapter-independent identity lookup, `typeId` FK to ProfileType, plus a `metadata` `@oneToMany('ProfileMetadata')` relationship for controlled per-profile values.\n- **ProfileAsset**: dedicated owned-asset join in `profile_assets` with `relationship` and `sortOrder`.\n- **ProfileLink**: ordered web links in `profile_links` (`platform` from `PROFILE_LINK_PLATFORMS`, validated http(s) `url`, optional `label`, `sortOrder`). `profileId` FK is `onDelete: 'CASCADE'`. Slug is the id (never url/label, so a new link cannot adopt another row through the natural key). Write through `ProfileLinkCollection.replaceForProfile()` / `reorder()` (one transaction each; resolve the profile in the current tenant context and stamp its tenant) or `Profile.setLinks()` / `getLinks()`.\n- **Profile.isPublic**: optional public-figure flag (boolean, default false). Records the fact only; consumers decide visibility.\n- **ProfileRelationship**: bidirectional — creating one auto-creates reciprocal inverse. `contextProfileId` for tertiary relationships. `ProfileRelationshipTerm` tracks start/end dates.\n- **ProfileMetafield**: controlled vocabulary with `validationSchema`. **ProfileMetadata**: per-profile values linked to metafields. `addMetadata()` stamps new rows with the profile's `tenantId` (never rely on auto-population, which super-admin/system context skips, #3235) and resolves the metafield as profile-tenant first, then global, never another tenant's.\n- **AuditLog**: sensitive audit persistence with actor, action, reason, before/after `changes`, indexed `occurredAt`, resourceType/Id, source, and delegated identity. No generated read routes. `createAuditWriter`, consumer-authorized `readAuditTrail`, and bounded `pruneAuditTrail` live in `src/audit-trail.ts`; see [audit contract](../../docs/content/audit-trail.md).\n\n## Auth Methods\n\n| Model | Pattern |\n|-------|---------|\n| NostrIdentity | Encrypted keypair (AES-256-GCM). Requires `SERVER_MASTER_SECRET` env var for decryption. NIP-05 address generation. |\n| OidcIdentity | Multiple issuers (Keycloak/Google/GitHub). Lookup by `issuer + subject` pair. Transactional provisioning derives the readonly nullable unique `identityKey` and backfills legacy rows. |\n| ApiKey | SHA-256 hashed. **Plaintext returned once only** on `generate()`. `keyPrefix` for identification. Scope-based with expiry. |\n| MagicLinkToken | One-time token with expiry for passwordless auth. |\n\n## Identity Resolution\n\nAuth helpers in `src/auth/` build profiles from external identity claims:\n\n- `resolveIdentity()` — top-level dispatcher that returns/creates a Profile from Nostr signatures, OIDC claims, magic link tokens, or API keys.\n- `createProfileFromOidc(claims, provider, options)` — creates `Profile` + `OidcIdentity` for first-time OIDC sign-in using a transaction-capable root database in `options.db`.\n- `ProfileCollection.findUniqueGlobalPersonByEmail(email)` — supported\n verified-identity lookup; fails closed on tenant-scoped, non-Person, or\n duplicate case-insensitive matches.\n- `ProfileCollection.requireCanonicalGlobalPerson(profileId, email?)` —\n validates an application-selected Profile against the same canonical global\n Person invariant.\n- `ProfileCollection.reserveCanonicalIdentityEmail(profileId, email?)` —\n validates and synchronizes the private unique\n `oidc_profile_email_reservations.email_key` used as the database arbiter for\n concurrent external-identity provisioning. Omitting `email` uses the\n Profile's stored address, moving or removing an existing reservation as the\n canonical Profile changes.\n- `createProfileFromNostr(email, nostrData)` — creates `Profile` + `NostrIdentity` for Nostr-authenticated users.\n\n## Agent (bot) profiles (#2995)\n\nAn automated agent is an author, and every authoring seam in the framework\n(`ChatMessage.senderProfileId`, `ChatParticipant.profileId`, a persona's\n`actsAsProfileId`) is a `crossPackageRef` to `Profile` — a native uuid column on\nPostgreSQL/DuckDB. A slug-style agent id is therefore not a representable author\n(`22P02`). `src/agent-profile.ts` is the owning-package API that turns one into\na real Profile so no consumer mints bot profiles itself and no uuid column is\nweakened to text:\n\n- `resolveAgentProfile(profiles, { agentId, tenantId, name? })` /\n `resolveAgentProfileId(...)` — resolve, creating on first use, the `bot`\n Profile an agent authors as. Idempotent and tenant-bound: identity is keyed on\n `(tenantId, slug = agentId, context = AGENT_PROFILE_CONTEXT)`, matching the\n model's `(tenant_id, slug, context, _meta_type)` unique key, so an agent id\n resolves to a distinct profile per tenant and never collides with a\n person/organization sharing the slug. Classification is the `bot` ProfileType\n (`AGENT_PROFILE_TYPE_SLUG`), created on demand. Parallel first use converges\n on the natural key rather than on whoever's INSERT won (each attempt re-reads\n before and after writing), which matters because NULLs are distinct in the\n `(tenant_id, slug, context)` unique index, so an untenanted agent is not\n arbitrated by the database (smrt#2360). Pinned against real PostgreSQL by\n `src/__tests__/agent-profile-postgres.test.ts`\n (`pnpm --filter @happyvertical/smrt-profiles test:postgres`).\n\nFirst consumer: `@happyvertical/smrt-chat`'s `ChatService`.\n\n## Key Methods\n\n- `Profile.getAssets()` / `addAsset()` / `removeAsset()` and the matching `ProfileCollection` wrappers — canonical owned asset helpers backed by `profile_assets`.\n- `Profile.addMetadata(metafieldSlug, value)` / `Profile.getMetadata()` — validates against metafield schema. `ProfileCollection.batchGetMetadata()` / `batchUpdateMetadata()` for bulk reads/writes.\n- `Profile.getRelationships({ direction: 'from'|'to'|'all' })` — direction matters.\n- `Profile.getRelationshipsFrom()` / `getRelationshipsTo()` — R10-generated `@oneToMany` accessors. ProfileRelationship has two FKs back to Profile, so each `@oneToMany` annotates its inverse explicitly (`{ foreignKey: 'fromProfileId' }` / `'toProfileId'`). Return raw `ProfileRelationship[]`; use `getRelationships()` for slug/direction filtering.\n- AI: `generateBio()` (uses `smrtProfiles.profile.generateBio` prompt via `@happyvertical/smrt-prompts`), `matches(criteria)` (delegates to `is()`).\n\n## Prompt Registry\n\n`generateBio()` is registered with `@happyvertical/smrt-prompts` so tenants can override template/model/params at runtime:\n\n```typescript\nimport { smrtProfilesGenerateBioPrompt } from '@happyvertical/smrt-profiles';\n// key: 'smrtProfiles.profile.generateBio'\n```\n\n## Gotchas\n\n- **SERVER_MASTER_SECRET required** for Nostr private key decryption — centralized key management\n- **API key never returned again**: `ApiKey.generate()` returns plaintext once; only `keyPrefix` visible later\n- **OIDC unique per issuer+subject**: same subject from different issuers =\n different identities. Both claims are opaque and case-sensitive; preserve\n exact whitespace after using trim only to reject blank values.\n- **OIDC identity mutations are trusted-only**: generated REST, MCP, and CLI\n surfaces are read-only. Link or update identities through transactional\n provisioning APIs so callers cannot rebind issuer/subject authority to an\n arbitrary Profile. Deprecated `OidcIdentity.findOrCreate()` preserves only\n transaction-safe exact-link reuse and refuses to create new links;\n `OidcIdentityCollection.linkToProfile()` and `Profile.linkOidcIdentity()`\n delegate to that same non-creating compatibility path.\n- **Apply schema migrations for identity race keys**: run `smrt db:status`,\n `smrt db:migrate`, then `smrt db:status` before deploying. Transactional OIDC\n provisioning populates `OidcIdentity.identityKey` and\n `oidc_profile_email_reservations`; legacy rows reserve an address only after\n safe validation. Stop/upgrade old Profile writers, then run the public,\n transactional and idempotent `backfillProfileEmailKeys(db)` from one deploy\n process. Verified-email provisioning and public email-key lookup require the\n standard `_smrt_backfills` readiness marker and fail closed immediately when\n it is absent. This keeps table scans in the explicit deploy step; runtime\n reads use the indexed key and validate only returned candidates.\n- **Public OIDC provisioning requires transactions**:\n `createProfileFromOidc()` owns a root transaction or uses a savepoint on an\n already-bound handle. Root adapters must expose `beginTransaction`;\n transaction-only handles are ambiguous and fail closed. Pass the root\n database for adapters without nested savepoints, including DuckDB;\n provisioning fails before durable writes if neither path is safe. Trusted\n framework packages use the private\n `@happyvertical/smrt-profiles/internal/oidc-provisioning` subpath instead of\n duplicating adapter probing, locking, or retry policy, and supply both exact\n issuer/subject and normalized-email lock keys in deterministic order. The\n coordinator additionally serializes every root-handle statement it owns per\n database URL on SQLite/DuckDB — shared `_smrt_backfills` initialization, the\n provisioning transaction, and the post-commit rebind — because those adapters\n multiplex one native connection and cannot overlap unrelated root\n transactions safely. **Never overlap two statements on one such handle,\n transaction-bound or not** — no `Promise.all` over reads, not even\n primary-key rebinds — because DuckDB fails the losing prepared statement or\n aborts the process outright. It retries\n bounded PostgreSQL deadlock/serialization failures. New OIDC Profiles use per-profile,\n non-semantic slugs so duplicate display names never invoke natural-key upsert.\n Caller-owned transactions never execute `_smrt_backfills` DDL; paths that\n perform canonical email lookup or reservation require the table to already\n exist or the caller must retry with the root database. Exact issuer/subject\n reuse skips the email-key readiness-marker lookup, but root coordination still\n initializes the shared tracker table. Caller-owned exact reuse does not\n consult the tracker and therefore does not require that table.\n- **Profile-only OIDC linking fails closed on existing email matches**:\n the typed canonical scenario contract is\n `src/testing/oidcProvisioningDecisionMatrix.ts`, executed by both Profiles\n and Users tests; keep public docs pointed at it instead of adding a second\n behavioral table.\n `createProfileFromOidc()` preserves exact issuer/subject reuse, including\n legacy tenant-scoped and non-Person links, but profiles cannot prove whether a\n User owns a same-email Profile. New identities therefore never attach to an\n existing email match through this helper; User/session provisioning still\n rejects unsafe linked Profiles before creating authentication state. Use\n `UserCollection.getOrCreateFromOidc()` for owner-aware verified-email reuse and\n its supported transaction-bound hooks. A pre-provisioned owned Person remains\n fail-closed unless the application explicitly uses `authorizeProfileOwner`\n to select both the canonical Profile and its existing approved sole owner;\n the users package revalidates those IDs, emails, and identity authority in\n the provisioning transaction.\n- **Email storage and identity matching differ**: `Profile.email` has an\n exact-value DB constraint. Identity boundaries query readonly indexed\n `Profile.emailKey`, derived by the shared TypeScript\n `normalizeIdentityEmail()` helper rather than adapter-specific SQL casing or\n trimming, and deliberately fail closed on duplicate normalized keys.\n- **Manifest objects must remain root-importable**: the non-API\n `OidcProfileEmailReservation` model and collection are public root exports\n because generated consumer registration imports every advertised manifest\n symbol from `@happyvertical/smrt-profiles`. Release-pack validation imports\n the actual generated register file from the packed tarball.\n- **Optional tenancy** on Profile; AuditLog allows super-admin bypass\n"
|
|
14479
14175
|
}
|