@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-intro-recommendations a ; dct:description "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). Currently one recommendation row: 'Create Introduction', emitted when the viewer's local key (?__LOCALPUBKEY_multi) is declared in none of the user's introductions. Carries the local-key bundle (key string, short name, site URL) to prefill the create action. No rows for non-owners or logged-out viewers."; dct:license ; rdfs:label "Get introduction recommendations"; ; """prefix np: prefix npx: prefix npa: select ?recommendation ?local_pubkey ?local_pubkey_short ?site_url where { values ?__CURRENTUSER_multi_iri {} values ?__LOCALPUBKEY_multi {} values ?__SITEURL_multi {} filter(?_user_iri = ?__CURRENTUSER_multi_iri) filter(bound(?__LOCALPUBKEY_multi)) { select (count(distinct ?lnp) as ?localCount) where { values ?__LOCALPUBKEY_multi {} graph npa:graph { ?lnp npa:hasValidSignatureForPublicKey ?lk2 . filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lk2 . } ?lnp np:hasAssertion ?la . } graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . } filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false)) } } filter(?localCount = 0) bind(\"The local key from this site is not part of an introduction yet. Create one to link it to your identity.\" as ?recommendation) 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) }""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" . this: dct:created "2026-06-08T17:45:00Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-intro-recommendations; npx:introduces sub:get-intro-recommendations; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "XVsQfE+Yy4lmS423RNkT7FbspRBfsG7izB35GAVW+r5Vev7it+ueOkRpIgiuuYASURcwrVqCMeXcOA8MvxCIdMldBMV0zUkzpEYWqU6vZlw/4M2xYUBV0FBo/27qXOC9MyTci+FRWFSkUgoB2YbJgypx/mS5Vue0ZG0Ilyv77Ww="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }