2026-09-28 20:29:21 -07:00
|
|
|
symbol JavaScript id "target:org.quixos.execution.javascript@1";
|
2026-09-20 22:57:27 -07:00
|
|
|
external atom Note id "compound:note";
|
|
|
|
|
type Content = record { text: string; tags: list<string>; };
|
|
|
|
|
type Edit = record { change: change<Content>; resolved: bool; };
|
|
|
|
|
package EditRuntime id "compound:runtime" revision "compound:runtime@1" {
|
2026-09-20 23:07:09 -07:00
|
|
|
operation batch id "compound:runtime:batch" : record { edits: list<Edit>; } -> unit
|
2026-09-28 20:29:21 -07:00
|
|
|
mode call execution transaction targets [JavaScript, server] receiver atom Note requires {
|
2026-09-20 23:07:09 -07:00
|
|
|
state content id "compound:batch:content" : Content [edit];
|
|
|
|
|
state resolved id "compound:batch:resolved" : bool [write];
|
|
|
|
|
} accept using checkBatch;
|
|
|
|
|
operation checkBatch id "compound:runtime:check-batch" : record { edits: list<Edit>; } -> unit
|
|
|
|
|
mode call execution snapshot targets [server] receiver atom Note requires {
|
|
|
|
|
state allowed id "compound:batch:allowed" : bool [read];
|
|
|
|
|
};
|
2026-09-20 22:57:27 -07:00
|
|
|
operation update id "compound:runtime:update" : Edit -> unit
|
2026-09-28 20:29:21 -07:00
|
|
|
mode call execution transaction targets [JavaScript, server] receiver atom Note requires {
|
2026-09-20 22:57:27 -07:00
|
|
|
state content id "compound:edit:content" : Content [edit];
|
|
|
|
|
state resolved id "compound:edit:resolved" : bool [write];
|
|
|
|
|
} accept using check;
|
|
|
|
|
operation check id "compound:runtime:check" : Edit -> unit
|
|
|
|
|
mode call execution snapshot targets [server] receiver atom Note requires {
|
|
|
|
|
state allowed id "compound:check:allowed" : bool [read];
|
|
|
|
|
};
|
|
|
|
|
}
|