on main help sign in
update base-dev and bump kelvin
commit86f020d4c92a132b85a0f965e1850fee00723286 authorJohn Hyde <johnhydefour@gmail.com> dateMon 8 May 2023, 13:53 (3 years ago) parent7aa7661
15 files changed+296−166
base-desk/lib/jose.hoon+11−3 base-desk/lib/server.hoon+1−1 base-desk/lib/sss.hoon+22−8 base-desk/lib/strandio.hoon+58−8 base-desk/mar/httr.hoon+1−2 base-desk/mar/json.hoon+4−4 base-desk/mar/json/rpc/response.hoon+1−2 base-desk/sur/aquarium.hoon+1 base-desk/sur/hood.hoon+182−133 desk/app/astrolabe.hoon+8 desk/desk.docket-0+1−1 desk/lib/astrolabe.hoon+3−1 desk/sys.kelvin+1−1 ui/package-lock.json+1−1 ui/vite.config.ts+1−1
base-desk/lib/jose.hoon+11−3
@@ -33,7 +33,6 @@
3333 |^ |=([sor=$-(^ ?) val=json] (apex val sor ""))
3434 :: :: ++apex:en-json:html
3535 ++ apex
36− =, en-json:html
3736 |= [val=json sor=$-(^ ?) rez=tape]
3837 ^- tape
3938 ?~ val (weld "null" rez)
@@ -46,7 +45,7 @@
4645 |-
4746 ?~ t.p.val ^$(val i.p.val)
4847 ^$(val i.p.val, rez [',' $(p.val t.p.val)])
49− ::
48+ ::
5049 %b (weld ?:(p.val "true" "false") rez)
5150 %n (weld (trip p.val) rez)
5251 %s
@@ -60,7 +59,7 @@
6059 ?: ?=([@ ~] hed)
6160 [i.hed $(viz t.viz)]
6261 (weld hed $(viz t.viz))
63− ::
62+ ::
6463 %o
6564 :- '{'
6665 =. rez ['}' rez]
@@ -74,6 +73,15 @@
7473 =. rez [',' $(viz t.viz)]
7574 ^$(val [%s p.i.viz], rez [':' ^$(val q.i.viz)])
7675 ==
76+ ::
77+ ++ jesc
78+ =+ utf=|=(a=@ ['\\' 'u' ((x-co 4):co a)])
79+ |= a=@ ^- tape
80+ ?+ a ?:(&((gth a 0x1f) !=(a 0x7f)) [a ~] (utf a))
81+ %10 "\\n"
82+ %34 "\\\""
83+ %92 "\\\\"
84+ ==
7785 --
7886:: %/lib/jose
7987::
base-desk/lib/server.hoon+1−1
@@ -114,7 +114,7 @@
114114 :_ `octs
115115 [200 [['content-type' 'image/svg+xml'] ?:(cache [max-1-wk ~] ~)]]
116116 ::
117− ++ ico-response
117+ ++ ico-response
118118 |= =octs
119119 ^- simple-payload:http
120120 [[200 [['content-type' 'image/x-icon'] max-1-wk ~]] `octs]
base-desk/lib/sss.hoon+22−8
@@ -227,7 +227,10 @@
227227 ^- (quip card:agent:gall pubs)
228228 ?~ ((soft ^path) path) ~| %need-path !!
229229 =/ buoy (~(gut by pub) path *buoy)
230− ?@ tide=tid.buoy ~| %dead-path !! ::TODO is this good behavior?
230+ =? buoy ?=(@ tid.buoy)
231+ %*(. buoy(tid *tide) rok.tid (put:rok ~ +(tid.buoy) *rock:lake))
232+ ?> ?=(^ tid.buoy)
233+ =* tide tid.buoy
231234 =/ next=aeon +((latest tide))
232235 :- %+ murn ~(tap bi mem.tide)
233236 |= [=ship =dude =@da]
@@ -237,10 +240,27 @@
237240 %+ ~(put by pub) path
238241 =/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
239242 =. wav.tide (put:wav wav.tide next wave)
240− =. mem.tide (~(del by mem.tide) next)
243+ =. mem.tide ~
241244 ?. =(next (add aeon.last waves.rul.tide)) buoy
242245 buoy(tid (form tide))
243246 ::
247+ ++ fork :: Fork a pub into an empty path.
248+ |= [from=paths to=paths]
249+ ^- pubs
250+ :- %0
251+ ?< (~(has by pub) to)
252+ (~(put by pub) to (~(got by pub) from))
253+ ::
254+ ++ copy :: Fork a sub into an empty path.
255+ |= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
256+ ^- pubs
257+ :- %0
258+ ?< (~(has by pub) to)
259+ %+ ~(put by pub) to
260+ %* . *$<(aeon buoy)
261+ rok.tid (put:rok ~ [aeon rock]:(need (~(got by +:sub) from)))
262+ ==
263+ ::
244264 ++ perm :: Change permissions with gate.
245265 |= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
246266 ^- pubs
@@ -274,12 +294,6 @@
274294 ++ kill :: subs to not expect updates.
275295 (curr edit |=(=buoy buoy(tid (latest tid.buoy))))
276296 :: :: Reopen list of killed paths.
277− ++ live :: No-ops on live paths.
278− %+ curr edit
279− |= =buoy
280− ?^ tid.buoy buoy
281− %*(. buoy(tid *tide) rok.tid (put:rok ~ +(tid.buoy) *rock:lake))
282− ::
283297 ++ read :: See current published states.
284298 ^- (map paths [allowed=(unit (set ship)) =rock:lake])
285299 %- malt %+ murn ~(tap by pub)
base-desk/lib/strandio.hoon+58−8
@@ -73,21 +73,23 @@
7373 ^- form:m
7474 |= tin=strand-input:strand
7575 ?+ in.tin `[%skip ~]
76− ~ `[%wait ~]
76+ ~
77+ `[%wait ~]
78+ ::
7779 [~ %poke @ *]
7880 ?. =(mark p.cage.u.in.tin)
7981 `[%skip ~]
8082 `[%done q.cage.u.in.tin]
8183 ==
8284::
83−::
84−::
8585++ take-sign-arvo
8686 =/ m (strand ,[wire sign-arvo])
8787 ^- form:m
8888 |= tin=strand-input:strand
8989 ?+ in.tin `[%skip ~]
90− ~ `[%wait ~]
90+ ~
91+ `[%wait ~]
92+ ::
9193 [~ %sign *]
9294 `[%done [wire sign-arvo]:u.in.tin]
9395 ==
@@ -181,6 +183,20 @@
181183 `[%fail %timer-error u.error.sign-arvo.u.in.tin]
182184 ==
183185::
186+++ take-tune
187+ |= =wire
188+ =/ m (strand ,[spar:ames (unit roar:ames)])
189+ ^- form:m
190+ |= tin=strand-input:strand
191+ ?+ in.tin `[%skip ~]
192+ ~ `[%wait ~]
193+ ::
194+ [~ %sign * %ames %tune ^ *]
195+ ?. =(wire wire.u.in.tin)
196+ `[%skip ~]
197+ `[%done +>.sign-arvo.u.in.tin]
198+ ==
199+::
184200++ take-poke-ack
185201 |= =wire
186202 =/ m (strand ,~)
@@ -315,6 +331,12 @@
315331 ;< ~ bind:m (send-wait until)
316332 (take-wake `until)
317333::
334+++ keen
335+ |= [=wire =spar:ames]
336+ =/ m (strand ,~)
337+ ^- form:m
338+ (send-raw-card %pass wire %arvo %a %keen spar)
339+::
318340++ sleep
319341 |= for=@dr
320342 =/ m (strand ,~)
@@ -433,7 +455,6 @@
433455 %- pure:m
434456 ?~ full-file.client-response ''
435457 q.data.u.full-file.client-response
436−
437458::
438459++ fetch-cord
439460 |= url=tape
@@ -474,6 +495,18 @@
474495 (pure:m ~)
475496 ?> =(%vase p.r.u.riot)
476497 (pure:m (some !<(vase q.r.u.riot)))
498+::
499+++ build-file-hard
500+ |= [[=ship =desk =case] =spur]
501+ =* arg +<
502+ =/ m (strand ,vase)
503+ ^- form:m
504+ ;< =riot:clay
505+ bind:m
506+ (warp ship desk ~ %sing %a case spur)
507+ ?> ?=(^ riot)
508+ ?> ?=(%vase p.r.u.riot)
509+ (pure:m !<(vase q.r.u.riot))
477510:: +build-mark: build a mark definition to a $dais
478511::
479512++ build-mark
@@ -537,7 +570,7 @@
537570 (take-writ /warp)
538571::
539572++ read-file
540− |= [[=ship =desk =case:clay] =spur]
573+ |= [[=ship =desk =case] =spur]
541574 =* arg +<
542575 =/ m (strand ,cage)
543576 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
@@ -546,13 +579,13 @@
546579 (pure:m r.u.riot)
547580::
548581++ check-for-file
549− |= [[=ship =desk =case:clay] =spur]
582+ |= [[=ship =desk =case] =spur]
550583 =/ m (strand ,?)
551584 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
552585 (pure:m ?=(^ riot))
553586::
554587++ list-tree
555− |= [[=ship =desk =case:clay] =spur]
588+ |= [[=ship =desk =case] =spur]
556589 =* arg +<
557590 =/ m (strand ,(list path))
558591 ;< =riot:clay bind:m (warp ship desk ~ %sing %t case spur)
@@ -586,6 +619,23 @@
586619 (poke [who %hood] %helm-hi !>(~))
587620 (pure:m ~)
588621::
622+++ eval-hoon
623+ |= [gen=hoon bez=(list beam)]
624+ =/ m (strand ,vase)
625+ ^- form:m
626+ =/ sut=vase !>(..zuse)
627+ |-
628+ ?~ bez
629+ (pure:m (slap sut gen))
630+ ;< vax=vase bind:m (build-file-hard i.bez)
631+ $(bez t.bez, sut (slop vax sut))
632+::
633+++ send-thread
634+ |= [=bear:khan =shed:khan =wire]
635+ =/ m (strand ,~)
636+ ^- form:m
637+ (send-raw-card %pass wire %arvo %k %lard bear shed)
638+::
589639:: Queue on skip, try next on fail %ignore
590640::
591641++ main-loop
base-desk/mar/httr.hoon+1−2
@@ -5,12 +5,11 @@
55::
66=, eyre
77=, format
8−=, html
98|_ hit=httr
109++ grad %noun
1110++ grow |% ++ wall (turn wain trip)
1211 ++ wain (to-wain cord)
13− ++ json (need (de-json cord))
12+ ++ json (need (de:json:html cord))
1413 ++ cord q:octs
1514 ++ noun hit
1615 ++ octs
base-desk/mar/json.hoon+4−4
@@ -8,17 +8,17 @@
88=, eyre
99=, format
1010=, html
11−|_ jon=json
11+|_ jon=^json
1212::
1313++ grow :: convert to
1414 |%
1515 ++ mime [/application/json (as-octs:mimes -:txt)] :: convert to %mime
16− ++ txt [(crip (en-json jon))]~
16+ ++ txt [(en:json jon)]~
1717 --
1818++ grab
1919 |% :: convert from
20− ++ mime |=([p=mite q=octs] (fall (rush (@t q.q) apex:de-json) *json))
21− ++ noun json :: clam from %noun
20+ ++ mime |=([p=mite q=octs] (fall (de:json (@t q.q)) *^json))
21+ ++ noun ^json :: clam from %noun
2222 ++ numb numb:enjs
2323 ++ time time:enjs
2424 --
base-desk/mar/json/rpc/response.hoon+1−2
@@ -16,11 +16,10 @@
1616 ^- response
1717 ~| hit
1818 ?: ?=(%2 (div p.hit 100))
19− =, html
2019 %- json
2120 ?~ r.hit
2221 a+~
23− (need (de-json q:u.r.hit))
22+ (need (de:json:html q:u.r.hit))
2423 fail+hit
2524 ++ json :: from json
2625 =, dejs-soft:format
base-desk/sur/aquarium.hoon+1
@@ -41,6 +41,7 @@
4141 [%pause-events who=ship]
4242 [%snap-ships lab=term hers=(list ship)]
4343 [%restore-snap lab=term]
44+ [%read [from=ship =path] [for=lane:ames num=@ud]]
4445 [%event who=ship ue=unix-event]
4546 ==
4647::
base-desk/sur/hood.hoon+182−133
@@ -1,3 +1,4 @@
1+/% kelvin %kelvin
12=, clay
23=* dude dude:gall
34|%
@@ -16,144 +17,192 @@
1617::
1718+$ sync-state [nun=@ta kid=(unit desk) let=@ud]
1819+$ sink (unit [her=@p sud=desk kid=(unit desk) let=@ud])
20+:: +truncate-hash: get last 5 digits of hash and convert to tape
21+::
22+++ truncate-hash
23+ |= hash=@uv
24+ ^- tape
25+ (slag 2 <`@uv`(mod hash 0v1.00000)>)
26+:: +report-prep: get data required for reports
27+::
28+++ report-prep
29+ |= [our=@p now=@da]
30+ =/ ego (scot %p our)
31+ =/ wen (scot %da now)
32+ :* .^(rock:tire %cx /[ego]//[wen]/tire)
33+ .^(=cone %cx /[ego]//[wen]/domes)
34+ .^((map desk [ship desk]) %gx /[ego]/hood/[wen]/kiln/sources/noun)
35+ .^ (map [desk ship desk] sync-state) %gx
36+ /[ego]/hood/[wen]/kiln/syncs/noun
37+ ==
38+ ==
39+:: +report-vats: report on all desk installations
40+::
1941++ report-vats
20− =| $: =cone
21− sor=(map desk [ship desk])
22− zyn=(map [desk ship desk] sync-state)
23− desks=(set desk)
24− =pikes
25− =rock:tire:clay
26− kel=weft
42+ |= [our=@p now=@da desks=(list desk) filt=@tas verb=?]
43+ ^- tang
44+ =/ ego (scot %p our)
45+ =/ wen (scot %da now)
46+ =/ prep (report-prep our now)
47+ ?~ filt
48+ %- zing
49+ %+ turn (flop desks)
50+ |=(syd=@tas (report-vat prep our now syd verb))
51+ =/ deks
52+ ?~ desks
53+ %+ sort
54+ (sort ~(tap in -.prep) |=([[a=@ *] b=@ *] !(aor a b)))
55+ |=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base)))
56+ %+ skip ~(tap in -.prep)
57+ |=([syd=@tas *] =(~ (find ~[syd] desks)))
58+ ?: =(filt %blocking)
59+ =/ base-wic
60+ %+ sort ~(tap by wic:(~(got by -.prep) %base))
61+ |=([[* a=@ud] [* b=@ud]] (gth a b))
62+ ?~ base-wic ~[leaf+"%base already up-to-date"]
63+ =/ blockers=(list desk)
64+ %+ turn
65+ %+ skip ~(tap in -.prep)
66+ |= [* [zest=@tas wic=(set weft)]]
67+ ?. =(zest %live) &
68+ (~(has in wic) i.base-wic)
69+ |=([syd=desk *] syd)
70+ ?~ blockers ~[leaf+"No desks blocking upgrade, run |bump to apply"]
71+ :- [%rose [" %" "To unblock upgrade run |suspend %" ""] blockers]
72+ %- zing
73+ %+ turn (flop blockers)
74+ |=(syd=desk (report-vat prep our now syd verb))
75+ ::
76+ %- zing
77+ %+ turn
78+ ?+ filt !!
79+ ::
80+ %exists
81+ %+ skip deks
82+ |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
83+ ::
84+ %running
85+ %+ skim deks
86+ |=([* [zest=@tas *]] =(zest %live))
87+ ::
88+ %suspended
89+ %+ skip deks
90+ |= [syd=@tas [zest=@tas *]]
91+ ?| =(syd %kids)
92+ =(zest %live)
93+ =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)
2794 ==
28− |_ [our=@p now=@da]
29− +* ego (scot %p our)
30− wen (scot %da now)
31− ++ $
32− |= [? ? ? ? ?]
33− (report-vats:abed +<)
34− ++ abed
35− %= ..abed
36− cone .^(^cone %cx /[ego]//[wen]/domes)
37− sor .^((map desk [ship desk]) %gx /[ego]/hood/[wen]/kiln/sources/noun)
38− zyn .^ (map [desk ship desk] sync-state) %gx
39− /[ego]/hood/[wen]/kiln/syncs/noun
40− ==
41− desks .^((set desk) %cd /[ego]/base/[wen])
42− pikes .^(^pikes %gx /[ego]/hood/[wen]/kiln/pikes/kiln-pikes)
43− rock .^(rock:tire:clay %cx /[ego]//[wen]/tire)
44− kel (weft .^(* cx/(en-beam [our %base da+now] /sys/kelvin)))
95+ ::
96+ %exists-not
97+ %+ skim deks
98+ |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
4599 ==
46− ++ vat-info
47− |= desk=_`desk`%base
48− =/ pike (~(got by pikes) desk)
49− =/ zest -:(~(got by rock) desk)
50− =/ kel-path /[ego]/[desk]/[wen]/sys/kelvin
51− =/ sink=sink
52− ?~ s=(~(get by sor) desk)
53− ~
54− ?~ z=(~(get by zyn) desk u.s)
55− ~
56− `[-.u.s +.u.s +.u.z]
57− =/ hash .^(@uv %cz /[ego]/[desk]/[wen])
58− =/ dek (~(got by rock) desk)
59− =/ =dome (~(got by cone) our desk)
60− =+ .^(=waft %cx kel-path)
61− :* &1 &2 &3 &4 &5 &6 &7 &8
62− desk=desk
63− ^= running =(%live zest)
64− ^= suspended =(%dead zest)
65− ^= exists !=(ud.cass 0):.^(=cass %cw /[ego]/[desk]/[wen])
66− ^= bad-desk ?!(.^(? %cu kel-path))
67− ^= meb :: =(list @uv)
68− ?~ sink [hash]~
69− (mergebase-hashes our desk now her.u.sink sud.u.sink)
70− ^- [on=(list [@tas ?]) of=(list [@tas ?])]
71− (skid ~(tap by ren.dome) |=([* ?] +<+))
72− ^= sat
73− ?- zest.dek
74− %live "running"
75− %dead "suspended"
76− %held "suspended until next update"
100+ |=([syd=desk *] (report-vat prep our now syd verb))
101+:: +report-vat: report on a single desk installation
102+::
103+++ report-vat
104+ |= $: $: tyr=rock:tire =cone sor=(map desk [ship desk])
105+ zyn=(map [desk ship desk] sync-state)
77106 ==
78− ^- kul=tape
79− %+ roll
80− %+ sort
81− ~(tap in (waft-to-wefts:clay waft))
82− |= [a=weft b=weft]
83− ?: =(lal.a lal.b)
84− (lte num.a num.b)
85− (lte lal.a lal.b)
86− |= [=weft =tape]
87− (welp " {<[lal num]:weft>}" tape)
88− ^= blocking
89− ?& !=(%base desk)
90− !=(%live zest.pike)
91− !(~(has in wic.pike) kel)
92− == ==
93− ++ report-vats
94− |= $: verb=?
95− show-suspended=?
96− show-running=?
97− show-blocking=?
98− show-nonexistent=?
99− ==
100− %+ turn
101− %+ skim
102− %+ turn ~(tap in desks)
103− |= =desk (vat-info desk)
104− |= vat-info
105− :: just unconditionally show "bad" desks, whatever that means
106− ?| bad-desk
107− &(suspended show-suspended)
108− &(running show-running)
109− &(blocking show-blocking)
110− &(!exists show-nonexistent)
107+ our=ship now=@da syd=desk verb=?
111108 ==
112− |= =vat-info
113− :+ %rose [" " " " "::"]
114− :- leaf+"{<desk.vat-info>}"
115− %- flop
116− %- report-vat
117− [verb vat-info]
118− ++ report-vat
119− |= [verb=? vat-info]
120− ^- tang
121− ?: !exists
122− ~[leaf+"desk does not yet exist: {<desk>}"]
123− ?: =(%kids desk)
124− ~[leaf+"%kids %cz hash: {<hash>}"]
125− ?: bad-desk
126− ~[leaf+"bad desk: {<desk>}"]
127− %- flop
128− ?. verb
129− :~ leaf/"/sys/kelvin: {kul}"
130− leaf/"app status: {sat}"
131− leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
132− leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
133− ==
134− :~ leaf/"/sys/kelvin: {kul}"
135− leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
136− leaf/"%cz hash: {<hash>}"
137− ::
138− leaf/"app status: {sat}"
139− leaf/"force on: {?:(=(~ on) "~" <on>)}"
140− leaf/"force off: {?:(=(~ of) "~" <of>)}"
141− ::
142− leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
143− leaf/"updates: {?~(sink "local" "remote")}"
144− leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
145− leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
146− leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
147− leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
148− leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
109+ ^- tang
110+ =- :: hack to force wrapped rendering
111+ ::
112+ :: edg=6 empirically prevents dedent
113+ ::
114+ %+ roll
115+ (~(win re -) [0 6])
116+ |=([a=tape b=(list @t)] [(crip a) b])
117+ ::
118+ ^- tank
119+ =/ ego (scot %p our)
120+ =/ wen (scot %da now)
121+ =+ .^(=cass %cw /[ego]/[syd]/[wen])
122+ ?: =(ud.cass 0)
123+ leaf+"desk does not yet exist: {<syd>}"
124+ ?: =(%kids syd)
125+ =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
126+ leaf+"%kids %cz hash: {<hash>}"
127+ =/ kel-path
128+ /[ego]/[syd]/[wen]/sys/kelvin
129+ ?. .^(? %cu kel-path)
130+ leaf+"bad desk: {<syd>}"
131+ =+ .^(=waft %cx kel-path)
132+ :+ %rose ["" "{<syd>}" "::"]
133+ ^- tang
134+ =/ hash .^(@uv %cz /[ego]/[syd]/[wen])
135+ =/ =sink
136+ ?~ s=(~(get by sor) syd)
137+ ~
138+ ?~ z=(~(get by zyn) syd u.s)
139+ ~
140+ `[-.u.s +.u.s +.u.z]
141+ =/ meb=(list @uv)
142+ ?~ sink [hash]~
143+ (mergebase-hashes our syd now her.u.sink sud.u.sink)
144+ =/ dek (~(got by tyr) syd)
145+ =/ sat
146+ ?- zest.dek
147+ %live "running"
148+ %dead "suspended"
149+ %held "suspended until next update"
149150 ==
150− ++ report-kids
151− ^- tank
152− ?. (~(has in .^((set desk) %cd /[ego]//[wen])) %kids)
153− leaf/"no %kids desk"
154− =+ .^(hash=@uv %cz /[ego]/kids/[wen])
155− leaf/"%kids %cz hash: {<hash>}"
156− --
151+ =/ kul=tape
152+ %+ roll
153+ %+ sort
154+ ~(tap in (waft-to-wefts:clay waft))
155+ |= [a=weft b=weft]
156+ ?: =(lal.a lal.b)
157+ (lte num.a num.b)
158+ (lte lal.a lal.b)
159+ |= [=weft =tape]
160+ (welp " {<[lal num]:weft>}" tape)
161+ ?. verb
162+ =/ cut=(list tape) (turn meb truncate-hash)
163+ =/ len (lent cut)
164+ =/ base-hash
165+ ?: =(0 len) "~"
166+ ?: =(1 len) (head cut)
167+ "~[{`tape`(zing (join " " `(list tape)`cut))}]"
168+ :~ leaf/"/sys/kelvin: {kul}"
169+ leaf/"base hash ends in: {base-hash}"
170+ leaf/"%cz hash ends in: {(truncate-hash hash)}"
171+ leaf/"app status: {sat}"
172+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
173+ ==
174+ ::
175+ =/ [on=(list [@tas ?]) of=(list [@tas ?])]
176+ =/ =dome (~(got by cone) our syd)
177+ (skid ~(tap by ren.dome) |=([* ?] +<+))
178+ :~ leaf/"/sys/kelvin: {kul}"
179+ leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
180+ leaf/"%cz hash: {<hash>}"
181+ ::
182+ leaf/"app status: {sat}"
183+ leaf/"force on: {<(sort (turn on head) aor)>}"
184+ leaf/"force off: {<(sort (turn of head) aor)>}"
185+ ::
186+ leaf/"publishing ship: {?~(sink <~> <(get-publisher our syd now)>)}"
187+ leaf/"updates: {?~(sink "local" "remote")}"
188+ leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
189+ leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
190+ leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
191+ leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
192+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
193+ ==
194+:: +report-kids: non-vat cz hash report for kids desk
195+::
196+++ report-kids
197+ |= [our=ship now=@da]
198+ ^- tank
199+ =/ syd %kids
200+ =/ ego (scot %p our)
201+ =/ wen (scot %da now)
202+ ?. (~(has in .^((set desk) %cd /[ego]//[wen])) syd)
203+ leaf/"no %kids desk"
204+ =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
205+ leaf/"%kids %cz hash: {<hash>}"
157206:: +read-bill-foreign: read /desk/bill from a foreign desk
158207::
159208++ read-bill-foreign
@@ -206,7 +255,7 @@
206255 |= [our=ship =desk now=@da]
207256 ^- (list [=dude live=?])
208257 %~ tap in
209− .^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
258+ .^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now)/$)
210259::
211260++ mergebase-hashes
212261 |= [our=@p syd=desk now=@da her=ship sud=desk]
desk/app/astrolabe.hoon+8
@@ -20,6 +20,7 @@
2020 :_ this
2121 :~ ug-handler-card:hc
2222 groups-link-patch-card:hc
23+ talk-link-patch-card:hc
2324 az-events-card:hc
2425 ==
2526::
@@ -35,6 +36,7 @@
3536 =/ cards=(list card)
3637 :~ ug-handler-card:hc
3738 groups-link-patch-card:hc
39+ talk-link-patch-card:hc
3840 ==
3941 =. cards (weld cards-01 cards)
4042 [cards this(state new)]
@@ -322,6 +324,12 @@
322324 =/ patch [/apps/groups catch hatch groups-link-thatch]
323325 =/ patch-kit-vase !>([/groups/astrolabe/link patch])
324326 [%pass /monkey/patch/groups/link %agent [our.bowl %monkey] %poke [%patch patch-kit-vase]]
327+++ talk-link-patch-card
328+ =/ catch [%cord '/apps/talk/desk.js']
329+ =/ hatch [%before "."]
330+ =/ patch [/apps/talk catch hatch groups-link-thatch]
331+ =/ patch-kit-vase !>([/talk/astrolabe/link patch])
332+ [%pass /monkey/patch/talk/link %agent [our.bowl %monkey] %poke [%patch patch-kit-vase]]
325333::
326334++ read-doc
327335 |= =path
desk/desk.docket-0+1−1
@@ -4,7 +4,7 @@
44 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
55 glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v4.88rt1.guqn5.nnatp.lca68.ej9aj.glob' 0v4.88rt1.guqn5.nnatp.lca68.ej9aj]
66 base+'astrolabe'
7− version+[1 0 5]
7+ version+[1 0 6]
88 website+'https://github.com/johnhyde/astrolabe'
99 license+'MIT'
1010==
desk/lib/astrolabe.hoon+3−1
@@ -217,10 +217,12 @@ setInterval(() => {
217217 let patp = cspan.innerText;
218218 let b = document.createElement('a');
219219 b.innerHTML = "View in Astrolabe";
220− b.className = 'button ml-4';
220+ b.className = 'button';
221221 b.href = 'web+urbitgraph://astrolabe/ship/' + patp;
222222 b.target = '_blank';
223223 b.style.backgroundColor = "navy";
224+ b.style.marginLeft = "1rem";
225+ b.style.color = "white";
224226 c.appendChild(b);
225227 });
226228}, 100);
desk/sys.kelvin+1−1
@@ -1 +1 @@
1−[%zuse 414]
1+[%zuse 413]
ui/package-lock.json+1−1
@@ -3156,7 +3156,7 @@
31563156 },
31573157 "@johnhyde/sigil-js": {
31583158 "version": "git+ssh://git@github.com/johnhyde/sigil-js.git#f89ce78c34b5811ea19ddea4a6964ea8360e7b4d",
3159− "from": "@johnhyde/sigil-js@git+ssh://git@github.com:johnhyde/sigil-js.git",
3159+ "from": "@johnhyde/sigil-js@github:johnhyde/sigil-js",
31603160 "requires": {
31613161 "invariant": "^2.2.4",
31623162 "svgson": "^4.0.0",
ui/vite.config.ts+1−1
@@ -7,7 +7,7 @@ import path from 'path';
77export default ({ mode }) => {
88 Object.assign(process.env, loadEnv(mode, process.cwd()));
99 const SHIP_URL = process.env.SHIP_URL || process.env.VITE_SHIP_URL || 'http://localhost:8080';
10− console.log(SHIP_URL);
10+ console.log('SHIP_URL', SHIP_URL);
1111
1212 return defineConfig({
1313 plugins: [