on main help sign in
update base-dev and bump kelvin
86f020dJohn Hyde
base-desk/lib/jose.hoon+11−3
@@ -33,7 +33,6 @@
33 |^ |=([sor=$-(^ ?) val=json] (apex val sor ""))
33 |^ |=([sor=$-(^ ?) val=json] (apex val sor ""))
34 :: :: ++apex:en-json:html
34 :: :: ++apex:en-json:html
35 ++ apex
35 ++ apex
36− =, en-json:html
37 |= [val=json sor=$-(^ ?) rez=tape]
36 |= [val=json sor=$-(^ ?) rez=tape]
38 ^- tape
37 ^- tape
39 ?~ val (weld "null" rez)
38 ?~ val (weld "null" rez)
@@ -46,7 +45,7 @@
46 |-
45 |-
47 ?~ t.p.val ^$(val i.p.val)
46 ?~ t.p.val ^$(val i.p.val)
48 ^$(val i.p.val, rez [',' $(p.val t.p.val)])
47 ^$(val i.p.val, rez [',' $(p.val t.p.val)])
49− ::
48+ ::
50 %b (weld ?:(p.val "true" "false") rez)
49 %b (weld ?:(p.val "true" "false") rez)
51 %n (weld (trip p.val) rez)
50 %n (weld (trip p.val) rez)
52 %s
51 %s
@@ -60,7 +59,7 @@
60 ?: ?=([@ ~] hed)
59 ?: ?=([@ ~] hed)
61 [i.hed $(viz t.viz)]
60 [i.hed $(viz t.viz)]
62 (weld hed $(viz t.viz))
61 (weld hed $(viz t.viz))
63− ::
62+ ::
64 %o
63 %o
65 :- '{'
64 :- '{'
66 =. rez ['}' rez]
65 =. rez ['}' rez]
@@ -74,6 +73,15 @@
74 =. rez [',' $(viz t.viz)]
73 =. rez [',' $(viz t.viz)]
75 ^$(val [%s p.i.viz], rez [':' ^$(val q.i.viz)])
74 ^$(val [%s p.i.viz], rez [':' ^$(val q.i.viz)])
76 ==
75 ==
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+ ==
77 --
85 --
78:: %/lib/jose
86:: %/lib/jose
79::
87::
base-desk/lib/server.hoon+1−1
@@ -114,7 +114,7 @@
114 :_ `octs
114 :_ `octs
115 [200 [['content-type' 'image/svg+xml'] ?:(cache [max-1-wk ~] ~)]]
115 [200 [['content-type' 'image/svg+xml'] ?:(cache [max-1-wk ~] ~)]]
116 ::
116 ::
117− ++ ico-response
117+ ++ ico-response
118 |= =octs
118 |= =octs
119 ^- simple-payload:http
119 ^- simple-payload:http
120 [[200 [['content-type' 'image/x-icon'] max-1-wk ~]] `octs]
120 [[200 [['content-type' 'image/x-icon'] max-1-wk ~]] `octs]
base-desk/lib/sss.hoon+22−8
@@ -227,7 +227,10 @@
227 ^- (quip card:agent:gall pubs)
227 ^- (quip card:agent:gall pubs)
228 ?~ ((soft ^path) path) ~| %need-path !!
228 ?~ ((soft ^path) path) ~| %need-path !!
229 =/ buoy (~(gut by pub) path *buoy)
229 =/ 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
231 =/ next=aeon +((latest tide))
234 =/ next=aeon +((latest tide))
232 :- %+ murn ~(tap bi mem.tide)
235 :- %+ murn ~(tap bi mem.tide)
233 |= [=ship =dude =@da]
236 |= [=ship =dude =@da]
@@ -237,10 +240,27 @@
237 %+ ~(put by pub) path
240 %+ ~(put by pub) path
238 =/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
241 =/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
239 =. wav.tide (put:wav wav.tide next wave)
242 =. wav.tide (put:wav wav.tide next wave)
240− =. mem.tide (~(del by mem.tide) next)
243+ =. mem.tide ~
241 ?. =(next (add aeon.last waves.rul.tide)) buoy
244 ?. =(next (add aeon.last waves.rul.tide)) buoy
242 buoy(tid (form tide))
245 buoy(tid (form tide))
243 ::
246 ::
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+ ::
244 ++ perm :: Change permissions with gate.
264 ++ perm :: Change permissions with gate.
245 |= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
265 |= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
246 ^- pubs
266 ^- pubs
@@ -274,12 +294,6 @@
274 ++ kill :: subs to not expect updates.
294 ++ kill :: subs to not expect updates.
275 (curr edit |=(=buoy buoy(tid (latest tid.buoy))))
295 (curr edit |=(=buoy buoy(tid (latest tid.buoy))))
276 :: :: Reopen list of killed paths.
296 :: :: 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− ::
283 ++ read :: See current published states.
297 ++ read :: See current published states.
284 ^- (map paths [allowed=(unit (set ship)) =rock:lake])
298 ^- (map paths [allowed=(unit (set ship)) =rock:lake])
285 %- malt %+ murn ~(tap by pub)
299 %- malt %+ murn ~(tap by pub)
base-desk/lib/strandio.hoon+58−8
@@ -73,21 +73,23 @@
73 ^- form:m
73 ^- form:m
74 |= tin=strand-input:strand
74 |= tin=strand-input:strand
75 ?+ in.tin `[%skip ~]
75 ?+ in.tin `[%skip ~]
76+ ~
76− ~ `[%wait ~]
77+ `[%wait ~]
78+ ::
77 [~ %poke @ *]
79 [~ %poke @ *]
78 ?. =(mark p.cage.u.in.tin)
80 ?. =(mark p.cage.u.in.tin)
79 `[%skip ~]
81 `[%skip ~]
80 `[%done q.cage.u.in.tin]
82 `[%done q.cage.u.in.tin]
81 ==
83 ==
82::
84::
83−::
84−::
85++ take-sign-arvo
85++ take-sign-arvo
86 =/ m (strand ,[wire sign-arvo])
86 =/ m (strand ,[wire sign-arvo])
87 ^- form:m
87 ^- form:m
88 |= tin=strand-input:strand
88 |= tin=strand-input:strand
89 ?+ in.tin `[%skip ~]
89 ?+ in.tin `[%skip ~]
90+ ~
90− ~ `[%wait ~]
91+ `[%wait ~]
92+ ::
91 [~ %sign *]
93 [~ %sign *]
92 `[%done [wire sign-arvo]:u.in.tin]
94 `[%done [wire sign-arvo]:u.in.tin]
93 ==
95 ==
@@ -181,6 +183,20 @@
181 `[%fail %timer-error u.error.sign-arvo.u.in.tin]
183 `[%fail %timer-error u.error.sign-arvo.u.in.tin]
182 ==
184 ==
183::
185::
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+::
184++ take-poke-ack
200++ take-poke-ack
185 |= =wire
201 |= =wire
186 =/ m (strand ,~)
202 =/ m (strand ,~)
@@ -315,6 +331,12 @@
315 ;< ~ bind:m (send-wait until)
331 ;< ~ bind:m (send-wait until)
316 (take-wake `until)
332 (take-wake `until)
317::
333::
334+++ keen
335+ |= [=wire =spar:ames]
336+ =/ m (strand ,~)
337+ ^- form:m
338+ (send-raw-card %pass wire %arvo %a %keen spar)
339+::
318++ sleep
340++ sleep
319 |= for=@dr
341 |= for=@dr
320 =/ m (strand ,~)
342 =/ m (strand ,~)
@@ -433,7 +455,6 @@
433 %- pure:m
455 %- pure:m
434 ?~ full-file.client-response ''
456 ?~ full-file.client-response ''
435 q.data.u.full-file.client-response
457 q.data.u.full-file.client-response
436−
437::
458::
438++ fetch-cord
459++ fetch-cord
439 |= url=tape
460 |= url=tape
@@ -474,6 +495,18 @@
474 (pure:m ~)
495 (pure:m ~)
475 ?> =(%vase p.r.u.riot)
496 ?> =(%vase p.r.u.riot)
476 (pure:m (some !<(vase q.r.u.riot)))
497 (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))
477:: +build-mark: build a mark definition to a $dais
510:: +build-mark: build a mark definition to a $dais
478::
511::
479++ build-mark
512++ build-mark
@@ -537,7 +570,7 @@
537 (take-writ /warp)
570 (take-writ /warp)
538::
571::
539++ read-file
572++ read-file
540− |= [[=ship =desk =case:clay] =spur]
573+ |= [[=ship =desk =case] =spur]
541 =* arg +<
574 =* arg +<
542 =/ m (strand ,cage)
575 =/ m (strand ,cage)
543 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
576 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
@@ -546,13 +579,13 @@
546 (pure:m r.u.riot)
579 (pure:m r.u.riot)
547::
580::
548++ check-for-file
581++ check-for-file
549− |= [[=ship =desk =case:clay] =spur]
582+ |= [[=ship =desk =case] =spur]
550 =/ m (strand ,?)
583 =/ m (strand ,?)
551 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
584 ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
552 (pure:m ?=(^ riot))
585 (pure:m ?=(^ riot))
553::
586::
554++ list-tree
587++ list-tree
555− |= [[=ship =desk =case:clay] =spur]
588+ |= [[=ship =desk =case] =spur]
556 =* arg +<
589 =* arg +<
557 =/ m (strand ,(list path))
590 =/ m (strand ,(list path))
558 ;< =riot:clay bind:m (warp ship desk ~ %sing %t case spur)
591 ;< =riot:clay bind:m (warp ship desk ~ %sing %t case spur)
@@ -586,6 +619,23 @@
586 (poke [who %hood] %helm-hi !>(~))
619 (poke [who %hood] %helm-hi !>(~))
587 (pure:m ~)
620 (pure:m ~)
588::
621::
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+::
589:: Queue on skip, try next on fail %ignore
639:: Queue on skip, try next on fail %ignore
590::
640::
591++ main-loop
641++ main-loop
base-desk/mar/httr.hoon+1−2
@@ -5,12 +5,11 @@
5::
5::
6=, eyre
6=, eyre
7=, format
7=, format
8−=, html
9|_ hit=httr
8|_ hit=httr
10++ grad %noun
9++ grad %noun
11++ grow |% ++ wall (turn wain trip)
10++ grow |% ++ wall (turn wain trip)
12 ++ wain (to-wain cord)
11 ++ wain (to-wain cord)
13− ++ json (need (de-json cord))
12+ ++ json (need (de:json:html cord))
14 ++ cord q:octs
13 ++ cord q:octs
15 ++ noun hit
14 ++ noun hit
16 ++ octs
15 ++ octs
base-desk/mar/json.hoon+4−4
@@ -8,17 +8,17 @@
8=, eyre
8=, eyre
9=, format
9=, format
10=, html
10=, html
11−|_ jon=json
11+|_ jon=^json
12::
12::
13++ grow :: convert to
13++ grow :: convert to
14 |%
14 |%
15 ++ mime [/application/json (as-octs:mimes -:txt)] :: convert to %mime
15 ++ mime [/application/json (as-octs:mimes -:txt)] :: convert to %mime
16− ++ txt [(crip (en-json jon))]~
16+ ++ txt [(en:json jon)]~
17 --
17 --
18++ grab
18++ grab
19 |% :: convert from
19 |% :: convert from
20− ++ mime |=([p=mite q=octs] (fall (rush (@t q.q) apex:de-json) *json))
20+ ++ mime |=([p=mite q=octs] (fall (de:json (@t q.q)) *^json))
21− ++ noun json :: clam from %noun
21+ ++ noun ^json :: clam from %noun
22 ++ numb numb:enjs
22 ++ numb numb:enjs
23 ++ time time:enjs
23 ++ time time:enjs
24 --
24 --
base-desk/mar/json/rpc/response.hoon+1−2
@@ -16,11 +16,10 @@
16 ^- response
16 ^- response
17 ~| hit
17 ~| hit
18 ?: ?=(%2 (div p.hit 100))
18 ?: ?=(%2 (div p.hit 100))
19− =, html
20 %- json
19 %- json
21 ?~ r.hit
20 ?~ r.hit
22 a+~
21 a+~
23− (need (de-json q:u.r.hit))
22+ (need (de:json:html q:u.r.hit))
24 fail+hit
23 fail+hit
25 ++ json :: from json
24 ++ json :: from json
26 =, dejs-soft:format
25 =, dejs-soft:format
base-desk/sur/aquarium.hoon+1
@@ -41,6 +41,7 @@
41 [%pause-events who=ship]
41 [%pause-events who=ship]
42 [%snap-ships lab=term hers=(list ship)]
42 [%snap-ships lab=term hers=(list ship)]
43 [%restore-snap lab=term]
43 [%restore-snap lab=term]
44+ [%read [from=ship =path] [for=lane:ames num=@ud]]
44 [%event who=ship ue=unix-event]
45 [%event who=ship ue=unix-event]
45 ==
46 ==
46::
47::
base-desk/sur/hood.hoon+182−133
@@ -1,3 +1,4 @@
1+/% kelvin %kelvin
1=, clay
2=, clay
2=* dude dude:gall
3=* dude dude:gall
3|%
4|%
@@ -16,144 +17,192 @@
16::
17::
17+$ sync-state [nun=@ta kid=(unit desk) let=@ud]
18+$ sync-state [nun=@ta kid=(unit desk) let=@ud]
18+$ sink (unit [her=@p sud=desk kid=(unit desk) let=@ud])
19+$ 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+::
19++ report-vats
41++ report-vats
20− =| $: =cone
42+ |= [our=@p now=@da desks=(list desk) filt=@tas verb=?]
21− sor=(map desk [ship desk])
43+ ^- tang
22− zyn=(map [desk ship desk] sync-state)
44+ =/ ego (scot %p our)
23− desks=(set desk)
45+ =/ wen (scot %da now)
24− =pikes
46+ =/ prep (report-prep our now)
25− =rock:tire:clay
47+ ?~ filt
26− kel=weft
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)
27 ==
94 ==
28− |_ [our=@p now=@da]
95+ ::
29− +* ego (scot %p our)
96+ %exists-not
30− wen (scot %da now)
97+ %+ skim deks
31− ++ $
98+ |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
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)))
45 ==
99 ==
46− ++ vat-info
100+ |=([syd=desk *] (report-vat prep our now syd verb))
47− |= desk=_`desk`%base
101+:: +report-vat: report on a single desk installation
48− =/ pike (~(got by pikes) desk)
102+::
49− =/ zest -:(~(got by rock) desk)
103+++ report-vat
50− =/ kel-path /[ego]/[desk]/[wen]/sys/kelvin
104+ |= $: $: tyr=rock:tire =cone sor=(map desk [ship desk])
51− =/ sink=sink
105+ zyn=(map [desk ship desk] sync-state)
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"
77 ==
106 ==
78− ^- kul=tape
107+ our=ship now=@da syd=desk verb=?
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)
111 ==
108 ==
112− |= =vat-info
109+ ^- tang
113− :+ %rose [" " " " "::"]
110+ =- :: hack to force wrapped rendering
114− :- leaf+"{<desk.vat-info>}"
111+ ::
115− %- flop
112+ :: edg=6 empirically prevents dedent
116− %- report-vat
113+ ::
117− [verb vat-info]
114+ %+ roll
118− ++ report-vat
115+ (~(win re -) [0 6])
119− |= [verb=? vat-info]
116+ |=([a=tape b=(list @t)] [(crip a) b])
120− ^- tang
117+ ::
121− ?: !exists
118+ ^- tank
119+ =/ ego (scot %p our)
120+ =/ wen (scot %da now)
121+ =+ .^(=cass %cw /[ego]/[syd]/[wen])
122+ ?: =(ud.cass 0)
122− ~[leaf+"desk does not yet exist: {<desk>}"]
123+ leaf+"desk does not yet exist: {<syd>}"
123− ?: =(%kids desk)
124+ ?: =(%kids syd)
125+ =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
124− ~[leaf+"%kids %cz hash: {<hash>}"]
126+ leaf+"%kids %cz hash: {<hash>}"
125− ?: bad-desk
127+ =/ kel-path
126− ~[leaf+"bad desk: {<desk>}"]
127− %- flop
128− ?. verb
129− :~ leaf/"/sys/kelvin: {kul}"
128+ /[ego]/[syd]/[wen]/sys/kelvin
130− leaf/"app status: {sat}"
129+ ?. .^(? %cu kel-path)
131− leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
130+ leaf+"bad desk: {<syd>}"
132− leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
131+ =+ .^(=waft %cx kel-path)
133− ==
132+ :+ %rose ["" "{<syd>}" "::"]
134− :~ leaf/"/sys/kelvin: {kul}"
133+ ^- tang
135− leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
134+ =/ hash .^(@uv %cz /[ego]/[syd]/[wen])
136− leaf/"%cz hash: {<hash>}"
135+ =/ =sink
137− ::
136+ ?~ s=(~(get by sor) syd)
138− leaf/"app status: {sat}"
137+ ~
139− leaf/"force on: {?:(=(~ on) "~" <on>)}"
138+ ?~ z=(~(get by zyn) syd u.s)
140− leaf/"force off: {?:(=(~ of) "~" <of>)}"
139+ ~
141− ::
140+ `[-.u.s +.u.s +.u.z]
142− leaf/"publishing ship: {?~(sink <~> <(get-publisher our desk now)>)}"
141+ =/ meb=(list @uv)
143− leaf/"updates: {?~(sink "local" "remote")}"
142+ ?~ sink [hash]~
144− leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
143+ (mergebase-hashes our syd now her.u.sink sud.u.sink)
145− leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
144+ =/ dek (~(got by tyr) syd)
146− leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
145+ =/ sat
147− leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
146+ ?- zest.dek
148− leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
147+ %live "running"
148+ %dead "suspended"
149+ %held "suspended until next update"
149 ==
150 ==
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+::
150− ++ report-kids
196+++ report-kids
197+ |= [our=ship now=@da]
151− ^- tank
198+ ^- tank
199+ =/ syd %kids
200+ =/ ego (scot %p our)
201+ =/ wen (scot %da now)
152− ?. (~(has in .^((set desk) %cd /[ego]//[wen])) %kids)
202+ ?. (~(has in .^((set desk) %cd /[ego]//[wen])) syd)
153− leaf/"no %kids desk"
203+ leaf/"no %kids desk"
154− =+ .^(hash=@uv %cz /[ego]/kids/[wen])
204+ =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
155− leaf/"%kids %cz hash: {<hash>}"
205+ leaf/"%kids %cz hash: {<hash>}"
156− --
157:: +read-bill-foreign: read /desk/bill from a foreign desk
206:: +read-bill-foreign: read /desk/bill from a foreign desk
158::
207::
159++ read-bill-foreign
208++ read-bill-foreign
@@ -206,7 +255,7 @@
206 |= [our=ship =desk now=@da]
255 |= [our=ship =desk now=@da]
207 ^- (list [=dude live=?])
256 ^- (list [=dude live=?])
208 %~ tap in
257 %~ 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)/$)
210::
259::
211++ mergebase-hashes
260++ mergebase-hashes
212 |= [our=@p syd=desk now=@da her=ship sud=desk]
261 |= [our=@p syd=desk now=@da her=ship sud=desk]
desk/app/astrolabe.hoon+8
@@ -20,6 +20,7 @@
20 :_ this
20 :_ this
21 :~ ug-handler-card:hc
21 :~ ug-handler-card:hc
22 groups-link-patch-card:hc
22 groups-link-patch-card:hc
23+ talk-link-patch-card:hc
23 az-events-card:hc
24 az-events-card:hc
24 ==
25 ==
25::
26::
@@ -35,6 +36,7 @@
35 =/ cards=(list card)
36 =/ cards=(list card)
36 :~ ug-handler-card:hc
37 :~ ug-handler-card:hc
37 groups-link-patch-card:hc
38 groups-link-patch-card:hc
39+ talk-link-patch-card:hc
38 ==
40 ==
39 =. cards (weld cards-01 cards)
41 =. cards (weld cards-01 cards)
40 [cards this(state new)]
42 [cards this(state new)]
@@ -322,6 +324,12 @@
322 =/ patch [/apps/groups catch hatch groups-link-thatch]
324 =/ patch [/apps/groups catch hatch groups-link-thatch]
323 =/ patch-kit-vase !>([/groups/astrolabe/link patch])
325 =/ patch-kit-vase !>([/groups/astrolabe/link patch])
324 [%pass /monkey/patch/groups/link %agent [our.bowl %monkey] %poke [%patch patch-kit-vase]]
326 [%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]]
325::
333::
326++ read-doc
334++ read-doc
327 |= =path
335 |= =path
desk/desk.docket-0+1−1
@@ -4,7 +4,7 @@
4 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
4 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
5 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]
5 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]
6 base+'astrolabe'
6 base+'astrolabe'
7− version+[1 0 5]
7+ version+[1 0 6]
8 website+'https://github.com/johnhyde/astrolabe'
8 website+'https://github.com/johnhyde/astrolabe'
9 license+'MIT'
9 license+'MIT'
10==
10==
desk/lib/astrolabe.hoon+3−1
@@ -217,10 +217,12 @@ setInterval(() => {
217 let patp = cspan.innerText;
217 let patp = cspan.innerText;
218 let b = document.createElement('a');
218 let b = document.createElement('a');
219 b.innerHTML = "View in Astrolabe";
219 b.innerHTML = "View in Astrolabe";
220− b.className = 'button ml-4';
220+ b.className = 'button';
221 b.href = 'web+urbitgraph://astrolabe/ship/' + patp;
221 b.href = 'web+urbitgraph://astrolabe/ship/' + patp;
222 b.target = '_blank';
222 b.target = '_blank';
223 b.style.backgroundColor = "navy";
223 b.style.backgroundColor = "navy";
224+ b.style.marginLeft = "1rem";
225+ b.style.color = "white";
224 c.appendChild(b);
226 c.appendChild(b);
225 });
227 });
226}, 100);
228}, 100);
desk/sys.kelvin+1−1
@@ -1 +1 @@
1−[%zuse 414]
1+[%zuse 413]
ui/package-lock.json+1−1
@@ -3156,7 +3156,7 @@
3156 },
3156 },
3157 "@johnhyde/sigil-js": {
3157 "@johnhyde/sigil-js": {
3158 "version": "git+ssh://git@github.com/johnhyde/sigil-js.git#f89ce78c34b5811ea19ddea4a6964ea8360e7b4d",
3158 "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",
3160 "requires": {
3160 "requires": {
3161 "invariant": "^2.2.4",
3161 "invariant": "^2.2.4",
3162 "svgson": "^4.0.0",
3162 "svgson": "^4.0.0",
ui/vite.config.ts+1−1
@@ -7,7 +7,7 @@ import path from 'path';
7export default ({ mode }) => {
7export default ({ mode }) => {
8 Object.assign(process.env, loadEnv(mode, process.cwd()));
8 Object.assign(process.env, loadEnv(mode, process.cwd()));
9 const SHIP_URL = process.env.SHIP_URL || process.env.VITE_SHIP_URL || 'http://localhost:8080';
9 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);
11
11
12 return defineConfig({
12 return defineConfig({
13 plugins: [
13 plugins: [