Get introduction recommendations
type: grlc-query
description: Returns recommended introduction actions for a given user, only when the viewer is that user themselves (owner gate ?__CURRENTUSER_multi_iri = ?_user_iri). One row per applicable recommendation, each carrying a ?recommendation text. A 'local introduction' is defined exactly as the UI's isIntroWithLocalKey: SIGNED BY the local key (?__LOCALPUBKEY_multi), DECLARING it, with the local-key declaration's location absent or matching ?__SITEURL_multi (nanobench->nanodash); localCount counts those. Branches: (1) create — localCount=0 (carries local-key bundle to prefill the create action); (2) get-approval — localCount=1 and the local key is not approved in the trust repo (carries the intro nanopub); (3) derive — localCount=0 but the user has introductions elsewhere; (4) retract — localCount>1; (5) update-approved — localCount>0, the local key is not approved, but the user has another approved key in the trust repo. No rows for non-owners or logged-out viewers. local_pubkey/short/site_url are action-mapping data (hidden from display).
license: LICENSE-2.0
sparql: prefix np: <http://www.nanopub.org/nschema#> prefix npx: <http://purl.org/nanopub/x/> prefix npa: <http://purl.org/nanopub/admin/> select ?recommendation ?intro_np ?local_pubkey ?local_pubkey_short ?site_url where { values ?__CURRENTUSER_multi_iri {} filter(?_user_iri = ?__CURRENTUSER_multi_iri) { # (1) create: no local introduction yet values ?__LOCALPUBKEY_multi {} values ?__SITEURL_multi {} filter(bound(?__LOCALPUBKEY_multi)) { select (count(distinct ?lnp) as ?localCount) where { values ?__LOCALPUBKEY_multi {} values ?__SITEURL_multi {} graph npa:graph { ?lnp npa:hasValidSignatureForPublicKey ?lsign . filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . } ?lnp np:hasAssertion ?la . } graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } } filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false)) filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false)) filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false)) } } filter(?localCount = 0) bind(coalesce(str(?__LOCALPUBKEY_multi), "") as ?local_pubkey) bind(if(strlen(?local_pubkey) >= 45, concat(substr(?local_pubkey, 1, 1), "..", substr(?local_pubkey, 41, 5), ".."), "") as ?local_pubkey_short) bind(coalesce(str(?__SITEURL_multi), "") as ?site_url) bind("The local key from this site is not part of an introduction yet. Create one to link it to your identity." as ?recommendation) } union { # (2) get-approval: exactly one local introduction, not yet approved values ?__LOCALPUBKEY_multi {} values ?__SITEURL_multi {} filter(bound(?__LOCALPUBKEY_multi)) { select (count(distinct ?lnp) as ?localCount) (sample(?lnp) as ?localIntroNp) where { values ?__LOCALPUBKEY_multi {} values ?__SITEURL_multi {} graph npa:graph { ?lnp npa:hasValidSignatureForPublicKey ?lsign . filter not exists { ?lnpx npx:invalidates…

https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
type: Nanopublication
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
created: 2026-06-09T06:40:01Z
creator: Tobias Kuhn
license: https://creativecommons.org/licenses/by/4.0/
embeds: Get introduction recommendations

sig
has algorithm: RSA
signed by: Tobias Kuhn