Lay the groundwork for a GTK/Adwaita frontend by extracting shared infrastructure into a LumaCore Swift package. Agent sources and LumaBundleCompiler move to top-level locations so both the Xcode project and SPM can reference them. New structure: - Package.swift: root manifest with LumaCore lib + compiler - Sources/LumaCore/: engine, persistence, models, and platform-abstracted token store - Sources/LumaBundleCompiler/: moved from LumaBundleCompiler/ - Agent/: moved from Luma/Agent/ - LumaGtk/: skeleton GTK app package
16 lines
405 B
TypeScript
16 lines
405 B
TypeScript
type PackageBundle = {
|
|
name: string;
|
|
bundle: string;
|
|
globalAlias?: string;
|
|
};
|
|
|
|
export async function loadPackages(bundles: PackageBundle[]): Promise<void> {
|
|
for (const { name, bundle, globalAlias } of bundles) {
|
|
const ns = await Script.load(name, bundle);
|
|
|
|
if (globalAlias !== undefined) {
|
|
(globalThis as any)[globalAlias] = ns.default ?? ns;
|
|
}
|
|
}
|
|
}
|