@exulu/backend 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -464,6 +464,30 @@ async function resolvePythonVenvPath(): Promise<string | undefined> {
464
464
  }
465
465
  }
466
466
 
467
+ /**
468
+ * Re-installs the given skills into an existing session sandbox regardless of
469
+ * the versions already present — the "reload skills" action after a skill was
470
+ * created or updated in the same conversation. Without a sandbox for the
471
+ * session there is nothing to refresh: the next turn builds one from scratch.
472
+ */
473
+ export async function refreshSessionSkills(
474
+ sessionId: string,
475
+ skills: SkillRef[],
476
+ config: ExuluConfig,
477
+ ): Promise<{ refreshed: number; sandbox: boolean }> {
478
+ const cached = sandboxCache.get(sessionId)
479
+ if (!cached) return { refreshed: 0, sandbox: false }
480
+ const skillsDirectory = join(cached.handle.sessionDir, 'skills')
481
+ let refreshed = 0
482
+ for (const skill of skills) {
483
+ await rm(join(skillsDirectory, skill.name), { recursive: true, force: true })
484
+ await downloadSkill(skill, skillsDirectory, config)
485
+ cached.installedSkills.set(skill.id, skill.current_version)
486
+ refreshed++
487
+ }
488
+ return { refreshed, sandbox: true }
489
+ }
490
+
467
491
  export async function createSessionSandbox(
468
492
  sessionId: string,
469
493
  skills: SkillRef[],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu B.V.",
4
- "version": "5.3.0",
4
+ "version": "5.5.0",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {
@@ -25,6 +25,8 @@
25
25
  "scripts": {
26
26
  "preinstall": "node -e \"if (process.version !== 'v22.18.0') { console.error('❌ Wrong Node.js version. Expected v22.18.0, got ' + process.version); process.exit(1); }\"",
27
27
  "postinstall": "node scripts/postinstall.cjs",
28
+ "generate:bundled-skills": "tsx scripts/generate-bundled-skills.ts",
29
+ "prebuild": "npm run generate:bundled-skills",
28
30
  "build": "tsup",
29
31
  "dev": "npm link && tsup --watch",
30
32
  "prepare": "husky",