interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / apps / interplane-forge / social / 05decl.om

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