Make local graph execution optional across composed packages

This commit is contained in:
Timothy J. Aveni
2026-09-28 21:05:42 -07:00
parent 1e72713ae2
commit e9c15fe40f
87 changed files with 3703 additions and 3400 deletions
+7 -7
View File
@@ -58,12 +58,12 @@ const contract = `external atom Document id "document";
type Event = record { document: atom-ref<Document>; title: string; };
interface Stream id "stream" revision "stream@1" {
operation publish id "publish" : Event -> record { publication: string; } {
call id "publish:call" execution transaction targets [server];
call id "publish:call" execution transaction;
}
queryable value head id "head" : optional<uint64> { get id "head:get" execution snapshot targets [server]; }
queryable value head id "head" : optional<uint64> { get id "head:get" execution snapshot; }
operation readPage id "page" : record { after: optional<string>; limit: uint32; }
-> record { entries: list<record { publication: string; position: uint64; payload: Event; }>; next: optional<string>; asOfHead: optional<uint64>; } {
call id "page:call" execution snapshot targets [server];
call id "page:call" execution snapshot;
}
}`;
const assembly = `workspace Journals id "journals" revision "journals@1" commit "${source.commit}" {
@@ -127,7 +127,7 @@ test("subscription storage infers its typed handler and retains configuration re
`external atom Document id "document";
interface Receiver id "receiver" revision "receiver@1" {
operation receive id "receive" : record { event: record { document: atom-ref<Document>; title: string; }; parameters: string; } -> unit {
call id "receive:call" execution transaction targets [server];
call id "receive:call" execution transaction;
}
}`,
);
@@ -139,12 +139,12 @@ import interface Receiver;
type Start = variant id "start" { future id "future" : unit; retained id "retained" : unit; afterCursor id "after" : string; };
interface Subscription id "subscription" revision "subscription@1" {
operation attach id "attach" : record { source: interface-ref<Stream>; handler: interface-ref<Receiver>; parameters: string; start: Start; } -> unit {
call id "attach:call" execution transaction targets [server];
call id "attach:call" execution transaction;
}
queryable value status id "status" : record { status: string; generation: uint64; cursor: uint64; failure: optional<record { publication: string; code: string; message: string; }>; } {
get id "status:get" execution snapshot targets [server];
get id "status:get" execution snapshot;
}
operation retire id "retire" : unit -> unit { call id "retire:call" execution transaction targets [server]; }
operation retire id "retire" : unit -> unit { call id "retire:call" execution transaction; }
}`,
);
const ws = assembly