Files
luma/Agent/core/pkg.ts
Ole André Vadla Ravnås 92357bfd80 Add LumaCore package + cross-platform scaffolding
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
2026-04-06 18:59:29 +02:00

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;
}
}
}