@singi-labs/sifa-sdk 0.15.0 → 0.17.0

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.d.cts CHANGED
@@ -1444,6 +1444,33 @@ declare function getPublisherFromSiteUrl(siteUrl: string): Publisher;
1444
1444
  * embeds, content labels) are layered on in sifa-web and are not part of the
1445
1445
  * shared contract.
1446
1446
  */
1447
+ interface HypercertContributorView {
1448
+ displayName: string;
1449
+ imageUrl?: string;
1450
+ /**
1451
+ * Where the contributor lives. A GitHub profile URL on every
1452
+ * `contributorInformation` record sampled to date, never a DID or atproto
1453
+ * handle, so this does not resolve to a Sifa profile.
1454
+ */
1455
+ identifier?: string;
1456
+ /** Percentage share of the claim; weights across a claim sum to 100. */
1457
+ weight?: number;
1458
+ }
1459
+ interface HypercertAttachmentView {
1460
+ title?: string;
1461
+ url: string;
1462
+ }
1463
+ /**
1464
+ * Contributor and attachment detail for an `org.hypercerts.claim.activity`
1465
+ * record, resolved by sifa-api out of sidecar records in the claim's own repo.
1466
+ * A card cannot reach them itself.
1467
+ */
1468
+ interface HypercertDetailsView {
1469
+ contributors: HypercertContributorView[];
1470
+ /** Total before truncation, so a renderer can show "+N more". */
1471
+ contributorCount: number;
1472
+ attachments: HypercertAttachmentView[];
1473
+ }
1447
1474
  interface ActivityItem {
1448
1475
  /** Full at-uri of the record: stable key + permalink source. */
1449
1476
  uri: string;
@@ -1487,6 +1514,12 @@ interface ActivityItem {
1487
1514
  * a `StreamCardVM` too.
1488
1515
  */
1489
1516
  subject?: ActivityItem;
1517
+ /**
1518
+ * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1519
+ * items, for claims with neither contributors nor attachments, and for
1520
+ * responses predating the field.
1521
+ */
1522
+ hypercertDetails?: HypercertDetailsView;
1490
1523
  }
1491
1524
 
1492
1525
  /**
@@ -1798,6 +1831,12 @@ interface StreamCardVM {
1798
1831
  externalLink?: StreamExternalLink;
1799
1832
  theme?: StreamTheme;
1800
1833
  subject?: StreamCardSubject;
1834
+ /**
1835
+ * Contributor and attachment detail for a hypercert claim, passed through
1836
+ * from the `ActivityItem` sifa-api hydrated. Renderers show a credit roll
1837
+ * and the claim's outbound links instead of a bare contributor count.
1838
+ */
1839
+ hypercertDetails?: HypercertDetailsView;
1801
1840
  }
1802
1841
 
1803
1842
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.d.ts CHANGED
@@ -1444,6 +1444,33 @@ declare function getPublisherFromSiteUrl(siteUrl: string): Publisher;
1444
1444
  * embeds, content labels) are layered on in sifa-web and are not part of the
1445
1445
  * shared contract.
1446
1446
  */
1447
+ interface HypercertContributorView {
1448
+ displayName: string;
1449
+ imageUrl?: string;
1450
+ /**
1451
+ * Where the contributor lives. A GitHub profile URL on every
1452
+ * `contributorInformation` record sampled to date, never a DID or atproto
1453
+ * handle, so this does not resolve to a Sifa profile.
1454
+ */
1455
+ identifier?: string;
1456
+ /** Percentage share of the claim; weights across a claim sum to 100. */
1457
+ weight?: number;
1458
+ }
1459
+ interface HypercertAttachmentView {
1460
+ title?: string;
1461
+ url: string;
1462
+ }
1463
+ /**
1464
+ * Contributor and attachment detail for an `org.hypercerts.claim.activity`
1465
+ * record, resolved by sifa-api out of sidecar records in the claim's own repo.
1466
+ * A card cannot reach them itself.
1467
+ */
1468
+ interface HypercertDetailsView {
1469
+ contributors: HypercertContributorView[];
1470
+ /** Total before truncation, so a renderer can show "+N more". */
1471
+ contributorCount: number;
1472
+ attachments: HypercertAttachmentView[];
1473
+ }
1447
1474
  interface ActivityItem {
1448
1475
  /** Full at-uri of the record: stable key + permalink source. */
1449
1476
  uri: string;
@@ -1487,6 +1514,12 @@ interface ActivityItem {
1487
1514
  * a `StreamCardVM` too.
1488
1515
  */
1489
1516
  subject?: ActivityItem;
1517
+ /**
1518
+ * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1519
+ * items, for claims with neither contributors nor attachments, and for
1520
+ * responses predating the field.
1521
+ */
1522
+ hypercertDetails?: HypercertDetailsView;
1490
1523
  }
1491
1524
 
1492
1525
  /**
@@ -1798,6 +1831,12 @@ interface StreamCardVM {
1798
1831
  externalLink?: StreamExternalLink;
1799
1832
  theme?: StreamTheme;
1800
1833
  subject?: StreamCardSubject;
1834
+ /**
1835
+ * Contributor and attachment detail for a hypercert claim, passed through
1836
+ * from the `ActivityItem` sifa-api hydrated. Renderers show a credit roll
1837
+ * and the claim's outbound links instead of a bare contributor count.
1838
+ */
1839
+ hypercertDetails?: HypercertDetailsView;
1801
1840
  }
1802
1841
 
1803
1842
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.js CHANGED
@@ -1152,8 +1152,8 @@ function categoryForApp(appId) {
1152
1152
  // src/taxonomy/activity-tiers.json
1153
1153
  var activity_tiers_default = {
1154
1154
  $schema: "https://sifa.id/schemas/activity-tiers/v1.json",
1155
- version: "1.1.0",
1156
- updated: "2026-07-29",
1155
+ version: "1.2.0",
1156
+ updated: "2026-08-25",
1157
1157
  tiers: {
1158
1158
  creation: {
1159
1159
  label: "Made",
@@ -1181,26 +1181,6 @@ var activity_tiers_default = {
1181
1181
  tier: "creation",
1182
1182
  app: "atmobb"
1183
1183
  },
1184
- "at.locale.project": {
1185
- tier: "creation",
1186
- app: "locale",
1187
- notes: "A localization project the actor owns: git source, source and target locales."
1188
- },
1189
- "at.locale.translation": {
1190
- tier: "creation",
1191
- app: "locale",
1192
- notes: "One authored translated string for a message key in a target locale."
1193
- },
1194
- "blog.pckt.mini.post": {
1195
- tier: "creation",
1196
- app: "pckt",
1197
- notes: "A pckt microblog post. Long-form pckt posts are site.standard.document instead."
1198
- },
1199
- "app.photosky.collection": {
1200
- tier: "creation",
1201
- app: "zeens",
1202
- notes: "A curated photo collection on Zeens (still the app.photosky namespace)."
1203
- },
1204
1184
  "app.beaconbits.beacon": {
1205
1185
  tier: "creation",
1206
1186
  app: "beaconbits"
@@ -1266,6 +1246,16 @@ var activity_tiers_default = {
1266
1246
  app: "bluesky",
1267
1247
  notes: "Diverges from app.bsky.graph.follow (action) on purpose: verifying another account's handle is a deliberate trust statement the actor authors, not a tap. Sifa renders it with its own card."
1268
1248
  },
1249
+ "app.certified.actor.membership": {
1250
+ tier: "creation",
1251
+ app: "certified",
1252
+ notes: "Joining a group is a commitment, same shape as a Colibri or Open Social membership."
1253
+ },
1254
+ "app.certified.badge.award": {
1255
+ tier: "creation",
1256
+ app: "certified",
1257
+ notes: "An endorsement issued to another DID. A trust signal the actor contributes, like a Bluesky verification."
1258
+ },
1269
1259
  "app.collectivesocial.feed.list": {
1270
1260
  tier: "creation",
1271
1261
  app: "collectivesocial",
@@ -1275,6 +1265,11 @@ var activity_tiers_default = {
1275
1265
  tier: "creation",
1276
1266
  app: "mcp"
1277
1267
  },
1268
+ "app.photosky.collection": {
1269
+ tier: "creation",
1270
+ app: "zeens",
1271
+ notes: "A curated photo collection on Zeens (still the app.photosky namespace)."
1272
+ },
1278
1273
  "app.sidetrail.trail": {
1279
1274
  tier: "creation",
1280
1275
  app: "semble"
@@ -1292,6 +1287,16 @@ var activity_tiers_default = {
1292
1287
  app: "userinput",
1293
1288
  notes: "Replies are authored text, consistent with app.bsky.feed.post covering replies."
1294
1289
  },
1290
+ "at.locale.project": {
1291
+ tier: "creation",
1292
+ app: "locale",
1293
+ notes: "A localization project the actor owns: git source, source and target locales."
1294
+ },
1295
+ "at.locale.translation": {
1296
+ tier: "creation",
1297
+ app: "locale",
1298
+ notes: "One authored translated string for a message key in a target locale."
1299
+ },
1295
1300
  "at.margin.annotation": {
1296
1301
  tier: "creation",
1297
1302
  app: "margin",
@@ -1319,6 +1324,11 @@ var activity_tiers_default = {
1319
1324
  tier: "creation",
1320
1325
  app: "youandme"
1321
1326
  },
1327
+ "blog.pckt.mini.post": {
1328
+ tier: "creation",
1329
+ app: "pckt",
1330
+ notes: "A pckt microblog post. Long-form pckt posts are site.standard.document instead."
1331
+ },
1322
1332
  "blue.flashes.feed.post": {
1323
1333
  tier: "creation",
1324
1334
  app: "flashes"
@@ -1336,6 +1346,11 @@ var activity_tiers_default = {
1336
1346
  tier: "creation",
1337
1347
  app: "minomobi"
1338
1348
  },
1349
+ "com.shinolabs.pinksea.oekaki": {
1350
+ tier: "creation",
1351
+ app: "pinksea",
1352
+ notes: "A drawing made in PinkSea's canvas, stored as an image blob with alt text and tags."
1353
+ },
1339
1354
  "com.voxport.podcast.series": {
1340
1355
  tier: "creation",
1341
1356
  app: "voxport"
@@ -1497,6 +1512,11 @@ var activity_tiers_default = {
1497
1512
  app: "sifa",
1498
1513
  notes: "OAuth scope record."
1499
1514
  },
1515
+ "id.sifa.confirmation": {
1516
+ tier: "action",
1517
+ app: "sifa",
1518
+ notes: "Confirmation that a record naming the actor is accurate (co-speaker credit, project membership)."
1519
+ },
1500
1520
  "id.sifa.endorsement": {
1501
1521
  tier: "creation",
1502
1522
  app: "sifa",
@@ -1507,11 +1527,6 @@ var activity_tiers_default = {
1507
1527
  app: "sifa",
1508
1528
  notes: "Confirmation/acceptance of an endorsement received."
1509
1529
  },
1510
- "id.sifa.confirmation": {
1511
- tier: "action",
1512
- app: "sifa",
1513
- notes: "Confirmation that a record naming the actor is accurate (co-speaker credit, project membership)."
1514
- },
1515
1530
  "id.sifa.graph.connection": {
1516
1531
  tier: "creation",
1517
1532
  app: "sifa",
@@ -1672,6 +1687,31 @@ var activity_tiers_default = {
1672
1687
  tier: "creation",
1673
1688
  app: "papili"
1674
1689
  },
1690
+ "org.hypercerts.claim.activity": {
1691
+ tier: "creation",
1692
+ app: "hypercerts",
1693
+ notes: "A hypercert: an authored claim of work done, with title, description, and weighted contributors."
1694
+ },
1695
+ "org.hypercerts.claim.collection": {
1696
+ tier: "creation",
1697
+ app: "hypercerts",
1698
+ notes: "Older shape of the project container that groups claims. Superseded by org.hypercerts.collection."
1699
+ },
1700
+ "org.hypercerts.claim.evaluation": {
1701
+ tier: "creation",
1702
+ app: "hypercerts",
1703
+ notes: "An assessment of a claim carrying a score and a written summary. An opinion with a body."
1704
+ },
1705
+ "org.hypercerts.collection": {
1706
+ tier: "creation",
1707
+ app: "hypercerts",
1708
+ notes: "An authored project container grouping hypercert claims, with its own title, banner, and description."
1709
+ },
1710
+ "org.impactindexer.review.comment": {
1711
+ tier: "creation",
1712
+ app: "impactindexer",
1713
+ notes: "A written review of a hypercert claim, like a Popfeed or BookHive review."
1714
+ },
1675
1715
  "org.v-it.skill": {
1676
1716
  tier: "creation",
1677
1717
  app: "vit"
@@ -4028,6 +4068,18 @@ var streamCardSubjectSchema = z.discriminatedUnion("kind", [
4028
4068
  title: z.string().optional()
4029
4069
  })
4030
4070
  ]);
4071
+ var hypercertDetailsSchema = z.object({
4072
+ contributors: z.array(
4073
+ z.object({
4074
+ displayName: z.string(),
4075
+ imageUrl: z.string().optional(),
4076
+ identifier: z.string().optional(),
4077
+ weight: z.number().optional()
4078
+ })
4079
+ ),
4080
+ contributorCount: z.number(),
4081
+ attachments: z.array(z.object({ title: z.string().optional(), url: z.string() }))
4082
+ });
4031
4083
  var streamCardVMSchema = z.lazy(
4032
4084
  () => z.object({
4033
4085
  uri: z.string(),
@@ -4043,7 +4095,8 @@ var streamCardVMSchema = z.lazy(
4043
4095
  media: z.array(streamMediaSchema).optional(),
4044
4096
  externalLink: streamExternalLinkSchema.optional(),
4045
4097
  theme: streamThemeSchema.optional(),
4046
- subject: z.lazy(() => streamCardSubjectSchema).optional()
4098
+ subject: z.lazy(() => streamCardSubjectSchema).optional(),
4099
+ hypercertDetails: hypercertDetailsSchema.optional()
4047
4100
  })
4048
4101
  );
4049
4102
  function maxGraphemes(max) {
@@ -4766,6 +4819,7 @@ function toStreamCardVM(item, options = {}) {
4766
4819
  const sourceUrl = resolveSourceUrl(item, record);
4767
4820
  if (sourceUrl) vm.sourceUrl = sourceUrl;
4768
4821
  }
4822
+ if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
4769
4823
  if (item.subject) {
4770
4824
  vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
4771
4825
  }
@@ -5982,7 +6036,7 @@ function describeSifaRecord(collection, value) {
5982
6036
  }
5983
6037
 
5984
6038
  // src/index.ts
5985
- var SIFA_SDK_VERSION = "0.15.0";
6039
+ var SIFA_SDK_VERSION = "0.17.0";
5986
6040
 
5987
6041
  export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isRoleLineRedundant, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
5988
6042
  //# sourceMappingURL=index.js.map