interplane-forge
INTERPLANE Forge
Brought by drakestapleton
interplane-forge / social / 05decl.om
| 1 | note ForgeSocial: every social text and global, declared before any use |
| 2 | global gsdd uchar 512 |
| 3 | global gsddl ulong 1 |
| 4 | global gspth uchar 1024 |
| 5 | global gspthl ulong 1 |
| 6 | global gsok ulong 1 |
| 7 | global gskey uchar 32 |
| 8 | global gsnow ulong 1 |
| 9 | global gsenv uchar 4096 |
| 10 | text tsenvdd "FORGE_SOCIAL_DIR=" |
| 11 | text tsurand "/dev/urandom" |
| 12 | text tsnull "/dev/null" |
| 13 | text tsb58 "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" |
| 14 | text tsb64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| 15 | text tssshkg "/usr/bin/ssh-keygen" |
| 16 | text tsY "-Y" |
| 17 | text tsverify "verify" |
| 18 | text tsdf "-f" |
| 19 | text tsdI "-I" |
| 20 | text tsdn "-n" |
| 21 | text tsds "-s" |
| 22 | text tsprinc "forge-user" |
| 23 | text tsns "interplane-forge" |
| 24 | text tsedname "ssh-ed25519" |
| 25 | global gspk uchar 4096 |
| 26 | global gspkl ulong 1 |
| 27 | global gspkn ulong 1 |
| 28 | global gspko ulong 1 |
| 29 | global gswst uchar 8 |
| 30 | text tslog "social.log" |
| 31 | text tshead "social.head" |
| 32 | text tshtmp "social.head.tmp" |
| 33 | text tskeyf "social.key" |
| 34 | text tstmpd "tmp/" |
| 35 | text tsl1 "{\"seq\":" |
| 36 | text tsl2 ",\"ts\":" |
| 37 | text tsl3 ",\"did\":\"did:key:" |
| 38 | text tsl4 "\",\"action\":\"" |
| 39 | text tsl5 "\",\"target\":\"" |
| 40 | text tsl6 "\",\"prev\":\"" |
| 41 | text tsl7 "\"}" |
| 42 | text tsdidp "did:key:" |
| 43 | note tsowndid: the owner account signs in with the Interplane owner key (the key that signs the store), not the retired node key |
| 44 | text tsowndid "z6MkfYxkw4ykELYYGE1J9sLkT6XmVdAagNDaZmC7mSjik5GV" |
| 45 | text tsradp "rad:" |
| 46 | text tsgitp "git:" |
| 47 | text tsnonp "n:" |
| 48 | text tsaccnt "account" |
| 49 | text tsaname "name" |
| 50 | text tsasess "session" |
| 51 | text tsalogo "logout" |
| 52 | text tsastar "star" |
| 53 | text tsaunst "unstar" |
| 54 | text tsafav "fav" |
| 55 | text tsaunfv "unfav" |
| 56 | text tsawat "watch" |
| 57 | text tsaunwt "unwatch" |
| 58 | text tsafol "follow" |
| 59 | text tsaunfl "unfollow" |
| 60 | global gsstr uchar 4194304 |
| 61 | global gsstrl ulong 1 |
| 62 | global gsso ulong 65536 |
| 63 | global gssl ulong 65536 |
| 64 | global gsns ulong 1 |
| 65 | global gssh ulong 131072 |
| 66 | global gskb uchar 512 |
| 67 | global gskbl ulong 1 |
| 68 | global gskov ulong 1 |
| 69 | global gsrk ulong 262144 |
| 70 | global gsrv uchar 262144 |
| 71 | global gscst ulong 65536 |
| 72 | global gscfv ulong 65536 |
| 73 | global gscwt ulong 65536 |
| 74 | global gscfl ulong 65536 |
| 75 | global gscfg ulong 65536 |
| 76 | global gsacc uchar 65536 |
| 77 | global gsnm ulong 65536 |
| 78 | global gsnmo ulong 65536 |
| 79 | global gssd ulong 65536 |
| 80 | global gsse ulong 65536 |
| 81 | global gsnu uchar 65536 |
| 82 | global gsrlm ulong 65536 |
| 83 | global gsrlc ulong 65536 |
| 84 | global gsseq ulong 1 |
| 85 | global gsprev uchar 32 |
| 86 | global gsprv2 uchar 32 |
| 87 | global gspc ulong 1 |
| 88 | global gsbad ulong 1 |
| 89 | global gsrb uchar 65536 |
| 90 | global gsln uchar 1024 |
| 91 | global gslnl ulong 1 |
| 92 | global gsown ulong 1 |
| 93 | global gshd uchar 128 |
| 94 | text tsekey "SOCIAL-LOG ERROR social.key unreadable; social disabled\n" |
| 95 | text tsehead "SOCIAL-LOG TAMPER social.head does not match the log; social disabled\n" |
| 96 | text tsetamp "SOCIAL-LOG TAMPER line " |
| 97 | text tsckses "__Host-forge_session=" |
| 98 | text tsckpre "__Host-forge_pre=" |
| 99 | text tsckatt "; HttpOnly; Secure; SameSite=Lax; Path=/" |
| 100 | text tsckage "; Max-Age=" |
| 101 | text tscsrfp "csrf:" |
| 102 | text tslogp "login:" |
| 103 | text tschal "interplane-forge-login:" |
| 104 | text tsfcsrf "csrf" |
| 105 | text tsfnon "nonce" |
| 106 | text tsfts "ts" |
| 107 | text tsfdid "did" |
| 108 | text tsfsig "sig" |
| 109 | text tsfname "name" |
| 110 | text tsfback "back" |
| 111 | text tsfuser "user" |
| 112 | text tssigb "-----BEGIN SSH SIGNATURE-----" |
| 113 | text tssige "-----END SSH SIGNATURE-----" |
| 114 | text tsrsv "|quick-start|concepts|adapter|conformance|status|forge|protocol|api|login|logout|explore|settings|new|search|stars|notifications|assets|follow|unfollow|admin|root|about|help|rad|www|interplane|radicle|owner|user|users|repos|org|orgs|feed|events|agents|" |
| 115 | global gscur ulong 1 |
| 116 | global gssid ulong 1 |
| 117 | global gsstem uchar 16 |
| 118 | global gsipk ulong 4096 |
| 119 | global gsipm ulong 4096 |
| 120 | global gsipc ulong 4096 |
| 121 | global gsvm ulong 1 |
| 122 | global gsvc ulong 1 |
| 123 | global gsrnh ulong 16384 |
| 124 | global gsrnt ulong 16384 |
| 125 | global gsrni ulong 1 |
| 126 | text tsplogin "/login" |
| 127 | text tsplogo "/logout" |
| 128 | text tspset "/settings" |
| 129 | text tspsetn "/settings/name" |
| 130 | text tspstars "/stars" |
| 131 | text tspfol "/follow" |
| 132 | text tspunf "/unfollow" |
| 133 | text tsrstar "/star" |
| 134 | text tsrunst "/unstar" |
| 135 | text tsrfav "/fav" |
| 136 | text tsrunfv "/unfav" |
| 137 | text tsrwat "/watch" |
| 138 | text tsrunwt "/unwatch" |
| 139 | text tsrsg "/stargazers" |
| 140 | text tsrwr "/watchers" |
| 141 | text tspset2 "settings" |
| 142 | text tsplog2 "login" |
| 143 | text tspstr2 "stars" |
| 144 | text tsqtab "tab" |
| 145 | text tsqfav "favorites" |
| 146 | text tsqwat "watching" |
| 147 | text tsqfls "followers" |
| 148 | text tsqflg "following" |
| 149 | text tsqstar "stars" |
| 150 | text tsttl "Sign in" |
| 151 | text tstset "Settings" |
| 152 | text tststar "Your stars" |
| 153 | text tstsg "Stargazers" |
| 154 | text tstwr "Watchers" |
| 155 | text tsterr "Error" |
| 156 | text tsmoff "Social features are switched off on this forge right now." |
| 157 | text tsmrand "The server could not read randomness. Try again." |
| 158 | text tsmrate "Too many requests. Wait a minute and try again." |
| 159 | text tsmform "This sign-in form expired or was not issued to this browser. Open the sign-in page again." |
| 160 | text tsmexp "This sign-in challenge expired. Open the sign-in page again." |
| 161 | text tsmused "This challenge was already used. Open the sign-in page again." |
| 162 | text tsmdid "That is not an ed25519 did:key DID (did:key:z6Mk...)." |
| 163 | text tsmsig "The signature did not verify for that DID and challenge. A challenge allows one attempt: open the sign-in page again." |
| 164 | text tsmfull "The social store is full." |
| 165 | text tsmwrite "The social log could not be written." |
| 166 | text tsmcsrf "Missing or wrong form token. Reload the page and try again." |
| 167 | text tsmownn "The owner's name is fixed." |
| 168 | text tsmname "Names use lowercase letters, digits and inner hyphens, 1 to 39 characters." |
| 169 | text tsmrsv "That name is reserved." |
| 170 | text tstaken "That name is taken." |
| 171 | text tsmnous "No such user." |
| 172 | text tsmself "You cannot follow yourself." |
| 173 | text tshe1 "<div class=\"so-err\"><p>" |
| 174 | text tshe2 "</p></div>\n" |
| 175 | text tshf1 "<form class=\"so-f\" method=\"post\" action=\"" |
| 176 | text tshf2 "\"><input type=\"hidden\" name=\"csrf\" value=\"" |
| 177 | text tshf3 "\"><input type=\"hidden\" name=\"back\" value=\"" |
| 178 | text tshf4 "\"><button class=\"so-btn\" type=\"submit\">" |
| 179 | text tshf5 "</button></form>\n" |
| 180 | text tshfu "\"><input type=\"hidden\" name=\"user\" value=\"" |
| 181 | text tsha1 "<a class=\"so-n\" href=\"" |
| 182 | text tsha2 "\">" |
| 183 | text tsha3 "</a>\n" |
| 184 | text tshbar1 "<div class=\"so-bar\">\n" |
| 185 | text tshbar2 "</div>\n" |
| 186 | text tsbstar "Star" |
| 187 | text tsbunst "Unstar" |
| 188 | text tsbfav "Favorite" |
| 189 | text tsbunfv "Unfavorite" |
| 190 | text tsbwat "Watch" |
| 191 | text tsbunwt "Unwatch" |
| 192 | text tsbfol "Follow" |
| 193 | text tsbunfl "Unfollow" |
| 194 | text tswstar " stars" |
| 195 | text tswwat " watching" |
| 196 | text tswfls " followers" |
| 197 | text tswflg " following" |
| 198 | text tssinst "Sign in to star" |
| 199 | text tssinfl "Sign in to follow" |
| 200 | text tsul1 "<ul class=\"so-list\">\n" |
| 201 | text tsul2 "</ul>\n" |
| 202 | text tsli1 "<li>" |
| 203 | text tsli2 "</li>\n" |
| 204 | text tsnone "<p class=\"so-muted\">Nothing here yet.</p>\n" |
| 205 | text tscode1 "<code>" |
| 206 | text tscode2 "</code>" |
| 207 | text tsell "..." |
| 208 | text tsslash "/" |
| 209 | text tsh1a "<h1>" |
| 210 | text tsh1b "</h1>\n" |
| 211 | text tsrepo1 "<a href=\"" |
| 212 | text tssp " " |
| 213 | text tsmut1 " <span class=\"so-muted\">" |
| 214 | text tsmut2 "</span>" |
| 215 | text tstab1 "<nav class=\"so-tabs\">\n" |
| 216 | text tstab2 "</nav>\n" |
| 217 | text tstabon "<a class=\"so-on\" href=\"" |
| 218 | text tsqtabe "?tab=" |
| 219 | text tslstar "Starred" |
| 220 | text tslfav "Favorites" |
| 221 | text tslwat "Watching" |
| 222 | text tslfls "Followers" |
| 223 | text tslflg "Following" |
| 224 | text tsfavp "<p class=\"so-muted\">Favorites are private: only you can see this list.</p>\n" |
| 225 | text tslg1 "<h1>Sign in</h1>\n<p>There is no password and nothing to remember. One command in your terminal does it: the first time it makes your key (it stays on your computer), every time it gives you one block of text to paste here.</p>\n<ol class=\"so-steps\">\n<li>Copy this command into your terminal and press Enter (good for 15 minutes):<pre class=\"so-cmd\">curl -fsSL https://interplane.io/signin.sh | sh -s -- " |
| 226 | text tslg2 "</pre></li>\n<li>It copies one block of text for you. Paste it into the box and press Sign in.</li>\n</ol>\n<form class=\"so-form\" method=\"post\" action=\"" |
| 227 | text tslg3 "\">\n<input type=\"hidden\" name=\"csrf\" value=\"" |
| 228 | text tslg4 "\">\n<input type=\"hidden\" name=\"nonce\" value=\"" |
| 229 | text tslg5 "\">\n<input type=\"hidden\" name=\"ts\" value=\"" |
| 230 | text tslg6 "\">\n<label for=\"so-sig\">Paste here</label>\n<textarea id=\"so-sig\" name=\"sig\" rows=\"8\" cols=\"72\" maxlength=\"4000\" required spellcheck=\"false\"></textarea>\n<button class=\"so-btn\" type=\"submit\">Sign in</button>\n</form>\n<p class=\"so-muted\">Sign-in by email link is designed but switched off on this forge.</p>\n" |
| 231 | text tsin1 "<p>You are signed in as <b>" |
| 232 | text tsin2 "</b>.</p>\n" |
| 233 | text tsin3 "Settings" |
| 234 | text tsst1 "<h1>Settings</h1>\n<h2>Account</h2>\n<p>DID: <code>" |
| 235 | text tsst2 "</code></p>\n<p>Display name: <b>" |
| 236 | text tsst2n "</code></p>\n<p>Display name: <span class=\"so-muted\">not set</span>" |
| 237 | text tsst3 "</b>" |
| 238 | text tsst4 "</p>\n" |
| 239 | text tsst5 "<form class=\"so-form\" method=\"post\" action=\"" |
| 240 | text tsst6 "\"><input type=\"hidden\" name=\"csrf\" value=\"" |
| 241 | text tsst7 "\">\n<label for=\"so-name\">New display name</label>\n<input id=\"so-name\" name=\"name\" type=\"text\" maxlength=\"39\" required autocomplete=\"off\" spellcheck=\"false\">\n<button class=\"so-btn\" type=\"submit\">Save name</button>\n</form>\n<p class=\"so-muted\">Lowercase letters, digits and inner hyphens, up to 39 characters. Your public profile shows this name and links your DID.</p>\n<h2>Email sign-in</h2>\n<p class=\"so-muted\">Switched off. Sign-in links by email are designed but not enabled on this forge.</p>\n<h2>Session</h2>\n" |
| 242 | text tsbout "Sign out" |
| 243 | text tsdid1 "<p>DID: <code>" |
| 244 | text tsdid2 "</code></p>\n" |
| 245 | text tsbk "back" |
| 246 | text tspfol2 "follow" |
| 247 | text tspunf2 "unfollow" |
| 248 | text tspsn2 "settings/name" |
| 249 | text tsplo2 "logout" |
| 250 | text tsst8 "<h2>Email sign-in</h2>\n<p class=\"so-muted\">Switched off. Sign-in links by email are designed but not enabled on this forge.</p>\n<h2>Session</h2>\n" |
| 251 | text tsh2a "<h2>" |
| 252 | text tspfls "/followers" |
| 253 | text tspflg "/following" |
| 254 | text tsh2b "</h2>\n" |
| 255 | note ---- JSON form of the public social pages (60json.om, docs/API.md) |
| 256 | text tsjsg "forge/stargazers/1" |
| 257 | text tsjwr "forge/watchers/1" |
| 258 | text tsjuser "forge/user/1" |
| 259 | text tsjstar "forge/stars/1" |
| 260 | text tsjh1 "{\"schema\":\"" |
| 261 | text tsjh2 "\",\"base\":\"" |
| 262 | text tsjh3 "\",\"user\":" |
| 263 | text tsjr1 "{\"name\":" |
| 264 | text tsjr2 ",\"rid\":\"" |
| 265 | text tsjr3 "\",\"path\":\"" |
| 266 | text tsjr4 "\",\"stars\":" |
| 267 | text tsjname "name" |
| 268 | text tsjpath "path" |
| 269 | text tsjcnt "count" |
| 270 | text tsjusrs "users" |
| 271 | text tsjdid "did" |
| 272 | text tsjrepos "repos" |
| 273 | text tsjsrcv "stars_received" |
| 274 | text tsjfrcv "favorites_received" |
| 275 | text tsjstrd "starred" |