diff --git a/pkg/arvo/lib/graph-view.hoon b/pkg/arvo/lib/graph-view.hoon new file mode 100644 index 000000000..e5a83018b --- /dev/null +++ b/pkg/arvo/lib/graph-view.hoon @@ -0,0 +1,62 @@ +/- sur=graph-view +/+ resource, group-store +^? +=< [sur .] +=, sur +|% +++ app-to-mark + |= app=app-name + ?+ app !! + %chat %graph-validator-chat + == +++ dejs + =, dejs:format + |% + ++ action + |^ + ^- $-(json ^action) + %- of + :~ create+create + delete+delete + join+join + ::groupify+groupify + ::invite+invite + == + :: + ++ create + %- ot + :~ resource+dejs:resource + title+so + description+so + app+app + associated+associated + == + ++ app + |= jon=json + ^- app-name + ?> ?=(%s -.jon) + ~! app-name + %chat + :: + ++ delete + %- ot + :~ resource+dejs:resource + == + :: + ++ join + %- ot + :~ resource+dejs:resource + ship+(su ;~(pfix sig fed:ag)) + == + :: + ++ groupify !! + ++ invite !! + ++ associated + %- of + :~ group+dejs:resource + policy+policy:dejs:group-store + == + + -- + -- +-- diff --git a/pkg/arvo/lib/strandio.hoon b/pkg/arvo/lib/strandio.hoon index 8da72d0be..7eaa8c288 100644 --- a/pkg/arvo/lib/strandio.hoon +++ b/pkg/arvo/lib/strandio.hoon @@ -243,7 +243,8 @@ :: ++ scry |* [=mold =path] - =/ m (strand mold) + =/ m (strand ,mold) + ^- form:m ?> ?=(^ path) ?> ?=(^ t.path) ;< =bowl:spider bind:m get-bowl diff --git a/pkg/arvo/mar/graph/update.hoon b/pkg/arvo/mar/graph/update.hoon index d5f0f4abe..1cd2a2068 100644 --- a/pkg/arvo/mar/graph/update.hoon +++ b/pkg/arvo/mar/graph/update.hoon @@ -1,7 +1,9 @@ /+ *graph-store |_ upd=update +++ grad %noun ++ grow |% + ++ noun upd ++ json (update:enjs upd) -- :: diff --git a/pkg/arvo/mar/graph/view-action.hoon b/pkg/arvo/mar/graph/view-action.hoon new file mode 100644 index 000000000..ab8b0ef12 --- /dev/null +++ b/pkg/arvo/mar/graph/view-action.hoon @@ -0,0 +1,13 @@ +/+ *graph-view +|_ act=action +++ grad %noun +++ grow + |% + ++ noun act + -- +++ grab + |% + ++ noun action + ++ json action:dejs + -- +-- diff --git a/pkg/arvo/sur/graph-view.hoon b/pkg/arvo/sur/graph-view.hoon index 00cf4fe94..1d5489760 100644 --- a/pkg/arvo/sur/graph-view.hoon +++ b/pkg/arvo/sur/graph-view.hoon @@ -1,7 +1,17 @@ -/- group +/- *group /+ resource ^? |% +:: $associated: A group to associate, or a policy if it is unmanaged +:: ++$ associated + $% [%group rid=resource] + [%policy =policy] + == +:: $app: An app that is associated to a graph-store mark +:: ++$ app-name ?(%chat %publish %links) +:: :: $error: An error from a graph-view poke :: :: %offline: Ship is offline @@ -24,13 +34,13 @@ rid=resource title=@t description=@t - mark=(unit mark) - associated=(each resource policy:group) + app=app-name + =associated == - [%delete rid=resource ~] + [%delete rid=resource] [%join rid=resource =ship] - [%invite rid=resource ships=(set ship)] - [%groupify rid=resource title=@t description=@t] + ::[%invite rid=resource ships=(set ship)] + :: [%groupify rid=resource title=@t description=@t] == --