fix: ship capability packs and starter skills, report the usable model (UF-066, UF-067)

The SDK reads pack manifests and starter skills next to its own module,
which in the bundle is service.js, and no build step copied them there:
installed builds showed no packs and no starter skills. build-sidecar now
copies both folders next to service.js and Tauri bundles them (UF-066).

GET /api/agent/status returned the configured model even when it had no
key, so the status bar named Claude while chats ran on the local model.
It now resolves the model the way the chat route does (UF-067).
This commit is contained in:
shumeiko.it
2026-11-01 11:15:37 +01:00
parent 8e528b3467
commit bf74f02420
9 changed files with 102 additions and 15 deletions

View File

@@ -298,6 +298,20 @@ try {
fs.rmSync(marketplaceTemp, { force: true });
}
console.log('[build-sidecar] Copied canonical marketplace.db');
// @waggle/sdk reads its capability packs and starter skills from disk, next
// to its own module. In the bundle that module is service.js, so the files
// go next to it (getCapabilityPacksDir, getStarterSkillsDir).
for (const [name, extension] of [['capability-packs', '.json'], ['starter-skills', '.md']]) {
const source = path.join(root, 'packages', 'sdk', 'src', name);
const target = path.join(resourcesDir, name);
fs.rmSync(target, { recursive: true, force: true });
if (!fs.existsSync(source)) continue;
fs.mkdirSync(target, { recursive: true });
const files = fs.readdirSync(source).filter((file) => file.endsWith(extension));
for (const file of files) fs.copyFileSync(path.join(source, file), path.join(target, file));
console.log(`[build-sidecar] Copied ${files.length} ${name} files`);
}
} catch (err) {
console.error('[build-sidecar] Build failed:', err.message);
process.exit(1);