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
+9 -8
View File
@@ -14,7 +14,7 @@ import { parseControllerCatalog, validateControllers } from "../src/capability-m
const source = { repository: "https://example.test/contracts.git", commit: "a".repeat(40) };
const parsed = compileCapabilityResourceSource(
`interface Data id "data" revision "data@1" {
queryable portable value label id "label" : string { get id "label:get" execution snapshot targets [browser, server]; }
queryable portable value label id "label" : string { get id "label:get" execution snapshot; }
operation publish id "publish" : string -> unit { call id "publish:call"; }
}`,
{ source },
@@ -26,20 +26,20 @@ test("native fields certify one storage slot; only browser writes get live descr
const parsed = compileCapabilityResourceSource(
`interface Fields id "fields" revision "fields@1" {
queryable field position id "position" : string {
get id "position:get" execution snapshot targets [browser, server];
set id "position:set" execution transaction targets [browser, server];
get id "position:get" execution snapshot;
set id "position:set" execution transaction;
}
field remote id "remote" : string {
get id "remote:get";
set id "remote:set";
}
value arbitrary id "arbitrary" : string {
get id "arbitrary:get" execution snapshot targets [browser,server];
set id "arbitrary:set" execution transaction targets [browser, server];
get id "arbitrary:get" execution snapshot;
set id "arbitrary:set" execution transaction;
}
value text id "text" : string {
get id "text:get";
edit id "text:edit" execution transaction targets [browser, server];
edit id "text:edit" execution transaction;
}
}`,
{ source },
@@ -92,8 +92,9 @@ test("native fields certify one storage slot; only browser writes get live descr
const goodForward = compileCapabilitySource(forwarded, "workspace.qx", env);
assert.ok(goodForward.ok, JSON.stringify(goodForward.diagnostics));
const pkg = compileCapabilityResourceSource(
`package Setter id "setter" revision "setter@1" {
operation replaceValue id "write" : string -> unit mode call execution transaction targets [browser,server] receiver any;
`symbol JavaScript id "target:org.quixos.execution.javascript@1";
package Setter id "setter" revision "setter@1" {
operation replaceValue id "write" : string -> unit mode call execution transaction targets [JavaScript,server] receiver any;
}`,
{ source },
);