refactor(api): colocate gateway and remote assembly

This commit is contained in:
imccyu
2026-08-07 15:48:29 +08:00
parent d941350227
commit bb61dc13f2
82 changed files with 645 additions and 432 deletions

View File

@@ -41,6 +41,7 @@ export type {
InvocationDescriptor,
InvocationParameterDescriptor,
InvocationSourceLocation,
TypeRTClientApi,
TypeRTClientContextBinder,
TypeRTCodec,
TypeRTContext,

View File

@@ -176,6 +176,16 @@ export interface TypeRTRemoteContribution {
readonly descriptors: readonly InvocationDescriptor[]
}
/** Client API capability implemented by the Gateway and consumed by Remote assemblies. */
export interface TypeRTClientApi extends TypeRTRemoteNamespaceMap {
/**
* Mount one generated Host-for-Client contribution in the caller's fiber.
* @param contribution - explicitly selected Remote package artifact.
* @returns disposer withdrawing descriptors and concrete methods together.
*/
mount(contribution: TypeRTRemoteContribution): TypeRTDisposer
}
/**
* Resolve one validated wire identity, synchronously or asynchronously.
* @param id - validated wire identity.