diff --git a/pkg/arvo/app/group-view.hoon b/pkg/arvo/app/group-view.hoon index 9770459eb3..1a5a0ba08e 100644 --- a/pkg/arvo/app/group-view.hoon +++ b/pkg/arvo/app/group-view.hoon @@ -289,7 +289,7 @@ :: ++ md-fact |= [=mark =vase] - ?. ?=(%metadata-update-1 mark) jn-core + ?. ?=(%metadata-update-2 mark) jn-core =+ !<(=update:metadata vase) ?. ?=(%initial-group -.update) jn-core ?. =(group.update rid) jn-core diff --git a/pkg/arvo/app/hark-group-hook.hoon b/pkg/arvo/app/hark-group-hook.hoon index 2123f8cb87..be5ac0d8c5 100644 --- a/pkg/arvo/app/hark-group-hook.hoon +++ b/pkg/arvo/app/hark-group-hook.hoon @@ -113,7 +113,7 @@ (group-update !<(update:group-store q.cage.sign)) [cards this] :: - %metadata-update-1 + %metadata-update-2 =^ cards state (metadata-update !<(update:metadata q.cage.sign)) [cards this] diff --git a/pkg/arvo/app/metadata-pull-hook.hoon b/pkg/arvo/app/metadata-pull-hook.hoon index 4766ff0a14..bdf090efbe 100644 --- a/pkg/arvo/app/metadata-pull-hook.hoon +++ b/pkg/arvo/app/metadata-pull-hook.hoon @@ -38,7 +38,7 @@ update:metadata %metadata-update %metadata-push-hook - 1 1 + 2 2 %.n == +$ state-zero @@ -180,7 +180,7 @@ %kick [watch-store^~ state] :: %fact - ?> ?=(%metadata-update-1 p.cage.sign) + ?> ?=(%metadata-update-2 p.cage.sign) =+ !<(=update:metadata q.cage.sign) ?. ?=(%initial-group -.update) `state `state(previews (~(del by previews) group.update)) @@ -325,7 +325,7 @@ %+ turn ~(tap by associations) |= [=md-resource:metadata =association:metadata] %+ poke-our:pass:io %metadata-store - :- %metadata-update-1 + :- %metadata-update-2 !> ^- update:metadata [%remove resource md-resource] :: diff --git a/pkg/arvo/app/metadata-push-hook.hoon b/pkg/arvo/app/metadata-push-hook.hoon index e0c3d99ec2..45ffec1f9a 100644 --- a/pkg/arvo/app/metadata-push-hook.hoon +++ b/pkg/arvo/app/metadata-push-hook.hoon @@ -14,7 +14,7 @@ update:store %metadata-update %metadata-pull-hook - 1 1 + 2 2 == :: +$ agent (push-hook:push-hook config) diff --git a/pkg/arvo/app/metadata-store.hoon b/pkg/arvo/app/metadata-store.hoon index d14986cfe6..ba96e2a354 100644 --- a/pkg/arvo/app/metadata-store.hoon +++ b/pkg/arvo/app/metadata-store.hoon @@ -155,7 +155,7 @@ |^ =^ cards state ?+ mark (on-poke:def mark vase) - ?(%metadata-action %metadata-update-1) + ?(%metadata-action %metadata-update-2) (poke-metadata-update !<(update:store vase)) :: %import @@ -299,7 +299,7 @@ =/ cards=(list card) ?+ path (on-watch:def path) [%all ~] - (give %metadata-update-1 !>([%associations associations])) + (give %metadata-update-2 !>([%associations associations])) :: [%updates ~] ~ @@ -307,7 +307,7 @@ [%app-name @ ~] =/ =app-name:store i.t.path =/ app-indices (metadata-for-app:mc app-name) - (give %metadata-update-1 !>([%associations app-indices])) + (give %metadata-update-2 !>([%associations app-indices])) == [cards this] :: @@ -565,6 +565,6 @@ ++ update-subscribers |= [pax=path =update:store] ^- (list card) - [%give %fact ~[pax] %metadata-update-1 !>(update)]~ + [%give %fact ~[pax] %metadata-update-2 !>(update)]~ -- -- diff --git a/pkg/arvo/mar/metadata/update-1.hoon b/pkg/arvo/mar/metadata/update-1.hoon index 36036d1098..01d0cbbcb1 100644 --- a/pkg/arvo/mar/metadata/update-1.hoon +++ b/pkg/arvo/mar/metadata/update-1.hoon @@ -1,15 +1,22 @@ /+ store=metadata-store -|_ =update:store +|_ =update:one:store ++ grad %noun ++ grow |% ++ noun update - ++ json (update:enjs:store update) + ++ metadata-update-2 + ^- update:store + update -- :: ++ grab |% - ++ noun update:store - ++ json action:dejs:store + ++ noun update:one:store + :: This is ok, we don't send %edit over the wire yet. + ++ metadata-update-2 + |= upd=update:store + ^- update:one:store + ?< ?=(%edit -.upd) + upd -- -- diff --git a/pkg/arvo/mar/metadata/update-2.hoon b/pkg/arvo/mar/metadata/update-2.hoon new file mode 100644 index 0000000000..0b55129f1f --- /dev/null +++ b/pkg/arvo/mar/metadata/update-2.hoon @@ -0,0 +1,15 @@ +/+ store=metadata-store +|_ =update:store +++ grad %noun +++ grow + |% + ++ noun update + ++ json (update:enjs:store update) + -- +:: +++ grab + |% + ++ noun update:store + ++ json update:dejs:store + -- +-- diff --git a/pkg/arvo/sur/metadata-store.hoon b/pkg/arvo/sur/metadata-store.hoon index 071e45692a..9979f3e854 100644 --- a/pkg/arvo/sur/metadata-store.hoon +++ b/pkg/arvo/sur/metadata-store.hoon @@ -90,6 +90,18 @@ == == :: historical +++ one + |% + :: + +$ action + $~ [%remove *resource *md-resource] + $< %edit ^action + :: + +$ update + $~ [%remove *resource *md-resource] + $< %edit ^update + :: + -- ++ zero |% :: diff --git a/pkg/arvo/ted/graph/create-group-feed.hoon b/pkg/arvo/ted/graph/create-group-feed.hoon index 83590f5928..1cf6d261e5 100644 --- a/pkg/arvo/ted/graph/create-group-feed.hoon +++ b/pkg/arvo/ted/graph/create-group-feed.hoon @@ -46,7 +46,7 @@ (poke-our %graph-push-hook %push-hook-action !>([%add feed-rid])) ;< ~ bind:m %+ poke-our %metadata-push-hook - :- %metadata-update-1 + :- %metadata-update-2 !> ^- action:met :^ %add group.action @@ -54,7 +54,7 @@ metadatum(feed.config ``[%graph feed-rid]) ;< ~ bind:m %+ poke-our %metadata-push-hook - :- %metadata-update-1 + :- %metadata-update-2 !> ^- action:met :^ %add group.action diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index 44f9cd098e..04ad3664d2 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -78,7 +78,7 @@ =/ met-action=action:met [%add group graph+rid.action metadatum] ;< ~ bind:m - (poke-our %metadata-push-hook metadata-update-1+!>(met-action)) + (poke-our %metadata-push-hook metadata-update-2+!>(met-action)) :: :: Send invites :: diff --git a/pkg/arvo/ted/graph/delete.hoon b/pkg/arvo/ted/graph/delete.hoon index bab899d6ef..e074482df0 100644 --- a/pkg/arvo/ted/graph/delete.hoon +++ b/pkg/arvo/ted/graph/delete.hoon @@ -41,7 +41,7 @@ (poke-our %graph-push-hook %push-hook-action !>([%remove rid])) ;< ~ bind:m %+ poke-our %metadata-push-hook - :- %metadata-update-1 + :- %metadata-update-2 !> ^- action:metadata [%remove group-rid [%graph rid]] (pure:m ~) diff --git a/pkg/arvo/ted/graph/disable-group-feed.hoon b/pkg/arvo/ted/graph/disable-group-feed.hoon index 5b9d6555e8..15b40e2f9e 100644 --- a/pkg/arvo/ted/graph/disable-group-feed.hoon +++ b/pkg/arvo/ted/graph/disable-group-feed.hoon @@ -31,7 +31,7 @@ == ;< ~ bind:m %+ poke-our %metadata-push-hook - :- %metadata-update-1 + :- %metadata-update-2 !> ^- action:met :^ %add group.action