@singi-labs/sifa-sdk 0.19.44 → 0.19.46

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.
Files changed (582) hide show
  1. package/dist/atproto/index.js +9 -3
  2. package/dist/atproto/index.js.map +1 -1
  3. package/dist/badge/index.cjs.map +1 -1
  4. package/dist/badge/index.js +5 -141
  5. package/dist/badge/index.js.map +1 -1
  6. package/dist/cards/adult-content.js +14 -0
  7. package/dist/cards/adult-content.js.map +1 -0
  8. package/dist/cards/app-url-patterns.js +369 -0
  9. package/dist/cards/app-url-patterns.js.map +1 -0
  10. package/dist/cards/index.js +24 -0
  11. package/dist/cards/index.js.map +1 -0
  12. package/dist/cards/resolve-card-url.js +198 -0
  13. package/dist/cards/resolve-card-url.js.map +1 -0
  14. package/dist/cards/visibility.js +45 -0
  15. package/dist/cards/visibility.js.map +1 -0
  16. package/dist/flags/index.js +4 -3
  17. package/dist/flags/index.js.map +1 -1
  18. package/dist/format/collapse-contributors.js +19 -0
  19. package/dist/format/collapse-contributors.js.map +1 -0
  20. package/dist/format/company-name.js +61 -0
  21. package/dist/format/company-name.js.map +1 -0
  22. package/dist/format/compare-text.js +9 -0
  23. package/dist/format/compare-text.js.map +1 -0
  24. package/dist/format/doi.js +8 -0
  25. package/dist/format/doi.js.map +1 -0
  26. package/dist/format/embed.js +131 -0
  27. package/dist/format/embed.js.map +1 -0
  28. package/dist/format/endorsement-context.js +35 -0
  29. package/dist/format/endorsement-context.js.map +1 -0
  30. package/dist/format/format-display-url.js +42 -0
  31. package/dist/format/format-display-url.js.map +1 -0
  32. package/dist/format/format-duration.js +13 -0
  33. package/dist/format/format-duration.js.map +1 -0
  34. package/dist/format/format-time.js +30 -0
  35. package/dist/format/format-time.js.map +1 -0
  36. package/dist/format/handle-utils.js +19 -0
  37. package/dist/format/handle-utils.js.map +1 -0
  38. package/dist/format/index.js +106 -0
  39. package/dist/format/index.js.map +1 -0
  40. package/dist/format/location-segments.js +29 -0
  41. package/dist/format/location-segments.js.map +1 -0
  42. package/dist/format/location-utils.js +42 -0
  43. package/dist/format/location-utils.js.map +1 -0
  44. package/dist/format/meta-description.js +35 -0
  45. package/dist/format/meta-description.js.map +1 -0
  46. package/dist/format/normalize-company-key.js +12 -0
  47. package/dist/format/normalize-company-key.js.map +1 -0
  48. package/dist/format/normalize-legal-form.js +71 -0
  49. package/dist/format/normalize-legal-form.js.map +1 -0
  50. package/dist/format/pds-utils.js +73 -0
  51. package/dist/format/pds-utils.js.map +1 -0
  52. package/dist/format/sort-by-date.js +39 -0
  53. package/dist/format/sort-by-date.js.map +1 -0
  54. package/dist/format/summarize-deliveries.js +37 -0
  55. package/dist/format/summarize-deliveries.js.map +1 -0
  56. package/dist/format/talk-slug.js +21 -0
  57. package/dist/format/talk-slug.js.map +1 -0
  58. package/dist/format/text-sanitize.js +29 -0
  59. package/dist/format/text-sanitize.js.map +1 -0
  60. package/dist/format/text-truncate.js +14 -0
  61. package/dist/format/text-truncate.js.map +1 -0
  62. package/dist/format/time-utils.js +19 -0
  63. package/dist/format/time-utils.js.map +1 -0
  64. package/dist/format/timeline.js +33 -0
  65. package/dist/format/timeline.js.map +1 -0
  66. package/dist/format/wcag-contrast.js +34 -0
  67. package/dist/format/wcag-contrast.js.map +1 -0
  68. package/dist/import/index.js +22 -0
  69. package/dist/import/index.js.map +1 -0
  70. package/dist/import/presentation-csv.js +116 -0
  71. package/dist/import/presentation-csv.js.map +1 -0
  72. package/dist/index.cjs +7 -1
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +8 -1
  75. package/dist/index.d.ts +8 -1
  76. package/dist/index.js +677 -7086
  77. package/dist/index.js.map +1 -1
  78. package/dist/jev/index.js +18 -5
  79. package/dist/jev/index.js.map +1 -1
  80. package/dist/jsonld/index.cjs.map +1 -1
  81. package/dist/jsonld/index.js +30 -987
  82. package/dist/jsonld/index.js.map +1 -1
  83. package/dist/jsonld/profile.js +222 -0
  84. package/dist/jsonld/profile.js.map +1 -0
  85. package/dist/jsonld/terms.js +496 -0
  86. package/dist/jsonld/terms.js.map +1 -0
  87. package/dist/jsonld/url.js +17 -0
  88. package/dist/jsonld/url.js.map +1 -0
  89. package/dist/jsonld/works-graph.js +41 -0
  90. package/dist/jsonld/works-graph.js.map +1 -0
  91. package/dist/jsonld/works.js +178 -0
  92. package/dist/jsonld/works.js.map +1 -0
  93. package/dist/logic/actor-identity.js +8 -0
  94. package/dist/logic/actor-identity.js.map +1 -0
  95. package/dist/logic/agent-ref.js +24 -0
  96. package/dist/logic/agent-ref.js.map +1 -0
  97. package/dist/logic/company-page-indexable.js +23 -0
  98. package/dist/logic/company-page-indexable.js.map +1 -0
  99. package/dist/logic/date-lookahead.js +33 -0
  100. package/dist/logic/date-lookahead.js.map +1 -0
  101. package/dist/logic/domain-detect.js +43 -0
  102. package/dist/logic/domain-detect.js.map +1 -0
  103. package/dist/logic/entity-disambiguation.js +24 -0
  104. package/dist/logic/entity-disambiguation.js.map +1 -0
  105. package/dist/logic/entity-ref-anchor.js +33 -0
  106. package/dist/logic/entity-ref-anchor.js.map +1 -0
  107. package/dist/logic/index.js +91 -0
  108. package/dist/logic/index.js.map +1 -0
  109. package/dist/logic/org-floor.js +66 -0
  110. package/dist/logic/org-floor.js.map +1 -0
  111. package/dist/logic/primary-item.js +9 -0
  112. package/dist/logic/primary-item.js.map +1 -0
  113. package/dist/logic/primary-position.js +16 -0
  114. package/dist/logic/primary-position.js.map +1 -0
  115. package/dist/logic/profile-completeness.js +21 -0
  116. package/dist/logic/profile-completeness.js.map +1 -0
  117. package/dist/logic/profile-dimensions.js +50 -0
  118. package/dist/logic/profile-dimensions.js.map +1 -0
  119. package/dist/logic/profile-summary.js +23 -0
  120. package/dist/logic/profile-summary.js.map +1 -0
  121. package/dist/logic/pseudo-employer.js +34 -0
  122. package/dist/logic/pseudo-employer.js.map +1 -0
  123. package/dist/logic/recent-activity.js +10 -0
  124. package/dist/logic/recent-activity.js.map +1 -0
  125. package/dist/logic/self-app.js +10 -0
  126. package/dist/logic/self-app.js.map +1 -0
  127. package/dist/{org-BCrvebcf.d.ts → org-CxTEjjrm.d.ts} +1 -1
  128. package/dist/{org-settings-C73Sin5E.d.ts → org-settings-BShvhyFp.d.ts} +1 -1
  129. package/dist/profile/headline-role-dedupe.js +12 -0
  130. package/dist/profile/headline-role-dedupe.js.map +1 -0
  131. package/dist/profile/highlights.js +200 -0
  132. package/dist/profile/highlights.js.map +1 -0
  133. package/dist/profile/index.js +66 -0
  134. package/dist/profile/index.js.map +1 -0
  135. package/dist/profile/involvement-grouping.js +31 -0
  136. package/dist/profile/involvement-grouping.js.map +1 -0
  137. package/dist/profile/language-sort.js +24 -0
  138. package/dist/profile/language-sort.js.map +1 -0
  139. package/dist/profile/publication-versions.js +98 -0
  140. package/dist/profile/publication-versions.js.map +1 -0
  141. package/dist/profile/range-sort.js +14 -0
  142. package/dist/profile/range-sort.js.map +1 -0
  143. package/dist/profile/section-model.js +122 -0
  144. package/dist/profile/section-model.js.map +1 -0
  145. package/dist/profile/section-sorts.js +33 -0
  146. package/dist/profile/section-sorts.js.map +1 -0
  147. package/dist/publishers/index.js +16 -0
  148. package/dist/publishers/index.js.map +1 -0
  149. package/dist/publishers/registry.js +87 -0
  150. package/dist/publishers/registry.js.map +1 -0
  151. package/dist/publishing/index.js +46 -184
  152. package/dist/publishing/index.js.map +1 -1
  153. package/dist/publishing/linkblog.js +42 -0
  154. package/dist/publishing/linkblog.js.map +1 -0
  155. package/dist/publishing/registry.js +32 -0
  156. package/dist/publishing/registry.js.map +1 -0
  157. package/dist/publishing/schemas.js +74 -0
  158. package/dist/publishing/schemas.js.map +1 -0
  159. package/dist/publishing/types.js +32 -0
  160. package/dist/publishing/types.js.map +1 -0
  161. package/dist/query/client.js +119 -0
  162. package/dist/query/client.js.map +1 -0
  163. package/dist/query/config.js +23 -0
  164. package/dist/query/config.js.map +1 -0
  165. package/dist/query/fetchers/accounts.js +29 -0
  166. package/dist/query/fetchers/accounts.js.map +1 -0
  167. package/dist/query/fetchers/activity-items-hide.js +31 -0
  168. package/dist/query/fetchers/activity-items-hide.js.map +1 -0
  169. package/dist/query/fetchers/activity.js +61 -0
  170. package/dist/query/fetchers/activity.js.map +1 -0
  171. package/dist/query/fetchers/actor.js +30 -0
  172. package/dist/query/fetchers/actor.js.map +1 -0
  173. package/dist/query/fetchers/admin-feature-allowlists.js +41 -0
  174. package/dist/query/fetchers/admin-feature-allowlists.js.map +1 -0
  175. package/dist/query/fetchers/admin-review-queues.js +30 -0
  176. package/dist/query/fetchers/admin-review-queues.js.map +1 -0
  177. package/dist/query/fetchers/apps.js +31 -0
  178. package/dist/query/fetchers/apps.js.map +1 -0
  179. package/dist/query/fetchers/bsky-preferences.js +55 -0
  180. package/dist/query/fetchers/bsky-preferences.js.map +1 -0
  181. package/dist/query/fetchers/confirmations.js +55 -0
  182. package/dist/query/fetchers/confirmations.js.map +1 -0
  183. package/dist/query/fetchers/destructive.js +34 -0
  184. package/dist/query/fetchers/destructive.js.map +1 -0
  185. package/dist/query/fetchers/discovery.js +67 -0
  186. package/dist/query/fetchers/discovery.js.map +1 -0
  187. package/dist/query/fetchers/education.js +23 -0
  188. package/dist/query/fetchers/education.js.map +1 -0
  189. package/dist/query/fetchers/endorsement-inbox.js +36 -0
  190. package/dist/query/fetchers/endorsement-inbox.js.map +1 -0
  191. package/dist/query/fetchers/endorsement.js +23 -0
  192. package/dist/query/fetchers/endorsement.js.map +1 -0
  193. package/dist/query/fetchers/endorsements.js +20 -0
  194. package/dist/query/fetchers/endorsements.js.map +1 -0
  195. package/dist/query/fetchers/entities.js +65 -0
  196. package/dist/query/fetchers/entities.js.map +1 -0
  197. package/dist/query/fetchers/external-accounts.js +74 -0
  198. package/dist/query/fetchers/external-accounts.js.map +1 -0
  199. package/dist/query/fetchers/follow-extras.js +38 -0
  200. package/dist/query/fetchers/follow-extras.js.map +1 -0
  201. package/dist/query/fetchers/follow.js +105 -0
  202. package/dist/query/fetchers/follow.js.map +1 -0
  203. package/dist/query/fetchers/get-profile-view.js +21 -0
  204. package/dist/query/fetchers/get-profile-view.js.map +1 -0
  205. package/dist/query/fetchers/github-prs.js +45 -0
  206. package/dist/query/fetchers/github-prs.js.map +1 -0
  207. package/dist/query/fetchers/inbox.js +29 -0
  208. package/dist/query/fetchers/inbox.js.map +1 -0
  209. package/dist/query/fetchers/index.cjs.map +1 -1
  210. package/dist/query/fetchers/index.d.ts +2 -2
  211. package/dist/query/fetchers/index.js +360 -2045
  212. package/dist/query/fetchers/index.js.map +1 -1
  213. package/dist/query/fetchers/investments.js +18 -0
  214. package/dist/query/fetchers/investments.js.map +1 -0
  215. package/dist/query/fetchers/keytrace-claims.js +23 -0
  216. package/dist/query/fetchers/keytrace-claims.js.map +1 -0
  217. package/dist/query/fetchers/marque-domains.js +23 -0
  218. package/dist/query/fetchers/marque-domains.js.map +1 -0
  219. package/dist/query/fetchers/network-map.js +36 -0
  220. package/dist/query/fetchers/network-map.js.map +1 -0
  221. package/dist/query/fetchers/org.js +48 -0
  222. package/dist/query/fetchers/org.js.map +1 -0
  223. package/dist/query/fetchers/positions.js +77 -0
  224. package/dist/query/fetchers/positions.js.map +1 -0
  225. package/dist/query/fetchers/profile-completeness.js +45 -0
  226. package/dist/query/fetchers/profile-completeness.js.map +1 -0
  227. package/dist/query/fetchers/profile-items-hide.js +36 -0
  228. package/dist/query/fetchers/profile-items-hide.js.map +1 -0
  229. package/dist/query/fetchers/profile-locations.js +23 -0
  230. package/dist/query/fetchers/profile-locations.js.map +1 -0
  231. package/dist/query/fetchers/profile-mutations.js +82 -0
  232. package/dist/query/fetchers/profile-mutations.js.map +1 -0
  233. package/dist/query/fetchers/profile-summary.js +14 -0
  234. package/dist/query/fetchers/profile-summary.js.map +1 -0
  235. package/dist/query/fetchers/profile.js +31 -0
  236. package/dist/query/fetchers/profile.js.map +1 -0
  237. package/dist/query/fetchers/publications.js +66 -0
  238. package/dist/query/fetchers/publications.js.map +1 -0
  239. package/dist/query/fetchers/quoted-posts.js +40 -0
  240. package/dist/query/fetchers/quoted-posts.js.map +1 -0
  241. package/dist/query/fetchers/reactions.js +85 -0
  242. package/dist/query/fetchers/reactions.js.map +1 -0
  243. package/dist/query/fetchers/received-endorsements.js +20 -0
  244. package/dist/query/fetchers/received-endorsements.js.map +1 -0
  245. package/dist/query/fetchers/reciprocity.js +23 -0
  246. package/dist/query/fetchers/reciprocity.js.map +1 -0
  247. package/dist/query/fetchers/records.js +27 -0
  248. package/dist/query/fetchers/records.js.map +1 -0
  249. package/dist/query/fetchers/repo-inventory.js +23 -0
  250. package/dist/query/fetchers/repo-inventory.js.map +1 -0
  251. package/dist/query/fetchers/roadmap.js +73 -0
  252. package/dist/query/fetchers/roadmap.js.map +1 -0
  253. package/dist/query/fetchers/rpg.js +36 -0
  254. package/dist/query/fetchers/rpg.js.map +1 -0
  255. package/dist/query/fetchers/search.js +78 -0
  256. package/dist/query/fetchers/search.js.map +1 -0
  257. package/dist/query/fetchers/section-primary.js +23 -0
  258. package/dist/query/fetchers/section-primary.js.map +1 -0
  259. package/dist/query/fetchers/skills.js +30 -0
  260. package/dist/query/fetchers/skills.js.map +1 -0
  261. package/dist/query/fetchers/speakers.js +42 -0
  262. package/dist/query/fetchers/speakers.js.map +1 -0
  263. package/dist/query/fetchers/stats.js +16 -0
  264. package/dist/query/fetchers/stats.js.map +1 -0
  265. package/dist/query/fetchers/stream.js +30 -0
  266. package/dist/query/fetchers/stream.js.map +1 -0
  267. package/dist/query/fetchers/unlinked-positions.js +30 -0
  268. package/dist/query/fetchers/unlinked-positions.js.map +1 -0
  269. package/dist/query/hooks/index.d.ts +3 -3
  270. package/dist/query/hooks/index.js +283 -3555
  271. package/dist/query/hooks/index.js.map +1 -1
  272. package/dist/query/hooks/use-accounts.js +19 -0
  273. package/dist/query/hooks/use-accounts.js.map +1 -0
  274. package/dist/query/hooks/use-activity-items-hide.js +52 -0
  275. package/dist/query/hooks/use-activity-items-hide.js.map +1 -0
  276. package/dist/query/hooks/use-activity.js +44 -0
  277. package/dist/query/hooks/use-activity.js.map +1 -0
  278. package/dist/query/hooks/use-admin-review-queues.js +21 -0
  279. package/dist/query/hooks/use-admin-review-queues.js.map +1 -0
  280. package/dist/query/hooks/use-apps.js +31 -0
  281. package/dist/query/hooks/use-apps.js.map +1 -0
  282. package/dist/query/hooks/use-bsky-content-prefs.js +45 -0
  283. package/dist/query/hooks/use-bsky-content-prefs.js.map +1 -0
  284. package/dist/query/hooks/use-confirmations.js +121 -0
  285. package/dist/query/hooks/use-confirmations.js.map +1 -0
  286. package/dist/query/hooks/use-create-position.js +28 -0
  287. package/dist/query/hooks/use-create-position.js.map +1 -0
  288. package/dist/query/hooks/use-destructive.js +63 -0
  289. package/dist/query/hooks/use-destructive.js.map +1 -0
  290. package/dist/query/hooks/use-discovery.js +53 -0
  291. package/dist/query/hooks/use-discovery.js.map +1 -0
  292. package/dist/query/hooks/use-education-mutations.js +67 -0
  293. package/dist/query/hooks/use-education-mutations.js.map +1 -0
  294. package/dist/query/hooks/use-endorsement-inbox.js +80 -0
  295. package/dist/query/hooks/use-endorsement-inbox.js.map +1 -0
  296. package/dist/query/hooks/use-endorsement-mutations.js +33 -0
  297. package/dist/query/hooks/use-endorsement-mutations.js.map +1 -0
  298. package/dist/query/hooks/use-endorsement.js +20 -0
  299. package/dist/query/hooks/use-endorsement.js.map +1 -0
  300. package/dist/query/hooks/use-entity-search.js +73 -0
  301. package/dist/query/hooks/use-entity-search.js.map +1 -0
  302. package/dist/query/hooks/use-external-accounts.js +143 -0
  303. package/dist/query/hooks/use-external-accounts.js.map +1 -0
  304. package/dist/query/hooks/use-feature-allowlist.js +104 -0
  305. package/dist/query/hooks/use-feature-allowlist.js.map +1 -0
  306. package/dist/query/hooks/use-follow-extras.js +38 -0
  307. package/dist/query/hooks/use-follow-extras.js.map +1 -0
  308. package/dist/query/hooks/use-follow.js +113 -0
  309. package/dist/query/hooks/use-follow.js.map +1 -0
  310. package/dist/query/hooks/use-get-profile-view.js +20 -0
  311. package/dist/query/hooks/use-get-profile-view.js.map +1 -0
  312. package/dist/query/hooks/use-github-prs.js +21 -0
  313. package/dist/query/hooks/use-github-prs.js.map +1 -0
  314. package/dist/query/hooks/use-inbox.js +19 -0
  315. package/dist/query/hooks/use-inbox.js.map +1 -0
  316. package/dist/query/hooks/use-investment-mutations.js +65 -0
  317. package/dist/query/hooks/use-investment-mutations.js.map +1 -0
  318. package/dist/query/hooks/use-keytrace-claims.js +50 -0
  319. package/dist/query/hooks/use-keytrace-claims.js.map +1 -0
  320. package/dist/query/hooks/use-location-mutations.js +71 -0
  321. package/dist/query/hooks/use-location-mutations.js.map +1 -0
  322. package/dist/query/hooks/use-marque-domains.js +50 -0
  323. package/dist/query/hooks/use-marque-domains.js.map +1 -0
  324. package/dist/query/hooks/use-org-claim.js +29 -0
  325. package/dist/query/hooks/use-org-claim.js.map +1 -0
  326. package/dist/query/hooks/use-org-domains.js +28 -0
  327. package/dist/query/hooks/use-org-domains.js.map +1 -0
  328. package/dist/query/hooks/use-org-notification-emails.js +28 -0
  329. package/dist/query/hooks/use-org-notification-emails.js.map +1 -0
  330. package/dist/query/hooks/use-org-profile-settings.js +29 -0
  331. package/dist/query/hooks/use-org-profile-settings.js.map +1 -0
  332. package/dist/query/hooks/use-org-profile.js +21 -0
  333. package/dist/query/hooks/use-org-profile.js.map +1 -0
  334. package/dist/query/hooks/use-position-mutations.js +128 -0
  335. package/dist/query/hooks/use-position-mutations.js.map +1 -0
  336. package/dist/query/hooks/use-profile-completeness.js +21 -0
  337. package/dist/query/hooks/use-profile-completeness.js.map +1 -0
  338. package/dist/query/hooks/use-profile-items-hide.js +53 -0
  339. package/dist/query/hooks/use-profile-items-hide.js.map +1 -0
  340. package/dist/query/hooks/use-profile-mutations.js +143 -0
  341. package/dist/query/hooks/use-profile-mutations.js.map +1 -0
  342. package/dist/query/hooks/use-profile.js +30 -0
  343. package/dist/query/hooks/use-profile.js.map +1 -0
  344. package/dist/query/hooks/use-publication-mutations.js +90 -0
  345. package/dist/query/hooks/use-publication-mutations.js.map +1 -0
  346. package/dist/query/hooks/use-reaction-mutations.js +48 -0
  347. package/dist/query/hooks/use-reaction-mutations.js.map +1 -0
  348. package/dist/query/hooks/use-reactions.js +32 -0
  349. package/dist/query/hooks/use-reactions.js.map +1 -0
  350. package/dist/query/hooks/use-received-endorsements.js +23 -0
  351. package/dist/query/hooks/use-received-endorsements.js.map +1 -0
  352. package/dist/query/hooks/use-reciprocity.js +19 -0
  353. package/dist/query/hooks/use-reciprocity.js.map +1 -0
  354. package/dist/query/hooks/use-record-mutations.js +67 -0
  355. package/dist/query/hooks/use-record-mutations.js.map +1 -0
  356. package/dist/query/hooks/use-repo-inventory.js +43 -0
  357. package/dist/query/hooks/use-repo-inventory.js.map +1 -0
  358. package/dist/query/hooks/use-roadmap-mutations.js +51 -0
  359. package/dist/query/hooks/use-roadmap-mutations.js.map +1 -0
  360. package/dist/query/hooks/use-roadmap.js +31 -0
  361. package/dist/query/hooks/use-roadmap.js.map +1 -0
  362. package/dist/query/hooks/use-search.js +63 -0
  363. package/dist/query/hooks/use-search.js.map +1 -0
  364. package/dist/query/hooks/use-section-primary-mutations.js +53 -0
  365. package/dist/query/hooks/use-section-primary-mutations.js.map +1 -0
  366. package/dist/query/hooks/use-skill-mutations.js +91 -0
  367. package/dist/query/hooks/use-skill-mutations.js.map +1 -0
  368. package/dist/query/hooks/use-stats.js +19 -0
  369. package/dist/query/hooks/use-stats.js.map +1 -0
  370. package/dist/query/hooks/use-stream.js +20 -0
  371. package/dist/query/hooks/use-stream.js.map +1 -0
  372. package/dist/query/hooks/use-unlinked-positions.js +45 -0
  373. package/dist/query/hooks/use-unlinked-positions.js.map +1 -0
  374. package/dist/query/index.cjs.map +1 -1
  375. package/dist/query/index.d.ts +4 -4
  376. package/dist/query/index.js +685 -3744
  377. package/dist/query/index.js.map +1 -1
  378. package/dist/query/keys.js +138 -0
  379. package/dist/query/keys.js.map +1 -0
  380. package/dist/repo/groups.js +81 -0
  381. package/dist/repo/groups.js.map +1 -0
  382. package/dist/repo/index.js +9 -0
  383. package/dist/repo/index.js.map +1 -0
  384. package/dist/repo/labels.js +121 -0
  385. package/dist/repo/labels.js.map +1 -0
  386. package/dist/repo/types.js +1 -0
  387. package/dist/repo/types.js.map +1 -0
  388. package/dist/resume/index.js +5 -179
  389. package/dist/resume/index.js.map +1 -1
  390. package/dist/resume/json-resume.js +153 -0
  391. package/dist/resume/json-resume.js.map +1 -0
  392. package/dist/roadmap/index.js +101 -0
  393. package/dist/roadmap/index.js.map +1 -0
  394. package/dist/rpg/catalog.js +101 -0
  395. package/dist/rpg/catalog.js.map +1 -0
  396. package/dist/rpg/index.js +13 -116
  397. package/dist/rpg/index.js.map +1 -1
  398. package/dist/rpg/unlocks.js +21 -0
  399. package/dist/rpg/unlocks.js.map +1 -0
  400. package/dist/schemas/blob-ref.js +12 -0
  401. package/dist/schemas/blob-ref.js.map +1 -0
  402. package/dist/schemas/confirmation.js +23 -0
  403. package/dist/schemas/confirmation.js.map +1 -0
  404. package/dist/schemas/endorsement-confirmation.js +18 -0
  405. package/dist/schemas/endorsement-confirmation.js.map +1 -0
  406. package/dist/schemas/endorsement.js +19 -0
  407. package/dist/schemas/endorsement.js.map +1 -0
  408. package/dist/schemas/entity.js +74 -0
  409. package/dist/schemas/entity.js.map +1 -0
  410. package/dist/schemas/feed.js +73 -0
  411. package/dist/schemas/feed.js.map +1 -0
  412. package/dist/schemas/follow-profile.js +32 -0
  413. package/dist/schemas/follow-profile.js.map +1 -0
  414. package/dist/schemas/graph-follow.js +19 -0
  415. package/dist/schemas/graph-follow.js.map +1 -0
  416. package/dist/schemas/index.js +164 -629
  417. package/dist/schemas/index.js.map +1 -1
  418. package/dist/schemas/org-employment-attestation.js +28 -0
  419. package/dist/schemas/org-employment-attestation.js.map +1 -0
  420. package/dist/schemas/org-profile.js +64 -0
  421. package/dist/schemas/org-profile.js.map +1 -0
  422. package/dist/schemas/profile-certification.js +28 -0
  423. package/dist/schemas/profile-certification.js.map +1 -0
  424. package/dist/schemas/profile-course.js +32 -0
  425. package/dist/schemas/profile-course.js.map +1 -0
  426. package/dist/schemas/profile-education.js +33 -0
  427. package/dist/schemas/profile-education.js.map +1 -0
  428. package/dist/schemas/profile-external-account.js +15 -0
  429. package/dist/schemas/profile-external-account.js.map +1 -0
  430. package/dist/schemas/profile-honor.js +18 -0
  431. package/dist/schemas/profile-honor.js.map +1 -0
  432. package/dist/schemas/profile-investment.js +48 -0
  433. package/dist/schemas/profile-investment.js.map +1 -0
  434. package/dist/schemas/profile-involvement.js +47 -0
  435. package/dist/schemas/profile-involvement.js.map +1 -0
  436. package/dist/schemas/profile-language.js +12 -0
  437. package/dist/schemas/profile-language.js.map +1 -0
  438. package/dist/schemas/profile-position.js +42 -0
  439. package/dist/schemas/profile-position.js.map +1 -0
  440. package/dist/schemas/profile-presentation-delivery.js +38 -0
  441. package/dist/schemas/profile-presentation-delivery.js.map +1 -0
  442. package/dist/schemas/profile-presentation.js +36 -0
  443. package/dist/schemas/profile-presentation.js.map +1 -0
  444. package/dist/schemas/profile-project.js +48 -0
  445. package/dist/schemas/profile-project.js.map +1 -0
  446. package/dist/schemas/profile-publication.js +30 -0
  447. package/dist/schemas/profile-publication.js.map +1 -0
  448. package/dist/schemas/profile-self.js +22 -0
  449. package/dist/schemas/profile-self.js.map +1 -0
  450. package/dist/schemas/profile-skill.js +13 -0
  451. package/dist/schemas/profile-skill.js.map +1 -0
  452. package/dist/schemas/profile-volunteering.js +20 -0
  453. package/dist/schemas/profile-volunteering.js.map +1 -0
  454. package/dist/schemas/shared.js +56 -0
  455. package/dist/schemas/shared.js.map +1 -0
  456. package/dist/schemas/write/certification.js +16 -0
  457. package/dist/schemas/write/certification.js.map +1 -0
  458. package/dist/schemas/write/course.js +36 -0
  459. package/dist/schemas/write/course.js.map +1 -0
  460. package/dist/schemas/write/education.js +18 -0
  461. package/dist/schemas/write/education.js.map +1 -0
  462. package/dist/schemas/write/external-account.js +13 -0
  463. package/dist/schemas/write/external-account.js.map +1 -0
  464. package/dist/schemas/write/honor.js +14 -0
  465. package/dist/schemas/write/honor.js.map +1 -0
  466. package/dist/schemas/write/index.d.ts +1 -1
  467. package/dist/schemas/write/index.js +89 -593
  468. package/dist/schemas/write/index.js.map +1 -1
  469. package/dist/schemas/write/investment.js +32 -0
  470. package/dist/schemas/write/investment.js.map +1 -0
  471. package/dist/schemas/write/involvement.js +34 -0
  472. package/dist/schemas/write/involvement.js.map +1 -0
  473. package/dist/schemas/write/language.js +10 -0
  474. package/dist/schemas/write/language.js.map +1 -0
  475. package/dist/schemas/write/org-claim.js +56 -0
  476. package/dist/schemas/write/org-claim.js.map +1 -0
  477. package/dist/schemas/write/org-employment-attestation.js +19 -0
  478. package/dist/schemas/write/org-employment-attestation.js.map +1 -0
  479. package/dist/schemas/write/org-profile.js +54 -0
  480. package/dist/schemas/write/org-profile.js.map +1 -0
  481. package/dist/schemas/write/org-settings.js +81 -0
  482. package/dist/schemas/write/org-settings.js.map +1 -0
  483. package/dist/schemas/write/position.js +24 -0
  484. package/dist/schemas/write/position.js.map +1 -0
  485. package/dist/schemas/write/presentation-delivery.js +34 -0
  486. package/dist/schemas/write/presentation-delivery.js.map +1 -0
  487. package/dist/schemas/write/presentation.js +23 -0
  488. package/dist/schemas/write/presentation.js.map +1 -0
  489. package/dist/schemas/write/profile-location.js +21 -0
  490. package/dist/schemas/write/profile-location.js.map +1 -0
  491. package/dist/schemas/write/profile-self.js +27 -0
  492. package/dist/schemas/write/profile-self.js.map +1 -0
  493. package/dist/schemas/write/project.js +27 -0
  494. package/dist/schemas/write/project.js.map +1 -0
  495. package/dist/schemas/write/publication.js +41 -0
  496. package/dist/schemas/write/publication.js.map +1 -0
  497. package/dist/schemas/write/shared.js +96 -0
  498. package/dist/schemas/write/shared.js.map +1 -0
  499. package/dist/schemas/write/skill.js +18 -0
  500. package/dist/schemas/write/skill.js.map +1 -0
  501. package/dist/schemas/write/volunteering.js +16 -0
  502. package/dist/schemas/write/volunteering.js.map +1 -0
  503. package/dist/stream/activity-item.js +1 -0
  504. package/dist/stream/activity-item.js.map +1 -0
  505. package/dist/stream/index.js +49 -0
  506. package/dist/stream/index.js.map +1 -0
  507. package/dist/stream/stream-card-vm-schema.js +265 -0
  508. package/dist/stream/stream-card-vm-schema.js.map +1 -0
  509. package/dist/stream/stream-card-vm.js +1 -0
  510. package/dist/stream/stream-card-vm.js.map +1 -0
  511. package/dist/stream/to-stream-card-vm.js +793 -0
  512. package/dist/stream/to-stream-card-vm.js.map +1 -0
  513. package/dist/stream/two-tier.js +30 -0
  514. package/dist/stream/two-tier.js.map +1 -0
  515. package/dist/stream/verbs.js +120 -0
  516. package/dist/stream/verbs.js.map +1 -0
  517. package/dist/taxonomy/activity-tiers.js +956 -0
  518. package/dist/taxonomy/activity-tiers.js.map +1 -0
  519. package/dist/taxonomy/app-categories.js +42 -0
  520. package/dist/taxonomy/app-categories.js.map +1 -0
  521. package/dist/taxonomy/app-category-map.js +166 -0
  522. package/dist/taxonomy/app-category-map.js.map +1 -0
  523. package/dist/taxonomy/artifact-link-kind.js +29 -0
  524. package/dist/taxonomy/artifact-link-kind.js.map +1 -0
  525. package/dist/taxonomy/calendar-event.js +28 -0
  526. package/dist/taxonomy/calendar-event.js.map +1 -0
  527. package/dist/taxonomy/continents.js +215 -0
  528. package/dist/taxonomy/continents.js.map +1 -0
  529. package/dist/taxonomy/countries.js +203 -0
  530. package/dist/taxonomy/countries.js.map +1 -0
  531. package/dist/taxonomy/course-role.js +37 -0
  532. package/dist/taxonomy/course-role.js.map +1 -0
  533. package/dist/taxonomy/employment-type.js +82 -0
  534. package/dist/taxonomy/employment-type.js.map +1 -0
  535. package/dist/taxonomy/eqf-level.js +59 -0
  536. package/dist/taxonomy/eqf-level.js.map +1 -0
  537. package/dist/taxonomy/index.js +263 -0
  538. package/dist/taxonomy/index.js.map +1 -0
  539. package/dist/taxonomy/industry-taxonomy.js +281 -0
  540. package/dist/taxonomy/industry-taxonomy.js.map +1 -0
  541. package/dist/taxonomy/investment.js +54 -0
  542. package/dist/taxonomy/investment.js.map +1 -0
  543. package/dist/taxonomy/involvement-kind.js +30 -0
  544. package/dist/taxonomy/involvement-kind.js.map +1 -0
  545. package/dist/taxonomy/open-to.js +128 -0
  546. package/dist/taxonomy/open-to.js.map +1 -0
  547. package/dist/taxonomy/platforms.js +56 -0
  548. package/dist/taxonomy/platforms.js.map +1 -0
  549. package/dist/taxonomy/presentation-link-type.js +22 -0
  550. package/dist/taxonomy/presentation-link-type.js.map +1 -0
  551. package/dist/taxonomy/presentation-role.js +21 -0
  552. package/dist/taxonomy/presentation-role.js.map +1 -0
  553. package/dist/taxonomy/publication-type.js +54 -0
  554. package/dist/taxonomy/publication-type.js.map +1 -0
  555. package/dist/taxonomy/relational.js +25 -0
  556. package/dist/taxonomy/relational.js.map +1 -0
  557. package/dist/taxonomy/search-filter-defs.js +66 -0
  558. package/dist/taxonomy/search-filter-defs.js.map +1 -0
  559. package/dist/taxonomy/skill-categories.js +28 -0
  560. package/dist/taxonomy/skill-categories.js.map +1 -0
  561. package/dist/taxonomy/skill-display-groups.js +12 -0
  562. package/dist/taxonomy/skill-display-groups.js.map +1 -0
  563. package/dist/taxonomy/skill-grouping.js +90 -0
  564. package/dist/taxonomy/skill-grouping.js.map +1 -0
  565. package/dist/taxonomy/verification-providers.js +69 -0
  566. package/dist/taxonomy/verification-providers.js.map +1 -0
  567. package/dist/taxonomy/workplace-type.js +38 -0
  568. package/dist/taxonomy/workplace-type.js.map +1 -0
  569. package/dist/tokens/colors.js +11 -0
  570. package/dist/tokens/colors.js.map +1 -0
  571. package/dist/tokens/icons.js +15 -0
  572. package/dist/tokens/icons.js.map +1 -0
  573. package/dist/tokens/index.js +10 -39
  574. package/dist/tokens/index.js.map +1 -1
  575. package/dist/tokens/typography.js +23 -0
  576. package/dist/tokens/typography.js.map +1 -0
  577. package/dist/types/index.js +10 -0
  578. package/dist/types/index.js.map +1 -0
  579. package/dist/types/profile-view.js +1 -0
  580. package/dist/types/profile-view.js.map +1 -0
  581. package/dist/{use-org-notification-emails-0hjt-dEw.d.ts → use-org-notification-emails-CWWi1D8t.d.ts} +2 -2
  582. package/package.json +4 -3
package/dist/jev/index.js CHANGED
@@ -1,6 +1,5 @@
1
- import { z } from 'zod';
2
-
3
1
  // src/jev/index.ts
2
+ import { z } from "zod";
4
3
  var noulAnswerSchema = z.object({
5
4
  type: z.literal("noul"),
6
5
  noul: z.number().min(0).max(1)
@@ -101,7 +100,21 @@ function pickChoiceAboveFloor(answer, opts = {}) {
101
100
  if (opts.noMatch !== void 0 && answer.choice === opts.noMatch) return null;
102
101
  return answer.choice;
103
102
  }
104
-
105
- export { FIRMOGRAPHIC_CONFIDENCE_FLOOR, INDUSTRY_CHOICE_QUESTION, INDUSTRY_TAXONOMY, ORG_PAIR_NOUL_QUESTION, ORG_TYPE_CHOICE_QUESTION, ORG_TYPE_TAXONOMY, SAME_ORG_THRESHOLD, SIZE_BAND_CHOICE_QUESTION, SIZE_BAND_TAXONOMY, buildFirmographicState, buildOrgPairState, choiceAnswerSchema, isLikelySameOrg, noulAnswerSchema, pickChoiceAboveFloor };
106
- //# sourceMappingURL=index.js.map
103
+ export {
104
+ FIRMOGRAPHIC_CONFIDENCE_FLOOR,
105
+ INDUSTRY_CHOICE_QUESTION,
106
+ INDUSTRY_TAXONOMY,
107
+ ORG_PAIR_NOUL_QUESTION,
108
+ ORG_TYPE_CHOICE_QUESTION,
109
+ ORG_TYPE_TAXONOMY,
110
+ SAME_ORG_THRESHOLD,
111
+ SIZE_BAND_CHOICE_QUESTION,
112
+ SIZE_BAND_TAXONOMY,
113
+ buildFirmographicState,
114
+ buildOrgPairState,
115
+ choiceAnswerSchema,
116
+ isLikelySameOrg,
117
+ noulAnswerSchema,
118
+ pickChoiceAboveFloor
119
+ };
107
120
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/jev/index.ts"],"names":[],"mappings":";;;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;AACX;AAEA,SAAS,cAAA,CAAe,cAAsB,QAAA,EAAkD;AAC9F,EAAA,OAAO,EAAE,IAAA,EAAM,QAAA,EAAU,YAAA,EAAc,QAAA,EAAS;AAClD;AAEO,IAAM,wBAAA,GAA2B,cAAA;AAAA,EACtC,iFAAA;AAAA,EACA;AACF;AAEO,IAAM,wBAAA,GAA2B,cAAA;AAAA,EACtC,8HAAA;AAAA,EACA;AACF;AAEO,IAAM,yBAAA,GAA4B,cAAA;AAAA,EACvC,+EAAA;AAAA,EACA;AACF;AAwBO,SAAS,uBAAuB,GAAA,EAAoD;AACzF,EAAA,MAAM,SAAA,GAAY,QAAQ,GAAG,CAAA;AAC7B,EAAA,IAAI,UAAU,KAAA,IAAS,SAAA,CAAU,MAAM,MAAA,KAAW,CAAA,SAAU,SAAA,CAAU,KAAA;AACtE,EAAA,OAAO,SAAA;AACT;AAMO,IAAM,6BAAA,GAAgC;AAOtC,SAAS,oBAAA,CACd,MAAA,EACA,IAAA,GAA6C,EAAC,EAC/B;AACf,EAAA,MAAM,KAAA,GAAQ,KAAK,KAAA,IAAS,6BAAA;AAC5B,EAAA,IAAI,MAAA,CAAO,UAAA,GAAa,KAAA,EAAO,OAAO,IAAA;AACtC,EAAA,IAAI,KAAK,OAAA,KAAY,MAAA,IAAa,OAAO,MAAA,KAAW,IAAA,CAAK,SAAS,OAAO,IAAA;AACzE,EAAA,OAAO,MAAA,CAAO,MAAA;AAChB","file":"index.js","sourcesContent":["/**\n * `@singi-labs/sifa-sdk/jev` -- TypeSafe System One (Jev) question builders,\n * taxonomies, result schemas, and threshold predicates for Sifa's organisation\n * intelligence.\n *\n * This subpath is pure: it defines the typed *questions* to ask Jev, validates\n * the *answers*, and holds the policy constants (thresholds, taxonomies) that\n * turn a raw judgment into a decision. It performs no network calls and needs\n * no API key, so it is safe to import anywhere. The actual `systemOne` call\n * lives server-side in sifa-api, which passes an API key that must never reach\n * the browser.\n *\n * Judgment shapes:\n * - Duplicate-org detection: a single Noul over a candidate pair.\n * - Firmographic classification: independent Choice questions (industry, type,\n * size) asked together over one org's state.\n *\n * See docs.typesafe.ai for the wire contract. Typed output guarantees the\n * interface, not truth: validate thresholds on labelled Sifa data before\n * enabling any write.\n */\n\nimport { z } from 'zod';\n\n// ---------------------------------------------------------------------------\n// Wire question types\n// ---------------------------------------------------------------------------\n\n/** A yes/no judgment. `criteria` clarifies what true vs false means. */\nexport interface NoulQuestion {\n type: 'noul';\n instructions: string;\n criteria?: { true: string; false: string };\n}\n\n/** A single-selection judgment. `criteria` maps each option to its description. */\nexport interface ChoiceQuestion {\n type: 'choice';\n instructions: string;\n criteria: Record<string, string>;\n}\n\n// ---------------------------------------------------------------------------\n// Answer schemas (validate Jev's response before code trusts it)\n// ---------------------------------------------------------------------------\n\n/** Jev's Noul answer: `noul` is the probability that the answer is yes (0..1). */\nexport const noulAnswerSchema = z.object({\n type: z.literal('noul'),\n noul: z.number().min(0).max(1),\n});\nexport type NoulAnswer = z.infer<typeof noulAnswerSchema>;\n\n/**\n * Jev's Choice answer: `choice` is the highest-probability option, `confidence`\n * summarises how concentrated the distribution is, `probabilities` sums to 1.\n */\nexport const choiceAnswerSchema = z.object({\n type: z.literal('choice'),\n choice: z.string(),\n confidence: z.number().min(0).max(1),\n probabilities: z.record(z.string(), z.number()),\n});\nexport type ChoiceAnswer = z.infer<typeof choiceAnswerSchema>;\n\n// ---------------------------------------------------------------------------\n// Duplicate-org detection (Noul) -- ticket #560\n// ---------------------------------------------------------------------------\n\n/** Public, non-user fields we compare when judging whether two orgs are the same. */\nexport interface OrgRecordInput {\n name: string;\n domain?: string;\n location?: string;\n description?: string;\n}\n\n/** Build a plain object with only the defined keys (Jev sees no `undefined`). */\nfunction compact<T extends object>(obj: T): Partial<T> {\n const out: Partial<T> = {};\n for (const [k, v] of Object.entries(obj)) {\n if (v !== undefined && v !== null && v !== '') out[k as keyof T] = v as T[keyof T];\n }\n return out;\n}\n\n/**\n * State for the org-pair judgment. Both records live under stable named fields\n * so the question can reference them unambiguously.\n */\nexport function buildOrgPairState(\n a: OrgRecordInput,\n b: OrgRecordInput,\n): { orgA: Partial<OrgRecordInput>; orgB: Partial<OrgRecordInput> } {\n return { orgA: compact(a), orgB: compact(b) };\n}\n\n/** Static Noul question paired with {@link buildOrgPairState}. */\nexport const ORG_PAIR_NOUL_QUESTION: NoulQuestion = {\n type: 'noul',\n instructions:\n 'The state holds two organisation records, orgA and orgB. Do they refer to the same real-world organisation?',\n criteria: {\n true: 'Same organisation, e.g. a legal-suffix or abbreviation variant of the same name, or the same primary domain.',\n false:\n 'Distinct organisations, e.g. a shared word in the name but different domains, locations, or lines of business.',\n },\n};\n\n/**\n * Threshold favouring precision: a wrong merge is worse than a missed one.\n * Validate on labelled pairs (ticket #560) before enabling merges in prod.\n */\nexport const SAME_ORG_THRESHOLD = 0.85;\n\n/** True when the Noul probability clears the merge threshold. */\nexport function isLikelySameOrg(noul: number, threshold: number = SAME_ORG_THRESHOLD): boolean {\n return noul >= threshold;\n}\n\n// ---------------------------------------------------------------------------\n// Firmographic classification (Choice) -- ticket #561\n// ---------------------------------------------------------------------------\n\n/** Industry taxonomy. Single source of truth; `other` is the no-match option. */\nexport const INDUSTRY_TAXONOMY: Record<string, string> = {\n technology: 'Software, IT services, internet, hardware, telecoms',\n finance: 'Banking, insurance, investment, fintech, accounting',\n healthcare: 'Medical care, pharma, biotech, health services',\n education: 'Schools, universities, training, edtech',\n manufacturing: 'Industrial production, hardware, materials, automotive',\n retail: 'Retail, ecommerce, consumer goods, hospitality, food',\n media: 'Media, publishing, entertainment, marketing, advertising',\n energy: 'Energy, utilities, oil and gas, renewables',\n construction: 'Construction, real estate, architecture, engineering',\n transport: 'Transport, logistics, shipping, aviation',\n professional_services: 'Legal, consulting, HR, business services',\n public_sector: 'Government, defence, public administration',\n nonprofit: 'Charities, NGOs, foundations, associations',\n agriculture: 'Agriculture, farming, fishing, forestry',\n other: 'None of the above, or not enough information to decide',\n};\n\n/**\n * Organisation type (the org's FORM, not its sector -- a hospital's type is\n * healthcare_provider while its industry is healthcare). `other` is the no-match\n * option. Prefer the registry `legalForm` where it already encodes the form.\n */\nexport const ORG_TYPE_TAXONOMY: Record<string, string> = {\n company: 'For-profit company or corporation',\n cooperative: 'Member-owned co-operative (e.g. eG, SCOP, mutual, credit union)',\n nonprofit: 'Nonprofit, charity, or NGO',\n foundation: 'Grant-making or endowed foundation (e.g. Stiftung, fonds)',\n government: 'Government body, agency, or public-sector authority',\n educational: 'School, college, or university',\n research_institute: 'Independent research institute or laboratory',\n healthcare_provider: 'Hospital, clinic, or healthcare provider',\n professional_association: 'Professional association, trade body, or trade union',\n agency: 'Agency, consultancy, or professional-services firm',\n religious: 'Religious organisation',\n political: 'Political party or organisation',\n self_employed: 'Sole proprietor, freelancer, or self-employed individual',\n other: 'None of the above, or not enough information to decide',\n};\n\n/** Ordered employee-size bands; `unknown` is the no-match option. */\nexport const SIZE_BAND_TAXONOMY: Record<string, string> = {\n solo: '1 person',\n small: '2 to 10 people',\n medium: '11 to 50 people',\n large: '51 to 250 people',\n enterprise: 'More than 250 people',\n unknown: 'Not enough information to decide',\n};\n\nfunction choiceQuestion(instructions: string, criteria: Record<string, string>): ChoiceQuestion {\n return { type: 'choice', instructions, criteria };\n}\n\nexport const INDUSTRY_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which single industry best describes this organisation?',\n INDUSTRY_TAXONOMY,\n);\n\nexport const ORG_TYPE_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which single organisation type (its form, not its industry sector) best describes this organisation?',\n ORG_TYPE_TAXONOMY,\n);\n\nexport const SIZE_BAND_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which employee-size band best fits this organisation?',\n SIZE_BAND_TAXONOMY,\n);\n\n/**\n * Input for firmographic classification. `enrichmentText` (the org's description)\n * is the strongest evidence, but it is optional: many registry orgs have only a\n * name, domain, country, or link set. Passing those lets Jev classify from the\n * signal we hold rather than skipping the org for want of a description. A bare\n * name alone rarely suffices; a name plus a domain or country often does.\n */\nexport interface FirmographicInput {\n name: string;\n domain?: string;\n country?: string;\n /** Featured/external link labels or hosts (e.g. 'linkedin', 'wikipedia'). */\n links?: string[];\n /** An already-known industry, when set (helps disambiguate type/size). */\n industry?: string;\n enrichmentText?: string;\n}\n\n/**\n * State for the firmographic questions. Drops absent/empty fields (including\n * empty arrays) so Jev never sees a null or `[]` it would have to reason about.\n */\nexport function buildFirmographicState(org: FirmographicInput): Partial<FirmographicInput> {\n const compacted = compact(org);\n if (compacted.links && compacted.links.length === 0) delete compacted.links;\n return compacted;\n}\n\n/**\n * Below this confidence a firmographic field is left unset rather than guessed.\n * Validate per field on labelled orgs (ticket #561).\n */\nexport const FIRMOGRAPHIC_CONFIDENCE_FLOOR = 0.6;\n\n/**\n * Select the classified option, or `null` to leave the field unset. Returns\n * null when confidence is below the floor, or when the selected option is the\n * taxonomy's no-match option.\n */\nexport function pickChoiceAboveFloor(\n answer: ChoiceAnswer,\n opts: { floor?: number; noMatch?: string } = {},\n): string | null {\n const floor = opts.floor ?? FIRMOGRAPHIC_CONFIDENCE_FLOOR;\n if (answer.confidence < floor) return null;\n if (opts.noMatch !== undefined && answer.choice === opts.noMatch) return null;\n return answer.choice;\n}\n"]}
1
+ {"version":3,"sources":["../../src/jev/index.ts"],"sourcesContent":["/**\n * `@singi-labs/sifa-sdk/jev` -- TypeSafe System One (Jev) question builders,\n * taxonomies, result schemas, and threshold predicates for Sifa's organisation\n * intelligence.\n *\n * This subpath is pure: it defines the typed *questions* to ask Jev, validates\n * the *answers*, and holds the policy constants (thresholds, taxonomies) that\n * turn a raw judgment into a decision. It performs no network calls and needs\n * no API key, so it is safe to import anywhere. The actual `systemOne` call\n * lives server-side in sifa-api, which passes an API key that must never reach\n * the browser.\n *\n * Judgment shapes:\n * - Duplicate-org detection: a single Noul over a candidate pair.\n * - Firmographic classification: independent Choice questions (industry, type,\n * size) asked together over one org's state.\n *\n * See docs.typesafe.ai for the wire contract. Typed output guarantees the\n * interface, not truth: validate thresholds on labelled Sifa data before\n * enabling any write.\n */\n\nimport { z } from 'zod';\n\n// ---------------------------------------------------------------------------\n// Wire question types\n// ---------------------------------------------------------------------------\n\n/** A yes/no judgment. `criteria` clarifies what true vs false means. */\nexport interface NoulQuestion {\n type: 'noul';\n instructions: string;\n criteria?: { true: string; false: string };\n}\n\n/** A single-selection judgment. `criteria` maps each option to its description. */\nexport interface ChoiceQuestion {\n type: 'choice';\n instructions: string;\n criteria: Record<string, string>;\n}\n\n// ---------------------------------------------------------------------------\n// Answer schemas (validate Jev's response before code trusts it)\n// ---------------------------------------------------------------------------\n\n/** Jev's Noul answer: `noul` is the probability that the answer is yes (0..1). */\nexport const noulAnswerSchema = z.object({\n type: z.literal('noul'),\n noul: z.number().min(0).max(1),\n});\nexport type NoulAnswer = z.infer<typeof noulAnswerSchema>;\n\n/**\n * Jev's Choice answer: `choice` is the highest-probability option, `confidence`\n * summarises how concentrated the distribution is, `probabilities` sums to 1.\n */\nexport const choiceAnswerSchema = z.object({\n type: z.literal('choice'),\n choice: z.string(),\n confidence: z.number().min(0).max(1),\n probabilities: z.record(z.string(), z.number()),\n});\nexport type ChoiceAnswer = z.infer<typeof choiceAnswerSchema>;\n\n// ---------------------------------------------------------------------------\n// Duplicate-org detection (Noul) -- ticket #560\n// ---------------------------------------------------------------------------\n\n/** Public, non-user fields we compare when judging whether two orgs are the same. */\nexport interface OrgRecordInput {\n name: string;\n domain?: string;\n location?: string;\n description?: string;\n}\n\n/** Build a plain object with only the defined keys (Jev sees no `undefined`). */\nfunction compact<T extends object>(obj: T): Partial<T> {\n const out: Partial<T> = {};\n for (const [k, v] of Object.entries(obj)) {\n if (v !== undefined && v !== null && v !== '') out[k as keyof T] = v as T[keyof T];\n }\n return out;\n}\n\n/**\n * State for the org-pair judgment. Both records live under stable named fields\n * so the question can reference them unambiguously.\n */\nexport function buildOrgPairState(\n a: OrgRecordInput,\n b: OrgRecordInput,\n): { orgA: Partial<OrgRecordInput>; orgB: Partial<OrgRecordInput> } {\n return { orgA: compact(a), orgB: compact(b) };\n}\n\n/** Static Noul question paired with {@link buildOrgPairState}. */\nexport const ORG_PAIR_NOUL_QUESTION: NoulQuestion = {\n type: 'noul',\n instructions:\n 'The state holds two organisation records, orgA and orgB. Do they refer to the same real-world organisation?',\n criteria: {\n true: 'Same organisation, e.g. a legal-suffix or abbreviation variant of the same name, or the same primary domain.',\n false:\n 'Distinct organisations, e.g. a shared word in the name but different domains, locations, or lines of business.',\n },\n};\n\n/**\n * Threshold favouring precision: a wrong merge is worse than a missed one.\n * Validate on labelled pairs (ticket #560) before enabling merges in prod.\n */\nexport const SAME_ORG_THRESHOLD = 0.85;\n\n/** True when the Noul probability clears the merge threshold. */\nexport function isLikelySameOrg(noul: number, threshold: number = SAME_ORG_THRESHOLD): boolean {\n return noul >= threshold;\n}\n\n// ---------------------------------------------------------------------------\n// Firmographic classification (Choice) -- ticket #561\n// ---------------------------------------------------------------------------\n\n/** Industry taxonomy. Single source of truth; `other` is the no-match option. */\nexport const INDUSTRY_TAXONOMY: Record<string, string> = {\n technology: 'Software, IT services, internet, hardware, telecoms',\n finance: 'Banking, insurance, investment, fintech, accounting',\n healthcare: 'Medical care, pharma, biotech, health services',\n education: 'Schools, universities, training, edtech',\n manufacturing: 'Industrial production, hardware, materials, automotive',\n retail: 'Retail, ecommerce, consumer goods, hospitality, food',\n media: 'Media, publishing, entertainment, marketing, advertising',\n energy: 'Energy, utilities, oil and gas, renewables',\n construction: 'Construction, real estate, architecture, engineering',\n transport: 'Transport, logistics, shipping, aviation',\n professional_services: 'Legal, consulting, HR, business services',\n public_sector: 'Government, defence, public administration',\n nonprofit: 'Charities, NGOs, foundations, associations',\n agriculture: 'Agriculture, farming, fishing, forestry',\n other: 'None of the above, or not enough information to decide',\n};\n\n/**\n * Organisation type (the org's FORM, not its sector -- a hospital's type is\n * healthcare_provider while its industry is healthcare). `other` is the no-match\n * option. Prefer the registry `legalForm` where it already encodes the form.\n */\nexport const ORG_TYPE_TAXONOMY: Record<string, string> = {\n company: 'For-profit company or corporation',\n cooperative: 'Member-owned co-operative (e.g. eG, SCOP, mutual, credit union)',\n nonprofit: 'Nonprofit, charity, or NGO',\n foundation: 'Grant-making or endowed foundation (e.g. Stiftung, fonds)',\n government: 'Government body, agency, or public-sector authority',\n educational: 'School, college, or university',\n research_institute: 'Independent research institute or laboratory',\n healthcare_provider: 'Hospital, clinic, or healthcare provider',\n professional_association: 'Professional association, trade body, or trade union',\n agency: 'Agency, consultancy, or professional-services firm',\n religious: 'Religious organisation',\n political: 'Political party or organisation',\n self_employed: 'Sole proprietor, freelancer, or self-employed individual',\n other: 'None of the above, or not enough information to decide',\n};\n\n/** Ordered employee-size bands; `unknown` is the no-match option. */\nexport const SIZE_BAND_TAXONOMY: Record<string, string> = {\n solo: '1 person',\n small: '2 to 10 people',\n medium: '11 to 50 people',\n large: '51 to 250 people',\n enterprise: 'More than 250 people',\n unknown: 'Not enough information to decide',\n};\n\nfunction choiceQuestion(instructions: string, criteria: Record<string, string>): ChoiceQuestion {\n return { type: 'choice', instructions, criteria };\n}\n\nexport const INDUSTRY_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which single industry best describes this organisation?',\n INDUSTRY_TAXONOMY,\n);\n\nexport const ORG_TYPE_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which single organisation type (its form, not its industry sector) best describes this organisation?',\n ORG_TYPE_TAXONOMY,\n);\n\nexport const SIZE_BAND_CHOICE_QUESTION = choiceQuestion(\n 'Based on the org state, which employee-size band best fits this organisation?',\n SIZE_BAND_TAXONOMY,\n);\n\n/**\n * Input for firmographic classification. `enrichmentText` (the org's description)\n * is the strongest evidence, but it is optional: many registry orgs have only a\n * name, domain, country, or link set. Passing those lets Jev classify from the\n * signal we hold rather than skipping the org for want of a description. A bare\n * name alone rarely suffices; a name plus a domain or country often does.\n */\nexport interface FirmographicInput {\n name: string;\n domain?: string;\n country?: string;\n /** Featured/external link labels or hosts (e.g. 'linkedin', 'wikipedia'). */\n links?: string[];\n /** An already-known industry, when set (helps disambiguate type/size). */\n industry?: string;\n enrichmentText?: string;\n}\n\n/**\n * State for the firmographic questions. Drops absent/empty fields (including\n * empty arrays) so Jev never sees a null or `[]` it would have to reason about.\n */\nexport function buildFirmographicState(org: FirmographicInput): Partial<FirmographicInput> {\n const compacted = compact(org);\n if (compacted.links && compacted.links.length === 0) delete compacted.links;\n return compacted;\n}\n\n/**\n * Below this confidence a firmographic field is left unset rather than guessed.\n * Validate per field on labelled orgs (ticket #561).\n */\nexport const FIRMOGRAPHIC_CONFIDENCE_FLOOR = 0.6;\n\n/**\n * Select the classified option, or `null` to leave the field unset. Returns\n * null when confidence is below the floor, or when the selected option is the\n * taxonomy's no-match option.\n */\nexport function pickChoiceAboveFloor(\n answer: ChoiceAnswer,\n opts: { floor?: number; noMatch?: string } = {},\n): string | null {\n const floor = opts.floor ?? FIRMOGRAPHIC_CONFIDENCE_FLOOR;\n if (answer.confidence < floor) return null;\n if (opts.noMatch !== undefined && answer.choice === opts.noMatch) return null;\n return answer.choice;\n}\n"],"mappings":";AAsBA,SAAS,SAAS;AAyBX,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,MAAM,EAAE,QAAQ,MAAM;AAAA,EACtB,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAC/B,CAAC;AAOM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,QAAQ,QAAQ;AAAA,EACxB,QAAQ,EAAE,OAAO;AAAA,EACjB,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAAA,EACnC,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AAChD,CAAC;AAgBD,SAAS,QAA0B,KAAoB;AACrD,QAAM,MAAkB,CAAC;AACzB,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,GAAG,GAAG;AACxC,QAAI,MAAM,UA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