Merge pull request #6360 from urbit/release/urbit-os-v2.135

Release urbit-os-v2.135
This commit is contained in:
Pyry Kovanen 2023-02-28 13:51:20 -06:00 committed by GitHub
commit 81ab1c8b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1100 additions and 518 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:544744b6d1360692b83be7f3e505d0710ea6ce541912509601e81fec2a2cea2e oid sha256:4066cd90ac7d33b3d96b1b4d611d846d941de6e538c8355047c7cafcadce0851
size 5992253 size 6017832

View File

@ -3,8 +3,8 @@
++ jam-desk ++ jam-desk
|= [our=ship =desk now=@da] |= [our=ship =desk now=@da]
~> %slog.0^leaf/"jamming desk {<desk>}" ~> %slog.0^leaf/"jamming desk {<desk>}"
=+ .^(=rang:clay %cx /(scot %p our)//(scot %da now)) =+ .^(=rang:clay %cx /(scot %p our)//(scot %da now)/rang)
=+ .^(=tako:clay %cs /(scot %p our)/[desk]/(scot %da now)) =+ .^(=tako:clay %cs /(scot %p our)/[desk]/(scot %da now)/tako/~)
%- jam %- jam
%- ?:(=(%base desk) remove-misc-dirs same) %- ?:(=(%base desk) remove-misc-dirs same)
%- ~(run by q:(~(got by hut.rang) tako)) %- ~(run by q:(~(got by hut.rang) tako))

View File

@ -1,5 +1,5 @@
/+ *test, test-pub, test-sub /+ *test, test-pub, test-sub
/= ames-raw /sys/vane/ames /= ames-raw /sys/vane/ames
/= gall-raw /sys/vane/gall /= gall-raw /sys/vane/gall
:: ::
=/ ames-bunt (ames-raw ~zod) =/ ames-bunt (ames-raw ~zod)
@ -187,7 +187,8 @@
++ load-agent ++ load-agent
|= [=ship =gall-gate =dude:gall =agent:gall] |= [=ship =gall-gate =dude:gall =agent:gall]
=^ * gall-gate =^ * gall-gate
(gall-call gall-gate ~[/jolt] [%jolt %base dude] *roof) %+ gall-call gall-gate
[~[/load] load/[[dude [ship %base da+~1111.1.1] agent]~] *roof]
=^ * gall-gate =^ * gall-gate
=/ =sign-arvo =/ =sign-arvo
:+ %clay %writ :+ %clay %writ
@ -195,7 +196,7 @@
%: gall-take %: gall-take
gall-gate gall-gate
/sys/cor/[dude]/(scot %p ship)/base/(scot %da ~1111.1.1) /sys/cor/[dude]/(scot %p ship)/base/(scot %da ~1111.1.1)
~[/jolt] ~[/load]
sign-arvo sign-arvo
*roof *roof
== ==

View File

@ -964,8 +964,14 @@
%- mean %- flop %- mean %- flop
=/ lyn p.hair =/ lyn p.hair
=/ col q.hair =/ col q.hair
^- (list tank)
:~ leaf+"syntax error at [{<lyn>} {<col>}] in {<pax>}" :~ leaf+"syntax error at [{<lyn>} {<col>}] in {<pax>}"
leaf+(trip (snag (dec lyn) (to-wain:format (crip tex)))) ::
=/ =wain (to-wain:format (crip tex))
?: (gth lyn (lent wain))
'<<end of file>>'
(snag (dec lyn) wain)
::
leaf+(runt [(dec col) '-'] "^") leaf+(runt [(dec col) '-'] "^")
== ==
:: ::

35
pkg/arvo/ted/eval.hoon Normal file
View File

@ -0,0 +1,35 @@
/- spider
/+ strandio
=, strand=strand:spider
=>
|%
+$ deps (list path)
+$ inpt $@(cord (pair cord deps))
--
^- thread:spider
|= raw=vase
=/ m (strand ,vase)
^- form:m
=+ !<(arg=(unit inpt) raw)
?~ arg
(strand-fail:strand %no-input ~)
?@ u.arg
?~ u.arg
(strand-fail:strand %no-command ~)
(eval-hoon:strandio (ream u.arg) ~)
?~ p.u.arg
(strand-fail:strand %no-command ~)
;< =beak bind:m get-beak:strandio
=/ paz=(list path) q.u.arg
=/ bez=(list beam) ~
|-
?~ paz
(eval-hoon:strandio (ream p.u.arg) bez)
=/ bem
%+ fall
(de-beam i.paz)
[beak i.paz]
;< has=? bind:m (check-for-file:strandio bem)
?. has
(strand-fail:strand %no-file >bem< ~)
$(paz t.paz, bez [bem bez])

View File

@ -0,0 +1,64 @@
/- spider
/+ strandio
=, strand=strand:spider
=>
|%
+$ deps (list path)
+$ inpt $@(cord (pair cord deps))
--
^- thread:spider
|= raw=vase
=/ m (strand ,vase)
^- form:m
=+ !<(arg=(unit inpt) raw)
?~ arg
(strand-fail:strand %no-input ~)
=/ com
?@ u.arg
u.arg
p.u.arg
?~ com
(strand-fail:strand %no-command ~)
;< =beak bind:m get-beak:strandio
=/ paz=(list path)
?@ u.arg
~
q.u.arg
=/ bez=(list beam)
:~
[beak /sur/spider/hoon]
[beak /lib/strandio/hoon]
==
=/ =shed:khan
|-
?~ paz
;< vax=vase
bind:m
(eval-hoon:strandio (ream com) bez)
!<(shed:khan vax)
=/ bem
%+ fall
(de-beam i.paz)
[beak i.paz]
;< has=? bind:m (check-for-file:strandio bem)
?. has
(strand-fail:strand %no-file >bem< ~)
$(paz t.paz, bez [bem bez])
=/ wir /test/wire
:: TODO: if we're building the thread against user-provided dependencies, can
:: TODO: we always use the default beak here?
;< ~ bind:m (send-thread:strandio beak shed wir)
;< [wer=wire sig=sign-arvo] bind:m take-sign-arvo:strandio
?> =(wir wer)
?> ?=(%khan -.sig)
?> ?=(%arow +<.sig)
=/ vow ,.+>.sig
?- -.vow
%& (pure:m q.p.vow)
%| (strand-fail:strand %child-failed +.vow)
==
:: tests:
:: success
:: -khan-eval '=/ m (strand ,vase) ;< ~ bind:m (poke [~zod %hood] %helm-hi !>(\'\')) (pure:m !>(\'success\'))'
:: failure
:: -khan-eval '=/ m (strand ,vase) ;< vax=vase bind:m (eval-hoon [%zpzp ~] ~) (pure:m !>(\'success\'))'

View File

@ -256,6 +256,7 @@
%- (slog 'on-wake vers failed' u.error.sign) %- (slog 'on-wake vers failed' u.error.sign)
[[next]~ this] [[next]~ this]
?: =(rev vers) [[next]~ this] ?: =(rev vers) [[next]~ this]
=. vers rev
=/ tasks=(list @ta) ~(tap in ~(key by make)) =/ tasks=(list @ta) ~(tap in ~(key by make))
=| cards=(list card) =| cards=(list card)
|- |-

55
pkg/base-dev/lib/mip.hoon Normal file
View File

@ -0,0 +1,55 @@
|%
++ mip :: map of maps
|$ [kex key value]
(map kex (map key value))
::
++ bi :: mip engine
=| a=(map * (map))
|@
++ del
|* [b=* c=*]
=+ d=(~(gut by a) b ~)
=+ e=(~(del by d) c)
?~ e
(~(del by a) b)
(~(put by a) b e)
::
++ get
|* [b=* c=*]
=> .(b `_?>(?=(^ a) p.n.a)`b, c `_?>(?=(^ a) ?>(?=(^ q.n.a) p.n.q.n.a))`c)
^- (unit _?>(?=(^ a) ?>(?=(^ q.n.a) q.n.q.n.a)))
(~(get by (~(gut by a) b ~)) c)
::
++ got
|* [b=* c=*]
(need (get b c))
::
++ gut
|* [b=* c=* d=*]
(~(gut by (~(gut by a) b ~)) c d)
::
++ has
|* [b=* c=*]
!=(~ (get b c))
::
++ key
|* b=*
~(key by (~(gut by a) b ~))
::
++ put
|* [b=* c=* d=*]
%+ ~(put by a) b
%. [c d]
%~ put by
(~(gut by a) b ~)
::
++ tap
::NOTE naive turn-based implementation find-errors ):
=< $
=+ b=`_?>(?=(^ a) *(list [x=_p.n.a _?>(?=(^ q.n.a) [y=p v=q]:n.q.n.a)]))`~
|. ^+ b
?~ a
b
$(a r.a, b (welp (turn ~(tap by q.n.a) (lead p.n.a)) $(a l.a)))
--
--

248
pkg/base-dev/lib/sss.hoon Normal file
View File

@ -0,0 +1,248 @@
/- *sss
/+ *mip
::
|%
++ mk-subs :: Create sub-map.
|* [=(lake) paths=mold]
-:+6:(da lake paths)
::
++ mk-pubs :: Create pub-map.
|* [=(lake) paths=mold]
-:+6:(du lake paths)
::
++ mk-mar :: Create mar.
|* =(lake)
|_ =(response:poke lake *)
++ grow
|%
++ noun response
--
++ grab
|%
++ noun (response:poke lake *)
--
++ grad %noun
--
++ fled :: Like +sped but head is a path.
|= vax=vase
^- vase
:_ q.vax
%- ~(play ut p.vax)
=- [%wtgr [%wtts - [%& 2]~] [%$ 1]]
=/ pax ~| %path-none ;;(path -.q.vax)
|- ^- spec
?~ pax [%base %null]
[%bccl ~[[%leaf %ta -.pax] $(pax +.pax)]]
::
++ zoom |= =noun ~| %need-path $/sss/;;(path noun)
::
++ da :: Manage subscriptions.
|* [=(lake) paths=mold]
=>
|%
+$ flow [=aeon fail=_| =rock:lake]
--
|_ [sub=(map [ship dude paths] flow) =bowl:gall result-type=type on-rock-type=type]
++ surf pine :: Subscribe to [ship dude path].
++ read :: See current subscribed states.
^- (map [ship dude paths] [fail=? rock:lake])
%- ~(run by sub)
|= =flow
[fail rock]:flow
:: :: Check poke-acks for errors.
:: :: If an %sss-on-rock poke nacks,
++ chit :: that state is flagged as failed.
|= [[aeon=term ship=term dude=term path=paths] =sign:agent:gall]
^+ sub
?> ?=(%poke-ack -.sign)
?~ p.sign sub
%+ ~(jab by sub) [(slav %p ship) dude path]
|= =flow
?> =(aeon.flow (slav %ud aeon))
flow(fail &)
:: :: Check if we're still interested
:: :: in a wave. If no, no-op.
:: :: If yes, scry.
++ behn :: (See https://gist.github.com/belisarius222/7f8452bfea9b199c0ed717ab1778f35b)
|= [ship=term =dude aeon=term path=paths]
^- (list card:agent:gall)
=/ ship (slav %p ship)
=/ aeon (slav %ud aeon)
?: (lte aeon aeon:(~(got by sub) ship dude path)) ~
~[(scry `aeon ship dude path)]
::
++ apply :: Handle response from publisher.
|= res=(response:poke lake paths)
^- (quip card:agent:gall _sub)
?- type.res
%yore
:_ sub :_ ~
(pine src.bowl dude.res path.res)
::
%nigh
:_ sub :_ ~
(behn-s25 [dude aeon path]:res)
::
%scry
=* current [src.bowl dude.res path.res]
=/ [wave=(unit wave:lake) =flow]
=/ old=flow (~(gut by sub) current *flow)
?- what.res
%rock ?> (gte aeon.res aeon.old)
`[aeon.res | rock.res]
%wave ~| [%weird-wave res=res old=old]
?> =(aeon.res +(aeon.old))
[`wave.res [aeon.res | (wash:lake rock.old wave.res)]]
==
:_ (~(put by sub) current flow)
%- flop
:~ (scry `+(aeon.res) src.bowl dude.res path.res)
:* %pass (zoom on-rock/(scot %ud aeon.flow)^(scot %p src.bowl)^dude.res^path.res)
%agent [our dap]:bowl
%poke %sss-on-rock on-rock-type ^- from
[path.res src.bowl dude.res rock.flow wave]
== ==
==
::
:: Non-public facing arms below
::
+$ from (on-rock:poke lake paths)
+$ into (response:poke lake paths)
+$ result (request:poke paths)
++ behn-s25
|= [=dude =aeon path=noun]
^- card:agent:gall
:* %pass (zoom behn/(scot %p src.bowl)^dude^(scot %ud aeon)^path)
%arvo %b %wait (add ~s25 now.bowl)
==
++ pine |= [ship dude paths] (scry ~ +<)
++ scry
|= [when=(unit aeon) who=ship which=dude where=paths]
^- card:agent:gall
=/ when ?~ when %~ (scot %ud u.when)
:* %pass (zoom request/scry/(scot %p who)^which^when^where)
%agent [who which]
%poke %sss-to-pub :- result-type ^- result
[where which ^when]
==
--
++ du :: Manage publications.
|* [=(lake) paths=mold]
=>
|%
+$ rule [rocks=_1 waves=_5] :: Retention policy
+$ tide
$: rok=((mop aeon rock:lake) gte)
wav=((mop aeon wave:lake) lte)
rul=rule
mem=(mip aeon [ship dude] @da)
==
--
|_ [pub=(map paths tide) =bowl:gall result-type=type]
+* rok ((on aeon rock:lake) gte)
wav ((on aeon wave:lake) lte)
::
++ rule :: Set new retention policy.
|= [path=paths =^rule]
^+ pub
%+ ~(jab by pub) path
|= =tide
(form tide(rul rule))
::
++ wipe :: Create new rock and wipe rest.
|= path=paths
^+ pub
%+ ~(jab by pub) path
|= =tide
%* . (form tide(rul [0 1]))
rul rul.tide
wav ~
==
++ give :: Give a wave on a path.
|= [path=paths =wave:lake]
^- (quip card:agent:gall _pub)
?~ ;;((soft ^path) path) ~| %need-path !!
=/ =tide (~(gut by pub) path *tide)
=/ next=aeon
.+ %+ max
(fall (bind (pry:rok rok.tide) head) 0)
(fall (bind (ram:wav wav.tide) head) 0)
::
:_ %+ ~(put by pub) path
=/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
=. wav.tide (put:wav wav.tide next wave)
=. mem.tide (~(del by mem.tide) next)
?. =(next (add aeon.last waves.rul.tide)) tide
(form tide)
::
%+ murn ~(tap by (~(gut by mem.tide) next ~))
|= [[=ship =dude] =@da]
?: (lth da now.bowl) ~
`(send scry/wave/wave ship dude next path)
++ read :: See current published states.
^- (map paths rock:lake)
%- ~(run by pub)
|= =tide
=< rock
=/ snap=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
%+ roll (tap:wav (lot:wav wav.tide `aeon.snap ~))
|= [[=aeon =wave:lake] =_snap]
?. =(aeon +(aeon.snap)) snap
[aeon (wash:lake rock.snap wave)]
::
++ apply :: Handle request from subscriber.
|= req=(request:poke paths)
^- (quip card:agent:gall _pub)
=/ =tide (~(gut by pub) path.req *tide)
?~ when.req
=/ last (fall (pry:rok rok.tide) *[=key =val]:rok)
:_ pub :_ ~
(send scry/rock/val.last src.bowl dude.req key.last path.req)
?^ dat=(get:wav wav.tide u.when.req)
:_ pub :_ ~
(send scry/wave/u.dat src.bowl [dude u.when path]:req)
?. (gth u.when.req key::(fall (ram:wav wav.tide) [key=+(u.when.req) **]))
:_ pub :_ ~
(send yore/~ src.bowl [dude u.when path]:req)
:- ~[(send nigh/~ src.bowl [dude u.when path]:req)]
%+ ~(put by pub) path.req
%= tide mem
%^ ~(put bi mem.tide) u.when.req [src.bowl dude.req]
(add ~s25 now.bowl)
==
::
:: Non-public facing arms below
::
+$ into (request:poke paths)
+$ result (response:poke lake paths)
++ send
|= [payload=_|3:*(response:poke lake paths) =ship =dude =aeon path=paths]
^- card:agent:gall
=* mark (cat 3 %sss- name:lake)
:* %pass (zoom response/scry/(scot %p ship)^dude^(scot %ud aeon)^path)
%agent [ship dude]
%poke mark result-type ^- (response:poke lake paths)
[path dap.bowl aeon payload]
==
++ form
|= =tide
^+ tide
=/ max-rock=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
=/ max-wave (fall (bind (ram:wav wav.tide) head) 0)
=. rok.tide
%+ gas:rok +<-:gas:rok
%- tab:rok :_ [~ +(rocks.rul.tide)]
?: ?| =(waves.rul.tide 0)
(lth max-wave (add aeon.max-rock waves.rul.tide))
==
rok.tide
%+ put:rok rok.tide
%+ roll (tab:wav wav.tide `aeon.max-rock max-wave)
|: [*[now=aeon =wave:lake] `[prev=aeon =rock:lake]`max-rock]
~| %aeon-awry
?> =(now +(prev))
[now (wash:lake rock wave)]
~| %rock-zero
tide(wav (lot:wav wav.tide (bind (ram:rok rok.tide) |=([r=@ *] (dec r))) ~))
--
--

View File

@ -73,7 +73,9 @@
^- form:m ^- form:m
|= tin=strand-input:strand |= tin=strand-input:strand
?+ in.tin `[%skip ~] ?+ in.tin `[%skip ~]
~ `[%wait ~] ~
`[%wait ~]
::
[~ %poke @ *] [~ %poke @ *]
?. =(mark p.cage.u.in.tin) ?. =(mark p.cage.u.in.tin)
`[%skip ~] `[%skip ~]
@ -87,7 +89,9 @@
^- form:m ^- form:m
|= tin=strand-input:strand |= tin=strand-input:strand
?+ in.tin `[%skip ~] ?+ in.tin `[%skip ~]
~ `[%wait ~] ~
`[%wait ~]
::
[~ %sign *] [~ %sign *]
`[%done [wire sign-arvo]:u.in.tin] `[%done [wire sign-arvo]:u.in.tin]
== ==
@ -473,6 +477,18 @@
(pure:m ~) (pure:m ~)
?> =(%vase p.r.u.riot) ?> =(%vase p.r.u.riot)
(pure:m (some !<(vase q.r.u.riot))) (pure:m (some !<(vase q.r.u.riot)))
::
++ build-file-hard
|= [[=ship =desk =case] =spur]
=* arg +<
=/ m (strand ,vase)
^- form:m
;< =riot:clay
bind:m
(warp ship desk ~ %sing %a case spur)
?> ?=(^ riot)
?> ?=(%vase p.r.u.riot)
(pure:m !<(vase q.r.u.riot))
:: +build-mark: build a mark definition to a $dais :: +build-mark: build a mark definition to a $dais
:: ::
++ build-mark ++ build-mark
@ -585,6 +601,23 @@
(poke [who %hood] %helm-hi !>(~)) (poke [who %hood] %helm-hi !>(~))
(pure:m ~) (pure:m ~)
:: ::
++ eval-hoon
|= [gen=hoon bez=(list beam)]
=/ m (strand ,vase)
^- form:m
=/ sut=vase !>(..zuse)
|-
?~ bez
(pure:m (slap sut gen))
;< vax=vase bind:m (build-file-hard i.bez)
$(bez t.bez, sut (slop vax sut))
::
++ send-thread
|= [=bear:khan =shed:khan =wire]
=/ m (strand ,~)
^- form:m
(send-raw-card %pass wire %arvo %k %lard bear shed)
::
:: Queue on skip, try next on fail %ignore :: Queue on skip, try next on fail %ignore
:: ::
++ main-loop ++ main-loop

36
pkg/base-dev/sur/sss.hoon Normal file
View File

@ -0,0 +1,36 @@
|%
++ lake
|$ [rock wave]
$_ ^?
|%
++ name *term
+$ rock ^rock
+$ wave ^wave
++ wash |~ [rock wave] *rock
--
+$ aeon @ud
+$ dude dude:agent:gall
+$ what ?(%rock %wave)
++ poke
|%
++ request
|* paths=mold
$: path=paths
=dude
when=(unit aeon)
==
++ response
|* [=(lake) paths=mold]
$: path=paths
=dude
=aeon
$% [type=?(%nigh %yore) ~]
$: type=%scry
$% [what=%rock =rock:lake]
[what=%wave =wave:lake]
== == == ==
++ on-rock
|* [=(lake) paths=mold]
,[path=paths src=ship from=dude =rock:lake wave=(unit wave:lake)]
--
--

View File

@ -154,6 +154,7 @@
%noun %noun
?+ q.vase !! ?+ q.vase !!
%migrate poke-migrate:gc %migrate poke-migrate:gc
%migrate-my-channels poke-migrate-my-channels:gc
%export poke-export:gc %export poke-export:gc
%rebuild poke-rebuild:gc %rebuild poke-rebuild:gc
== ==
@ -302,6 +303,10 @@
(turn ~(tap in wait) watch-init-migrate) (turn ~(tap in wait) watch-init-migrate)
=/ cards (welp cards-1 cards-2) =/ cards (welp cards-1 cards-2)
[cards state(wait wait)] [cards state(wait wait)]
++ poke-migrate-my-channels
^- (quip card _state)
=/ [cards=(list card) *] (~(migrate-my-channels gladio bol) ~)
[cards state]
:: ::
++ watch-init-migrate ++ watch-init-migrate
|= =ship |= =ship

View File

@ -4,6 +4,7 @@
/- grp=group-store /- grp=group-store
/- i=migrate /- i=migrate
/- *group /- *group
/+ res=resource
|_ =bowl:gall |_ =bowl:gall
+$ card card:agent:gall +$ card card:agent:gall
:: if false, indicates that OTA should be done in one go, in order to :: if false, indicates that OTA should be done in one go, in order to
@ -54,15 +55,12 @@
?~ group=(~(get by groups) group.u.assoc) ?~ group=(~(get by groups) group.u.assoc)
~& missing-group/[flag group.u.assoc] ~& missing-group/[flag group.u.assoc]
~ ~
?: hidden.u.group
~
=/ writers=(set ship) =/ writers=(set ship)
(~(get ju tags.u.group) %graph flag %writers) (~(get ju tags.u.group) %graph flag %writers)
?~ log=(~(get by update-logs.network) flag) ?~ log=(~(get by update-logs.network) flag)
~& missing-log/flag :: XX: doesn't need to fail, but suspect case ~& missing-log/flag :: XX: doesn't need to fail, but suspect case
~ ~
`[flag writers u.assoc u.log graph] `[flag writers u.assoc u.log graph]
++ scry ++ scry
|= [=dude:gall =path] |= [=dude:gall =path]
%- welp %- welp
@ -78,6 +76,21 @@
.^(* (scry %graph-store /export/noun)) .^(* (scry %graph-store /export/noun))
++ associations ++ associations
~+ .^([@ =associations:met ~] (scry %metadata-store /export/noun)) ~+ .^([@ =associations:met ~] (scry %metadata-store /export/noun))
++ my-channels-associations
=/ assoc
.^(associations:met %gx [(scot %p our.bowl) %metadata-store (scot %da now.bowl) %associations %noun ~])
%- ~(gas by *associations:met)
%+ skim
~(tap by assoc)
|= [m=md-resource:met [g=resource:res metdat=metadatum:met]]
?+ config.metdat %.n
[%graph @]
?& =(| hidden.metdat)
=(name.g name.resource.m)
=(entity.g our.bowl)
!=(%chat module.config.metdat)
==
==
++ associations-raw ++ associations-raw
.^(* (scry %metadata-store /export/noun)) .^(* (scry %metadata-store /export/noun))
++ export ++ export
@ -163,7 +176,78 @@
:_ ~ :_ ~
(welp setup (zing (turn ~(tap in (~(del in ships) our.bowl)) migrate-ship))) (welp setup (zing (turn ~(tap in (~(del in ships) our.bowl)) migrate-ship)))
[setup (~(uni in ships) wait)] [setup (~(uni in ships) wait)]
:: ++ migrate-my-channels
|= wait=(set ship)
^- (quip card (set ship))
=+ network
=+ groups
=+ associations
=/ =flag:i [our.bowl %my-channels]
=/ ships (peers network)
=/ import (import-for-mark `our.bowl groups my-channels-associations network)
=/ chats=imports:graph:i
(import %graph-validator-chat)
=/ diarys=imports:graph:i
(import %graph-validator-publish)
=/ links=imports:graph:i
(import %graph-validator-link)
=| assoc=association:met
=/ hoops=imports:groups:i
%- ~(gas by *imports:groups:i)
%+ murn ~(tap by groups)
|= [=flag:i =group]
^- (unit [_flag import:groups:i])
=/ nass=(unit association:met)
?^ (~(get by associations) [%groups flag]) ~
`assoc(hidden.metadatum |, title.metadatum 'My Channels', creator.metadatum p.flag, group [our.bowl %my-channels])
?~ nass ~
=/ chans=(map flag:i association:met)
%- ~(gas by *(map flag:i association:met))
%+ murn ~(tap by associations)
|= [res=md-resource:met ass=association:met]
^- (unit [flag:i association:met])
?. =(group.ass flag) ~
?. =(entity.group.ass our.bowl) ~
`[resource.res ass]
=/ roles=(set flag:i)
%- ~(gas in *(set flag:i))
%+ murn ~(tap by chans)
|= [=flag:i =association:met]
^- (unit flag:i)
?. =(group.association flag) ~
?. =(entity.group.association our.bowl) ~
?^ link=(~(get by links) flag)
?: =(writers.u.link ~) ~
`flag
?^ diary=(~(get by links) flag)
?: =(writers.u.diary ~) ~
`flag
?^ chat=(~(get by chats) flag)
?: =(writers.u.chat ~) ~
`flag
~
?~ chans ~
`[flag u.nass chans roles group]
=/ bigport=import:groups:i
%+ roll ~(val by hoops)
|= [port=import:groups:i newport=import:groups:i]
^- import:groups:i
:: they should have the same association and group already
:* association.port
(~(uni by chans.port) chans.newport)
(~(uni by roles.port) roles.newport)
group.port
==
?~ chans.bigport
[~ ~]
=/ mychan-import=imports:groups:i
(~(put by *imports:groups:i) [our.bowl %my-channels] bigport)
:_ ~
:~ (poke-our %groups group-import+!>(mychan-import))
(poke-our %chat graph-imports+!>(chats))
(poke-our %heap graph-imports+!>(links))
(poke-our %diary graph-imports+!>(diarys))
==
++ migrate-ship ++ migrate-ship
|= her=ship |= her=ship
^- (list card) ^- (list card)
@ -189,5 +273,5 @@
:~ (poke-our %chat graph-imports+!>(chats)) :~ (poke-our %chat graph-imports+!>(chats))
(poke-our %diary graph-imports+!>(diarys)) (poke-our %diary graph-imports+!>(diarys))
(poke-our %heap graph-imports+!>(links)) (poke-our %heap graph-imports+!>(links))
== ==
-- --

File diff suppressed because it is too large Load Diff