Assemble Todo from standalone capability resources

This commit is contained in:
Timothy J. Aveni
2026-09-05 18:43:48 -07:00
parent 7139f32bfe
commit a93e2a6c0a
4 changed files with 129 additions and 414 deletions
+27 -319
View File
@@ -6,316 +6,26 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
atom WebStudioCanvas id "atom:org.quixos.web-studio:canvas" doc "A spatial Web Studio surface.";
atom WebStudioCanvasPlacement id "atom:org.quixos.web-studio:canvas-placement" doc "One presentation of an object on a Web Studio canvas.";
interface Named id "interface:named" revision "interface:named@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-named.git";
commit "fb0e53971ee0c377ec97f23afc50b9e955d0a093";
} {
value name id "member:named:name" : string {
get id "operation:named:name:get";
set id "operation:named:name:set";
}
}
import interface Named;
import interface TaskData;
import interface ProjectTasks;
import interface ProjectActions;
import interface TaskActions;
import interface DisplayLabel;
import interface TaskCount;
import interface WebStudioCreateable;
import interface WebStudioReactComponent;
import interface WebStudioHasReactComponent;
import interface WebStudioCanvas;
import interface WebStudioCanvasPlacement;
import interface WebStudioPlaceable;
import interface WebStudioSearchable;
interface TaskData id "interface:task-data" revision "interface:task-data@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-task-data.git";
commit "4b086535e82c0deca77c4bb62527e3f521877cd6";
} {
value title id "member:task-data:title" : string {
get id "operation:task-data:title:get";
set id "operation:task-data:title:set";
}
value status id "member:task-data:status" : string {
get id "operation:task-data:status:get";
set id "operation:task-data:status:set";
}
value priority id "member:task-data:priority" : string {
get id "operation:task-data:priority:get";
set id "operation:task-data:priority:set";
}
value notes id "member:task-data:notes" : string {
get id "operation:task-data:notes:get";
set id "operation:task-data:notes:set";
}
value dueDate id "member:task-data:due-date" : string {
get id "operation:task-data:due-date:get";
set id "operation:task-data:due-date:set";
}
value energy id "member:task-data:energy" : string {
get id "operation:task-data:energy:get";
set id "operation:task-data:energy:set";
}
}
interface ProjectTasks id "interface:project-tasks" revision "interface:project-tasks@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-project-tasks.git";
commit "46e23fc9c8ac67382f22a6defeeec98d96c35093";
} {
relation tasks id "member:project-tasks:tasks" : many-unique atom Task ordered {
resolve id "operation:project-tasks:tasks:resolve";
connect id "operation:project-tasks:tasks:connect";
disconnect id "operation:project-tasks:tasks:disconnect";
}
}
interface ProjectActions id "interface:project-actions" revision "interface:project-actions@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-project-actions.git";
commit "25acd32db0e28a47ff911d910a0971100ae6e718";
} {
operation addTask id "member:project-actions:add-task" : string -> atom-ref<Task> {
call id "operation:project-actions:add-task";
}
}
interface TaskActions id "interface:task-actions" revision "interface:task-actions@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-task-actions.git";
commit "bf8e58128b9ca7a7624e96b580e3fc36b26525ee";
} {
operation complete id "member:task-actions:complete" : unit -> string {
call id "operation:task-actions:complete";
}
operation reopen id "member:task-actions:reopen" : unit -> string {
call id "operation:task-actions:reopen";
}
operation archive id "member:task-actions:archive" : unit -> string {
call id "operation:task-actions:archive";
}
}
interface DisplayLabel id "interface:display-label" revision "interface:display-label@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-display-label.git";
commit "f0b3ae93fc65468afcdba370210942c7abf9daf7";
} {
value label id "member:display-label:label" : string {
get id "operation:display-label:label:get";
watch start id "operation:display-label:label:watch-start" stop id "operation:display-label:label:watch-stop";
}
}
interface TaskCount id "interface:task-count" revision "interface:task-count@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-task-count.git";
commit "20cfb967929cd0a085099b970987b90853c8a0ba";
} {
value count id "member:task-count:count" : uint32 {
get id "operation:task-count:count:get";
watch start id "operation:task-count:count:watch-start" stop id "operation:task-count:count:watch-stop";
}
}
interface WebStudioCreateable id "interface:org.quixos.web-studio.createable" revision "interface:org.quixos.web-studio.createable@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-createable.git";
commit "719d3037e666fefa0b62fd149548ecdb19b91b54";
} {}
interface WebStudioReactComponent id "interface:org.quixos.web-studio.react-component" revision "interface:org.quixos.web-studio.react-component@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-react-component.git";
commit "8d9cc7c527e10469da338f51c565743763bcf8fc";
} {
value source id "member:org.quixos.web-studio.react-component:source" : string {
get id "operation:org.quixos.web-studio.react-component:source:get";
}
value props id "member:org.quixos.web-studio.react-component:props" : message "org.quixos.web-studio.ReactProps" {
get id "operation:org.quixos.web-studio.react-component:props:get";
watch start id "operation:org.quixos.web-studio.react-component:props:watch-start" stop id "operation:org.quixos.web-studio.react-component:props:watch-stop";
}
}
interface WebStudioHasReactComponent id "interface:org.quixos.web-studio.has-react-component" revision "interface:org.quixos.web-studio.has-react-component@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-has-react-component.git";
commit "8b5a97ed6c1d705fde499232bd2c12966d6d565c";
} {
relation component id "member:org.quixos.web-studio.has-react-component:component" : optional-one interface WebStudioReactComponent {
resolve id "operation:org.quixos.web-studio.has-react-component:component:resolve";
}
}
interface WebStudioCanvas id "interface:org.quixos.web-studio.canvas" revision "interface:org.quixos.web-studio.canvas@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-canvas.git";
commit "2bfcc60fe9d03043ab6f0a41087a74879f005c1d";
} {
value name id "member:org.quixos.web-studio.canvas:name" : string {
get id "operation:org.quixos.web-studio.canvas:name:get";
set id "operation:org.quixos.web-studio.canvas:name:set";
}
relation placements id "member:org.quixos.web-studio.canvas:placements" : many-unique interface WebStudioCanvasPlacement ordered {
resolve id "operation:org.quixos.web-studio.canvas:placements:resolve";
}
}
interface WebStudioCanvasPlacement id "interface:org.quixos.web-studio.canvas-placement" revision "interface:org.quixos.web-studio.canvas-placement@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-canvas-placement.git";
commit "0645f37f754f6dcd9b217360630c683626c23f72";
} {
value position id "member:org.quixos.web-studio.canvas-placement:position" : message "org.quixos.web-studio.CanvasPosition" {
get id "operation:org.quixos.web-studio.canvas-placement:position:get";
set id "operation:org.quixos.web-studio.canvas-placement:position:set";
}
value size id "member:org.quixos.web-studio.canvas-placement:size" : message "org.quixos.web-studio.CanvasSize" {
get id "operation:org.quixos.web-studio.canvas-placement:size:get";
set id "operation:org.quixos.web-studio.canvas-placement:size:set";
}
value z id "member:org.quixos.web-studio.canvas-placement:z" : int32 {
get id "operation:org.quixos.web-studio.canvas-placement:z:get";
set id "operation:org.quixos.web-studio.canvas-placement:z:set";
}
relation subject id "member:org.quixos.web-studio.canvas-placement:subject" : exactly-one interface WebStudioPlaceable {
resolve id "operation:org.quixos.web-studio.canvas-placement:subject:resolve";
connect id "operation:org.quixos.web-studio.canvas-placement:subject:connect";
disconnect id "operation:org.quixos.web-studio.canvas-placement:subject:disconnect";
}
relation canvas id "member:org.quixos.web-studio.canvas-placement:canvas" : exactly-one interface WebStudioCanvas {
resolve id "operation:org.quixos.web-studio.canvas-placement:canvas:resolve";
connect id "operation:org.quixos.web-studio.canvas-placement:canvas:connect";
disconnect id "operation:org.quixos.web-studio.canvas-placement:canvas:disconnect";
}
}
interface WebStudioPlaceable id "interface:org.quixos.web-studio.placeable" revision "interface:org.quixos.web-studio.placeable@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-placeable.git";
commit "6f284d1ae79b50bed7468eca84728789000f05aa";
} {
relation placements id "member:org.quixos.web-studio.placeable:placements" : many-unique interface WebStudioCanvasPlacement ordered {
resolve id "operation:org.quixos.web-studio.placeable:placements:resolve";
}
}
interface WebStudioSearchable id "interface:org.quixos.web-studio.searchable" revision "interface:org.quixos.web-studio.searchable@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/interface-searchable.git";
commit "5dc882e893d9234f51ebbdeb76c0a04b99cd9621";
} {
value document id "member:org.quixos.web-studio.searchable:document" : message "org.quixos.web-studio.SearchDocument" {
get id "operation:org.quixos.web-studio.searchable:document:get";
watch start id "operation:org.quixos.web-studio.searchable:document:watch-start" stop id "operation:org.quixos.web-studio.searchable:document:watch-stop";
}
}
package TodoRuntime id "package:todo-runtime" revision "package:todo-runtime@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/package-todo-runtime.git";
commit "686cd23d0f12692ae97b052d49e867c8a9ab0355";
} {
operation complete id "export:todo-runtime:complete" : unit -> string mode call receiver atom Task requires {
state status id "port:todo-actions:status" : string [read, write];
};
operation reopen id "export:todo-runtime:reopen" : unit -> string mode call receiver atom Task requires {
state status id "port:todo-actions:status" : string [read, write];
};
operation archive id "export:todo-runtime:archive" : unit -> string mode call receiver atom Task requires {
state status id "port:todo-actions:status" : string [read, write];
};
operation displayLabelGet id "export:todo-runtime:display-label-get" : unit -> string mode call receiver atom Task requires {
state title id "port:todo-label:title" : string [read];
state status id "port:todo-label:status" : string [read];
state priority id "port:todo-label:priority" : string [read];
};
operation displayLabelWatch id "export:todo-runtime:display-label-watch" : unit -> watch-handle mode watch-start emits string receiver atom Task requires {
state title id "port:todo-label:title" : string [read];
state status id "port:todo-label:status" : string [read];
state priority id "port:todo-label:priority" : string [read];
};
operation displayLabelWatchStop id "export:todo-runtime:display-label-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Task;
operation searchDocumentGet id "export:todo-runtime:search-document-get" : unit -> message "org.quixos.web-studio.SearchDocument" mode call receiver atom Task requires {
state title id "port:todo-search:title" : string [read];
state status id "port:todo-search:status" : string [read];
state priority id "port:todo-search:priority" : string [read];
state dueDate id "port:todo-search:due-date" : string [read];
};
operation searchDocumentWatch id "export:todo-runtime:search-document-watch" : unit -> watch-handle mode watch-start emits message "org.quixos.web-studio.SearchDocument" receiver atom Task requires {
state title id "port:todo-search:title" : string [read];
state status id "port:todo-search:status" : string [read];
state priority id "port:todo-search:priority" : string [read];
state dueDate id "port:todo-search:due-date" : string [read];
};
operation searchDocumentWatchStop id "export:todo-runtime:search-document-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Task;
constructor createTask id "export:todo-runtime:create-task" constructs Task : string requires {
state title id "port:todo-constructor:title" : string [write];
};
}
package ProjectRuntime id "package:project-runtime" revision "package:project-runtime@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/package-project-runtime.git";
commit "a1859234e20380c8a8ef0f476ffda1179690bb14";
} {
constructor createProject id "export:project-runtime:create-project" constructs Project : unit;
operation addTask id "export:project-runtime:add-task" : string -> atom-ref<Task> mode call receiver atom Project requires {
edge tasks id "port:project-actions:tasks" : many-unique atom Task [connect];
constructor task id "port:project-actions:task-constructor" : Task;
};
operation taskCountGet id "export:project-runtime:task-count-get" : unit -> uint32 mode call receiver atom Project requires {
edge tasks id "port:project-count:tasks" : many-unique atom Task [resolve];
};
operation taskCountWatch id "export:project-runtime:task-count-watch" : unit -> watch-handle mode watch-start emits uint32 receiver atom Project requires {
edge tasks id "port:project-count:tasks" : many-unique atom Task [resolve];
};
operation taskCountWatchStop id "export:project-runtime:task-count-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Project;
operation searchDocumentGet id "export:project-runtime:search-document-get" : unit -> message "org.quixos.web-studio.SearchDocument" mode call receiver atom Project requires {
state name id "port:project-search:name" : string [read];
edge tasks id "port:project-search:tasks" : many-unique atom Task [resolve];
};
operation searchDocumentWatch id "export:project-runtime:search-document-watch" : unit -> watch-handle mode watch-start emits message "org.quixos.web-studio.SearchDocument" receiver atom Project requires {
state name id "port:project-search:name" : string [read];
edge tasks id "port:project-search:tasks" : many-unique atom Task [resolve];
};
operation searchDocumentWatchStop id "export:project-runtime:search-document-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Project;
}
package ProjectReactRuntime id "package:project-react-runtime" revision "package:project-react-runtime@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/package-project-react-runtime.git";
commit "7e4c51b81521ba148c483ba639b531b5516e9c4d";
} {
constructor createComponent id "export:project-react-runtime:create-component" constructs ProjectReactComponent : atom-ref<Project>;
operation sourceGet id "export:project-react-runtime:source-get" : unit -> string mode call receiver atom ProjectReactComponent;
operation propsGet id "export:project-react-runtime:props-get" : unit -> message "org.quixos.web-studio.ReactProps" mode call receiver atom ProjectReactComponent requires {
edge subject id "port:project-react:subject" : exactly-one atom Project [resolve];
state name id "port:project-react:name" : string [read];
edge tasks id "port:project-react:tasks" : many-unique atom Task [resolve];
};
operation propsWatch id "export:project-react-runtime:props-watch" : unit -> watch-handle mode watch-start emits message "org.quixos.web-studio.ReactProps" receiver atom ProjectReactComponent requires {
edge subject id "port:project-react:subject" : exactly-one atom Project [resolve];
state name id "port:project-react:name" : string [read];
edge tasks id "port:project-react:tasks" : many-unique atom Task [resolve];
};
operation propsWatchStop id "export:project-react-runtime:props-watch-stop" : watch-handle -> unit mode watch-stop receiver atom ProjectReactComponent;
}
package TodoReactRuntime id "package:todo-react-runtime" revision "package:todo-react-runtime@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/package-todo-react-runtime.git";
commit "ec7c7d8b028a355ff2c75abddaf3f5629dd5ebdf";
} {
constructor createComponent id "export:todo-react-runtime:create-component" constructs TaskReactComponent : atom-ref<Task>;
operation sourceGet id "export:todo-react-runtime:source-get" : unit -> string mode call receiver atom TaskReactComponent;
operation propsGet id "export:todo-react-runtime:props-get" : unit -> message "org.quixos.web-studio.ReactProps" mode call receiver atom TaskReactComponent requires {
edge subject id "port:todo-react:subject" : exactly-one atom Task [resolve];
state title id "port:todo-react:title" : string [read];
state status id "port:todo-react:status" : string [read];
state priority id "port:todo-react:priority" : string [read];
state notes id "port:todo-react:notes" : string [read];
state dueDate id "port:todo-react:due-date" : string [read];
state energy id "port:todo-react:energy" : string [read];
};
operation propsWatch id "export:todo-react-runtime:props-watch" : unit -> watch-handle mode watch-start emits message "org.quixos.web-studio.ReactProps" receiver atom TaskReactComponent requires {
edge subject id "port:todo-react:subject" : exactly-one atom Task [resolve];
state title id "port:todo-react:title" : string [read];
state status id "port:todo-react:status" : string [read];
state priority id "port:todo-react:priority" : string [read];
state notes id "port:todo-react:notes" : string [read];
state dueDate id "port:todo-react:due-date" : string [read];
state energy id "port:todo-react:energy" : string [read];
};
operation propsWatchStop id "export:todo-react-runtime:props-watch-stop" : watch-handle -> unit mode watch-stop receiver atom TaskReactComponent;
}
package WebStudioCanvasRuntime id "package:org.quixos.web-studio:canvas-runtime" revision "package:org.quixos.web-studio:canvas-runtime@1" source {
repository "https://repos.quixos.org/qxw-02737044acbb57a5-source/package-canvas-runtime.git";
commit "b6bef51b85a7c328214522b7cf75553017deed35";
} {
constructor createCanvas id "export:org.quixos.web-studio.canvas-runtime:create-canvas" constructs WebStudioCanvas : unit;
constructor createPlacement id "export:org.quixos.web-studio.canvas-runtime:create-placement" constructs WebStudioCanvasPlacement : message "org.quixos.web-studio.CreateCanvasPlacement" requires {
state position id "port:web-studio-placement-constructor:position" : message "org.quixos.web-studio.CanvasPosition" [write];
state size id "port:web-studio-placement-constructor:size" : message "org.quixos.web-studio.CanvasSize" [write];
state z id "port:web-studio-placement-constructor:z" : int32 [write];
edge canvas id "port:web-studio-placement-constructor:canvas" : exactly-one interface WebStudioCanvas [connect];
edge subject id "port:web-studio-placement-constructor:subject" : exactly-one interface WebStudioPlaceable [connect];
};
}
import package TodoRuntime;
import package ProjectRuntime;
import package ProjectReactRuntime;
import package TodoReactRuntime;
import package WebStudioCanvasRuntime;
shared state ProjectName id "slot:project:name" on Project : string policy optimistic-register default "Untitled project";
shared state TaskTitle id "slot:task:title" on Task : string policy optimistic-register default "Untitled task";
@@ -375,12 +85,12 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
}
conform Project as WebStudioSearchable {
bind document.get to package ProjectRuntime.searchDocumentGet with {
name to state ProjectName;
tasks to edge ProjectTaskEdge.tasks;
named to interface Named;
tasks to interface ProjectTasks;
};
bind document.watch-start to package ProjectRuntime.searchDocumentWatch with {
name to state ProjectName;
tasks to edge ProjectTaskEdge.tasks;
named to interface Named;
tasks to interface ProjectTasks;
};
bind document.watch-stop to package ProjectRuntime.searchDocumentWatchStop;
}
@@ -415,14 +125,12 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
conform ProjectReactComponent as WebStudioReactComponent {
bind source.get to package ProjectReactRuntime.sourceGet;
bind props.get to package ProjectReactRuntime.propsGet with {
subject to edge ProjectComponentEdge.subject;
name to state ProjectName via edge ProjectComponentEdge.subject;
tasks to edge ProjectTaskEdge.tasks via edge ProjectComponentEdge.subject;
named to interface Named via edge ProjectComponentEdge.subject;
tasks to interface ProjectTasks via edge ProjectComponentEdge.subject;
};
bind props.watch-start to package ProjectReactRuntime.propsWatch with {
subject to edge ProjectComponentEdge.subject;
name to state ProjectName via edge ProjectComponentEdge.subject;
tasks to edge ProjectTaskEdge.tasks via edge ProjectComponentEdge.subject;
named to interface Named via edge ProjectComponentEdge.subject;
tasks to interface ProjectTasks via edge ProjectComponentEdge.subject;
};
bind props.watch-stop to package ProjectReactRuntime.propsWatchStop;
}