From eef1d058cfdefad05c4b40df7ea38d450972b4f0 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 13 Nov 2024 11:40:53 +0000 Subject: [PATCH 1/3] Add scry path for sovereign --- desk/app/treaty.hoon | 2 ++ desk/mar/sovereign-update-0.hoon | 13 +++++++++++++ desk/sur/treaty.hoon | 11 ++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 desk/mar/sovereign-update-0.hoon diff --git a/desk/app/treaty.hoon b/desk/app/treaty.hoon index cb4af4e0..e2d7833c 100644 --- a/desk/app/treaty.hoon +++ b/desk/app/treaty.hoon @@ -154,6 +154,7 @@ [%x %default-ally ~] ``ship+!>(default-ally) [%x %allies ~] ``(ally-update:cg:ca %ini allies) [%x %treaties ~] ``(treaty-update:cg:ca:cc %ini treaties) + [%x %sovereign ~] ``(sovereign-update:cg:ca:cc %ini sovereign) :: [%x %treaties @ ~] =/ =ship (slav %p i.t.t.path) @@ -309,6 +310,7 @@ ++ alliance-update |=(=update:alliance alliance-update-0+!>(update)) ++ treaty |=(t=^treaty treaty-0+!>(t)) ++ treaty-update |=(u=update:^treaty treaty-update-0+!>(u)) + ++ sovereign-update |=(u=update:^sovereign sovereign-update-0+!>(u)) -- :: +ca: Card construction ++ ca diff --git a/desk/mar/sovereign-update-0.hoon b/desk/mar/sovereign-update-0.hoon new file mode 100644 index 00000000..f512064d --- /dev/null +++ b/desk/mar/sovereign-update-0.hoon @@ -0,0 +1,13 @@ +/- *treaty +|_ =update:sovereign +++ grad %noun +++ grow + |% + ++ noun update + -- +++ grab + |% + ++ noun update:sovereign + -- +-- + diff --git a/desk/sur/treaty.hoon b/desk/sur/treaty.hoon index e57c881b..8229ca93 100644 --- a/desk/sur/treaty.hoon +++ b/desk/sur/treaty.hoon @@ -34,7 +34,16 @@ diff == -- - +:: +sovereign: Our published desks +:: +++ sovereign + |% + +$ update + $% [%ini (map =desk =treaty)] + [%add =desk =treaty] + [%del =desk =treaty] + == + -- :: +ally: Discovery structures :: ++ ally From ced5311425eab5fecd9298f48ea8863166bad73e Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 13 Nov 2024 12:53:00 +0000 Subject: [PATCH 2/3] Add %ini subscription --- desk/app/treaty.hoon | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desk/app/treaty.hoon b/desk/app/treaty.hoon index e2d7833c..2b469b9b 100644 --- a/desk/app/treaty.hoon +++ b/desk/app/treaty.hoon @@ -143,6 +143,10 @@ [%allies ~] :_ this (fact-init:io (ally-update:cg:cc %ini allies))^~ + :: + [%sovereign ~] + :_ this + (fact-init:io (sovereign-update:cg:cc %ini sovereign))^~ == :: :: From eb0a30b97747fd8ed7432a3aa97d95a71d64e2c4 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Thu, 14 Nov 2024 11:40:45 +0000 Subject: [PATCH 3/3] Add +gone and +unpublish to +so --- desk/app/treaty.hoon | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/desk/app/treaty.hoon b/desk/app/treaty.hoon index 2b469b9b..f1a08dab 100644 --- a/desk/app/treaty.hoon +++ b/desk/app/treaty.hoon @@ -96,8 +96,10 @@ =, update =. entente (~(del in entente) [ship desk]) ?. =(our.bowl ship) `this + =/ so ~(. so:cc desk) =. sovereign (~(del by sovereign) desk) - :_(this ~(kick so:cc desk)^~) + :_ this + [unpublish kick gone]:so == -- :: @@ -367,8 +369,15 @@ =/ t=treaty (~(got by sovereign) desk) :~ (fact:io (treaty-update:cg %add t) /treaties ~) (fact:io (treaty:cg t) path ~) + (fact:io (sovereign-update:cg %add [desk t]) /sovereign ~) == + ++ gone + ^- (list card) + =/ t=treaty (~(got by sovereign) desk) + (fact:io (sovereign-update:cg %del [desk t]) /sovereign ~)^~ ++ publish (poke-our:pass %hood kiln-permission+!>([desk / &])) + ++ unpublish + (poke-our:pass %hood kiln-permission+!>([desk / |])) -- --