@singi-labs/sifa-sdk 0.18.2 → 0.18.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/dist/index.cjs CHANGED
@@ -1144,6 +1144,10 @@ var APP_CATEGORY_MAP = {
1144
1144
  // Onboard from the angrydutchman.houseofmadness.org profile audit.
1145
1145
  askeverything: "Q&A",
1146
1146
  // app.askeverything.feed.answer — authored answers to community questions
1147
+ greengale: "Articles",
1148
+ // app.greengale.blog.entry — authored blog posts (title, subtitle, Markdown body)
1149
+ kut: "Social",
1150
+ // social.kut.community.membership — joining a Kut community (a commitment)
1147
1151
  // Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
1148
1152
  // no backend scan collection yet)
1149
1153
  linkat: "Links",
@@ -1284,6 +1288,16 @@ var activity_tiers_default = {
1284
1288
  app: "askeverything",
1285
1289
  notes: "An authored answer to a community question (opinion with body text). app.askeverything.actor.* and graph.follow are excluded backend-side."
1286
1290
  },
1291
+ "app.greengale.blog.entry": {
1292
+ tier: "creation",
1293
+ app: "greengale",
1294
+ notes: "An authored blog post (title, subtitle, Markdown body, visibility). app.greengale.document and app.greengale.publication (drafts/containers) are excluded backend-side."
1295
+ },
1296
+ "social.kut.community.membership": {
1297
+ tier: "creation",
1298
+ app: "kut",
1299
+ notes: "Joining a Kut community, a commitment. Mirrors Colibri/OpenSocial memberships, which are creation-tier."
1300
+ },
1287
1301
  "app.mcp.server": {
1288
1302
  tier: "creation",
1289
1303
  app: "mcp"
@@ -3459,6 +3473,18 @@ var APP_URL_PATTERNS = Object.freeze({
3459
3473
  // per-record permalink we can build from {did, rkey}. Its profile route
3460
3474
  // /profile/{handle} does resolve by atproto handle, so fall back to that.
3461
3475
  profileUrlPattern: "https://askeverything.app/profile/{handle}"
3476
+ },
3477
+ greengale: {
3478
+ // GreenGale (greengale.app) renders each blog entry at /{handle}/{rkey}.
3479
+ // Verified live against a real post. Self-permalink for this record.
3480
+ urlPattern: "https://greengale.app/{handle}/{rkey}",
3481
+ profileUrlPattern: "https://greengale.app/{handle}"
3482
+ },
3483
+ kut: {
3484
+ // Kut (kut.social) is a community app. A membership record has no page of
3485
+ // its own; the card links to the community it joined, built from the
3486
+ // membership's community.uri in resolve-card-url. Homepage fallback only.
3487
+ profileUrlPattern: "https://kut.social"
3462
3488
  }
3463
3489
  });
3464
3490
  var COLLECTION_TO_APP = [
@@ -3544,7 +3570,9 @@ var COLLECTION_TO_APP = [
3544
3570
  // Onboard from tijs.org profile audit.
3545
3571
  ["app.dropanchor.", "dropanchor"],
3546
3572
  // Onboard from angrydutchman.houseofmadness.org profile audit.
3547
- ["app.askeverything.", "askeverything"]
3573
+ ["app.askeverything.", "askeverything"],
3574
+ ["app.greengale.", "greengale"],
3575
+ ["social.kut.", "kut"]
3548
3576
  ];
3549
3577
 
3550
3578
  // src/cards/resolve-card-url.ts
@@ -3685,6 +3713,22 @@ function resolveCardHealth(item) {
3685
3713
  }
3686
3714
  return { url: null, strategy: "none" };
3687
3715
  }
3716
+ if (collection === "social.kut.community.membership") {
3717
+ const community = record.community;
3718
+ const communityUri = typeof community === "string" ? community : (
3719
+ // Narrow the object branch to read an optional `uri`. The membership
3720
+ // lexicon carries `community` as a bare at-uri string today; the cast
3721
+ // tolerates a future strongRef `{ uri, cid }` shape without assuming it.
3722
+ community != null && typeof community === "object" ? stringOrNull(community.uri) : null
3723
+ );
3724
+ if (communityUri) {
3725
+ const parsed3 = parseAtUri(communityUri);
3726
+ if (parsed3) {
3727
+ return urlHealth(`https://kut.social/community/${encodeURIComponent(parsed3.rkey)}`);
3728
+ }
3729
+ }
3730
+ return urlHealth(APP_URL_PATTERNS.kut?.profileUrlPattern ?? null);
3731
+ }
3688
3732
  if (collection === "fyi.atstore.listing.review") {
3689
3733
  const listingMeta = record.listingMeta;
3690
3734
  if (listingMeta != null && typeof listingMeta === "object") {
@@ -5208,6 +5252,12 @@ function countRecentActivity(days, windowDays, now = /* @__PURE__ */ new Date())
5208
5252
  return days.reduce((sum, day) => day.date >= cutoff ? sum + day.total : sum, 0);
5209
5253
  }
5210
5254
 
5255
+ // src/logic/self-app.ts
5256
+ var SELF_APP_ID = "sifa";
5257
+ function excludeSelfApp(apps) {
5258
+ return apps.filter((app) => app.id !== SELF_APP_ID);
5259
+ }
5260
+
5211
5261
  // src/profile/range-sort.ts
5212
5262
  var hasValue = (date) => !!date;
5213
5263
  function sortByActiveDateRange(items) {
@@ -6100,7 +6150,7 @@ function describeSifaRecord(collection, value) {
6100
6150
  }
6101
6151
 
6102
6152
  // src/index.ts
6103
- var SIFA_SDK_VERSION = "0.18.2";
6153
+ var SIFA_SDK_VERSION = "0.18.4";
6104
6154
 
6105
6155
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6106
6156
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6203,6 +6253,7 @@ exports.ROADMAP_ISSUES_REPO = ROADMAP_ISSUES_REPO;
6203
6253
  exports.ROADMAP_ITEM_META = ROADMAP_ITEM_META;
6204
6254
  exports.SECTION_GROUPS = SECTION_GROUPS;
6205
6255
  exports.SECTION_LABELS = SECTION_LABELS;
6256
+ exports.SELF_APP_ID = SELF_APP_ID;
6206
6257
  exports.SIFA_REPO_GROUPS = SIFA_REPO_GROUPS;
6207
6258
  exports.SIFA_SDK_VERSION = SIFA_SDK_VERSION;
6208
6259
  exports.SKILL_CATEGORIES = SKILL_CATEGORIES;
@@ -6237,6 +6288,7 @@ exports.durationFromMinutes = durationFromMinutes;
6237
6288
  exports.encodeFeedCursor = encodeFeedCursor;
6238
6289
  exports.entityDisambiguationLabel = entityDisambiguationLabel;
6239
6290
  exports.entityResultKey = entityResultKey;
6291
+ exports.excludeSelfApp = excludeSelfApp;
6240
6292
  exports.externalRecordRefSchema = externalRecordRefSchema;
6241
6293
  exports.filterHidden = filterHidden;
6242
6294
  exports.findIndustry = findIndustry;