[ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/provenance", "@graph": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-08T18:39:01Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/get-intro-recommendations" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RAoZLJ-edn0orSDM2utQJpQNz6rMLVsze-GJGvgiVhHyg" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "J4fRrXywYHhfz8RleG095ymnjD8NqNBXU8dCyJIydKJimCPY/n2OvYp6Itcp9kyc4w/ryB/JhxN54Hc9R2ZXdf89Mx5apsAavA9L6Wl9wnrt1ofEtDZbHpMSoLPo3/4G7FJFtAMckKtrmIBM9I+OtcaBk+X4mLpFkOvzmQWE5jA=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/Head", "@graph": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/assertion", "@graph": [ { "@id": "https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8/get-intro-recommendations", "http://purl.org/dc/terms/description": [ { "@value": "Returns recommended introduction actions for a given user, but only when the viewer is that user themselves (owner gate via ?__CURRENTUSER_multi_iri = ?_user_iri). Emits one row per applicable recommendation: 'Create Introduction' when the viewer's local key (?__LOCALPUBKEY_multi) is in none of the user's introductions (localCount=0; carries the local-key bundle to prefill the create action), and 'Get approved' when the local key is in exactly one introduction that is not yet approved (localCount=1 and no loaded AccountState, checked by federating to the trust repo; carries the intro nanopub to link to). No rows for non-owners or logged-out viewers. local_pubkey/short/site_url are action-mapping data (hidden from display)." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get introduction recommendations" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/type/77757cabf6184c51c20b8b0fe5dc5e1365b7f628448335184ad54319a0affdfc" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix np: \nprefix npx: \nprefix npa: \n\nselect ?recommendation ?intro_np ?local_pubkey ?local_pubkey_short ?site_url\nwhere {\n values ?__CURRENTUSER_multi_iri {}\n filter(?_user_iri = ?__CURRENTUSER_multi_iri)\n {\n values ?__LOCALPUBKEY_multi {}\n values ?__SITEURL_multi {}\n filter(bound(?__LOCALPUBKEY_multi))\n {\n select (count(distinct ?lnp) as ?localCount) where {\n values ?__LOCALPUBKEY_multi {}\n graph npa:graph {\n ?lnp npa:hasValidSignatureForPublicKey ?lk2 .\n filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lk2 . }\n ?lnp np:hasAssertion ?la .\n }\n graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . }\n filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))\n }\n }\n filter(?localCount = 0)\n bind(coalesce(str(?__LOCALPUBKEY_multi), \"\") as ?local_pubkey)\n bind(if(strlen(?local_pubkey) >= 45, concat(substr(?local_pubkey, 1, 1), \"..\", substr(?local_pubkey, 41, 5), \"..\"), \"\") as ?local_pubkey_short)\n bind(coalesce(str(?__SITEURL_multi), \"\") as ?site_url)\n bind(\"The local key from this site is not part of an introduction yet. Create one to link it to your identity.\" as ?recommendation)\n } union {\n values ?__LOCALPUBKEY_multi {}\n filter(bound(?__LOCALPUBKEY_multi))\n {\n select (count(distinct ?lnp) as ?localCount) (sample(?lnp) as ?localIntroNp) where {\n values ?__LOCALPUBKEY_multi {}\n graph npa:graph {\n ?lnp npa:hasValidSignatureForPublicKey ?lk2 .\n filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lk2 . }\n ?lnp np:hasAssertion ?la .\n }\n graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . }\n filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))\n }\n }\n filter(?localCount = 1)\n bind(lcase(sha256(str(?__LOCALPUBKEY_multi))) as ?lpkHash)\n filter not exists {\n service {\n graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg . }\n graph ?tg { ?acct npa:agent ?_user_iri ; npa:pubkey ?lpkHash ; npa:trustStatus npa:loaded . }\n }\n }\n bind(\"Your introduction with the local key is not approved yet. Share it so a maintainer can approve it:\" as ?recommendation)\n bind(?localIntroNp as ?intro_np)\n }\n}" } ] } ] } ]