@singi-labs/sifa-sdk 0.17.0 → 0.18.1
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/dist/index.cjs +50 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +50 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1138,6 +1138,9 @@ var APP_CATEGORY_MAP = {
|
|
|
1138
1138
|
// org.impactindexer.review.comment — written reviews of a hypercert claim
|
|
1139
1139
|
pinksea: "Art",
|
|
1140
1140
|
// com.shinolabs.pinksea.oekaki — hand-drawn artwork posted to the PinkSea oekaki BBS
|
|
1141
|
+
// Onboard from the tijs.org profile audit.
|
|
1142
|
+
dropanchor: "Places",
|
|
1143
|
+
// app.dropanchor.checkin — location check-ins (place, geo, optional review text)
|
|
1141
1144
|
// Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
|
|
1142
1145
|
// no backend scan collection yet)
|
|
1143
1146
|
linkat: "Links",
|
|
@@ -1154,7 +1157,7 @@ function categoryForApp(appId) {
|
|
|
1154
1157
|
// src/taxonomy/activity-tiers.json
|
|
1155
1158
|
var activity_tiers_default = {
|
|
1156
1159
|
$schema: "https://sifa.id/schemas/activity-tiers/v1.json",
|
|
1157
|
-
version: "1.
|
|
1160
|
+
version: "1.3.0",
|
|
1158
1161
|
updated: "2026-08-25",
|
|
1159
1162
|
tiers: {
|
|
1160
1163
|
creation: {
|
|
@@ -1258,11 +1261,21 @@ var activity_tiers_default = {
|
|
|
1258
1261
|
app: "certified",
|
|
1259
1262
|
notes: "An endorsement issued to another DID. A trust signal the actor contributes, like a Bluesky verification."
|
|
1260
1263
|
},
|
|
1264
|
+
"app.certified.badge.response": {
|
|
1265
|
+
tier: "creation",
|
|
1266
|
+
app: "certified",
|
|
1267
|
+
notes: "The recipient's acceptance of a badge someone else awarded them. An accepted badge is a credential the person holds; rejected ones are hidden by an ACTIVITY_VISIBILITY_RULES predicate."
|
|
1268
|
+
},
|
|
1261
1269
|
"app.collectivesocial.feed.list": {
|
|
1262
1270
|
tier: "creation",
|
|
1263
1271
|
app: "collectivesocial",
|
|
1264
1272
|
notes: "Auto-created default Inbox lists are filtered at the consumer layer via isDefault=true predicate."
|
|
1265
1273
|
},
|
|
1274
|
+
"app.dropanchor.checkin": {
|
|
1275
|
+
tier: "creation",
|
|
1276
|
+
app: "dropanchor",
|
|
1277
|
+
notes: "A location check-in (place, geo, category, optional review text). Authored, so creation. app.dropanchor.like is excluded backend-side."
|
|
1278
|
+
},
|
|
1266
1279
|
"app.mcp.server": {
|
|
1267
1280
|
tier: "creation",
|
|
1268
1281
|
app: "mcp"
|
|
@@ -3425,6 +3438,12 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
3425
3438
|
// are pre-encoded as literals here rather than resolved bespoke.
|
|
3426
3439
|
urlPattern: "https://chive.pub/eprints/at%3A%2F%2F{did}%2Fpub.chive.eprint.submission%2F{rkey}",
|
|
3427
3440
|
profileUrlPattern: "https://chive.pub/authors/{did}"
|
|
3441
|
+
},
|
|
3442
|
+
dropanchor: {
|
|
3443
|
+
// Dropanchor (dropanchor.app) renders each check-in at /checkin/{rkey} —
|
|
3444
|
+
// the record's own rkey, no did/handle needed. Documented as the OG-tagged
|
|
3445
|
+
// share URL in the dropanchorapp repos. A self-permalink for this record.
|
|
3446
|
+
urlPattern: "https://dropanchor.app/checkin/{rkey}"
|
|
3428
3447
|
}
|
|
3429
3448
|
});
|
|
3430
3449
|
var COLLECTION_TO_APP = [
|
|
@@ -3506,7 +3525,9 @@ var COLLECTION_TO_APP = [
|
|
|
3506
3525
|
["org.hypercerts.", "hypercerts"],
|
|
3507
3526
|
["app.certified.", "certified"],
|
|
3508
3527
|
["org.impactindexer.", "impactindexer"],
|
|
3509
|
-
["com.shinolabs.pinksea.", "pinksea"]
|
|
3528
|
+
["com.shinolabs.pinksea.", "pinksea"],
|
|
3529
|
+
// Onboard from tijs.org profile audit.
|
|
3530
|
+
["app.dropanchor.", "dropanchor"]
|
|
3510
3531
|
];
|
|
3511
3532
|
|
|
3512
3533
|
// src/cards/resolve-card-url.ts
|
|
@@ -3705,11 +3726,15 @@ function marginAnnotationHasBody(record) {
|
|
|
3705
3726
|
}
|
|
3706
3727
|
return false;
|
|
3707
3728
|
}
|
|
3729
|
+
function certifiedBadgeAccepted(record) {
|
|
3730
|
+
return record.response === "accepted";
|
|
3731
|
+
}
|
|
3708
3732
|
var ACTIVITY_VISIBILITY_RULES = Object.freeze({
|
|
3709
3733
|
"buzz.bookhive.book": bookhiveHasOpinion,
|
|
3710
3734
|
"app.beaconbits.beacon": beaconbitsHasContent,
|
|
3711
3735
|
"at.margin.bookmark": marginBookmarkHasSource,
|
|
3712
|
-
"at.margin.annotation": marginAnnotationHasBody
|
|
3736
|
+
"at.margin.annotation": marginAnnotationHasBody,
|
|
3737
|
+
"app.certified.badge.response": certifiedBadgeAccepted
|
|
3713
3738
|
});
|
|
3714
3739
|
function isVisibleActivityItem(collection, record) {
|
|
3715
3740
|
if (record === null || typeof record !== "object") return false;
|
|
@@ -4082,6 +4107,24 @@ var hypercertDetailsSchema = zod.z.object({
|
|
|
4082
4107
|
contributorCount: zod.z.number(),
|
|
4083
4108
|
attachments: zod.z.array(zod.z.object({ title: zod.z.string().optional(), url: zod.z.string() }))
|
|
4084
4109
|
});
|
|
4110
|
+
var certifiedActorSchema = zod.z.object({
|
|
4111
|
+
did: zod.z.string(),
|
|
4112
|
+
handle: zod.z.string(),
|
|
4113
|
+
displayName: zod.z.string().optional(),
|
|
4114
|
+
avatar: zod.z.string().optional()
|
|
4115
|
+
});
|
|
4116
|
+
var certifiedDetailsSchema = zod.z.object({
|
|
4117
|
+
badge: zod.z.object({
|
|
4118
|
+
title: zod.z.string(),
|
|
4119
|
+
description: zod.z.string().optional(),
|
|
4120
|
+
icon: zod.z.string().optional(),
|
|
4121
|
+
badgeType: zod.z.string().optional()
|
|
4122
|
+
}).optional(),
|
|
4123
|
+
recipient: certifiedActorSchema.optional(),
|
|
4124
|
+
issuer: certifiedActorSchema.optional(),
|
|
4125
|
+
group: certifiedActorSchema.optional(),
|
|
4126
|
+
role: zod.z.string().optional()
|
|
4127
|
+
});
|
|
4085
4128
|
var streamCardVMSchema = zod.z.lazy(
|
|
4086
4129
|
() => zod.z.object({
|
|
4087
4130
|
uri: zod.z.string(),
|
|
@@ -4098,7 +4141,8 @@ var streamCardVMSchema = zod.z.lazy(
|
|
|
4098
4141
|
externalLink: streamExternalLinkSchema.optional(),
|
|
4099
4142
|
theme: streamThemeSchema.optional(),
|
|
4100
4143
|
subject: zod.z.lazy(() => streamCardSubjectSchema).optional(),
|
|
4101
|
-
hypercertDetails: hypercertDetailsSchema.optional()
|
|
4144
|
+
hypercertDetails: hypercertDetailsSchema.optional(),
|
|
4145
|
+
certifiedDetails: certifiedDetailsSchema.optional()
|
|
4102
4146
|
})
|
|
4103
4147
|
);
|
|
4104
4148
|
function maxGraphemes(max) {
|
|
@@ -4822,6 +4866,7 @@ function toStreamCardVM(item, options = {}) {
|
|
|
4822
4866
|
if (sourceUrl) vm.sourceUrl = sourceUrl;
|
|
4823
4867
|
}
|
|
4824
4868
|
if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
|
|
4869
|
+
if (item.certifiedDetails) vm.certifiedDetails = item.certifiedDetails;
|
|
4825
4870
|
if (item.subject) {
|
|
4826
4871
|
vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
|
|
4827
4872
|
}
|
|
@@ -6038,7 +6083,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6038
6083
|
}
|
|
6039
6084
|
|
|
6040
6085
|
// src/index.ts
|
|
6041
|
-
var SIFA_SDK_VERSION = "0.
|
|
6086
|
+
var SIFA_SDK_VERSION = "0.18.1";
|
|
6042
6087
|
|
|
6043
6088
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6044
6089
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|