workspace Todo id "workspace:todo" revision "workspace:todo@1" commit "1111111111111111111111111111111111111111" { atom Project id "atom:project" doc "A project containing work."; atom Person id "atom:person"; interface Named id "interface:named" revision "interface:named@1" source { repository "https://repos.quixos.org/quixos-todo/interface-named.git"; commit "2222222222222222222222222222222222222222"; } { value name id "member:named:name" : string { get id "operation:named:name:get"; set id "operation:named:name:set"; watch start id "operation:named:name:watch-start" stop id "operation:named:name:watch-stop"; } } interface Owned id "interface:owned" revision "interface:owned@1" source { repository "https://repos.quixos.org/quixos-todo/interface-owned.git"; commit "3333333333333333333333333333333333333333"; } { relation owner id "member:owned:owner" : exactly-one interface Named { resolve id "operation:owned:owner:resolve"; connect id "operation:owned:owner:connect"; disconnect id "operation:owned:owner:disconnect"; watch start id "operation:owned:owner:watch-start" stop id "operation:owned:owner:watch-stop"; } } interface Summary id "interface:summary" revision "interface:summary@1" source { repository "https://repos.quixos.org/quixos-todo/interface-summary.git"; commit "4444444444444444444444444444444444444444"; } { value summary id "member:summary:summary" : string { get id "operation:summary:summary:get"; } } package TodoRuntime id "package:todo-runtime" revision "package:todo-runtime@1" source { repository "https://repos.quixos.org/quixos-todo/package-todo-runtime.git"; commit "5555555555555555555555555555555555555555"; } { operation summaryGet id "export:todo-runtime:summary-get" : unit -> string mode call receiver interfaces [Named] requires { state title id "port:summary:title" : string [read]; interface named id "port:summary:named" : Named; constructor person id "port:summary:person" : Person; }; constructor createPerson id "export:todo-runtime:create-person" constructs Person : unit; } shared state ProjectTitle id "slot:project:title" on Project : string policy optimistic-register default "Untitled project"; conform Project as Named { bind name.get to state ProjectTitle.read; bind name.set to state ProjectTitle.write; bind name.watch-start to state ProjectTitle.watch-start; bind name.watch-stop to state ProjectTitle.watch-stop; } conform Person as Named { private state PersonName id "slot:person:name" on Person : string policy optimistic-register default "Anonymous"; bind name.get to state PersonName.read; bind name.set to state PersonName.write; bind name.watch-start to state PersonName.watch-start; bind name.watch-stop to state PersonName.watch-stop; } conform Project as Owned { private edge ProjectOwner id "edge:project:owner" { atom Project projection owner id "projection:project-owner:owner" exactly-one; interface Named projection ownedProjects id "projection:project-owner:owned-projects" many; } bind owner.resolve to edge ProjectOwner.owner.resolve; bind owner.connect to edge ProjectOwner.owner.connect; bind owner.disconnect to edge ProjectOwner.owner.disconnect; bind owner.watch-start to edge ProjectOwner.owner.watch-start; bind owner.watch-stop to edge ProjectOwner.owner.watch-stop; } conform Project as Summary { bind summary.get to package TodoRuntime.summaryGet with { title to state ProjectTitle; named to interface Named; person to constructor Person; }; } constructor Person to TodoRuntime.createPerson; }