Add activated workspace reflection and Studio definition watches
Expose bounded snapshot-bound definition reads and latest-only watches from the serving checked bundle. Add checked reflection dependency ports, generated SDK bindings and selector-scoped invocation authority. Move Studio factory, contract and query discovery to public reflection inventories. Share an active-definition watch across canvas and standalone routes and invalidate/reload on epoch changes instead of polling GetWorkspace. Document the API and deferred scope; cover compiler/codegen, SDK injection, transport authorization, activation publication, pagination and reconnect behavior. Keep all work local; no deployment or publication.
This commit is contained in:
@@ -43,6 +43,7 @@ test("runtime conformance descriptors preserve closed and universal collection i
|
||||
};
|
||||
operation inspect<object Item> id "inspect" : ref<Item> -> unit mode call receiver any requires {
|
||||
interface items id "items" : Collection<Item>;
|
||||
reflection metadata id "metadata" [atoms, interfaces];
|
||||
};
|
||||
}`,
|
||||
{ source, environment: { interfaces: new Map([["Collection", collection.resource.revision]]) } },
|
||||
@@ -77,6 +78,11 @@ test("runtime conformance descriptors preserve closed and universal collection i
|
||||
return null;
|
||||
},
|
||||
inspect: async (context) => {
|
||||
await context.ports.metadata.read({selector:{kind:"atoms",interfaceRevisionId:"named"}});
|
||||
// @ts-expect-error Queries are outside this port's declared authority.
|
||||
await context.ports.metadata.read({selector:{kind:"queries"}});
|
||||
// @ts-expect-error Interface inventory does not support atom filters.
|
||||
await context.ports.metadata.read({selector:{kind:"interfaces",atomId:"book"}});
|
||||
const view = await context.conform.tryConform(context.objectId, context.ports.items.contract);
|
||||
if (view) await view["items.connect"](context.input);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user