@sogni-ai/sogni-creative-agent-skill 3.54.2 → 3.54.4

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.
Files changed (35) hide show
  1. package/.agents/skills/sogni-creative-agent-skill/SKILL.md +4 -4
  2. package/.agents/skills/sogni-creative-agent-skill/references/hosted-api.md +4 -2
  3. package/.agents/skills/sogni-creative-agent-skill/references/interactive-worlds.md +3 -0
  4. package/.agents/skills/sogni-creative-agent-skill/references/long-jobs-and-queues.md +22 -5
  5. package/.agents/skills/sogni-creative-agent-skill/references/loop-maker.md +13 -2
  6. package/.agents/skills/sogni-creative-agent-skill/references/models.md +67 -36
  7. package/.agents/skills/sogni-creative-agent-skill/references/personal-loras.md +1 -1
  8. package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +35 -15
  9. package/.claude-plugin/plugin.json +1 -1
  10. package/.codex-plugin/plugin.json +1 -1
  11. package/CHANGELOG.md +24 -0
  12. package/README.md +22 -17
  13. package/SKILL.md +10 -10
  14. package/desktop-extension/manifest.json +1 -1
  15. package/desktop-extension/server/tools.mjs +14 -8
  16. package/generated/creative-agent-runtime.mjs +4 -4
  17. package/llm.txt +1 -1
  18. package/openclaw.plugin.json +3 -3
  19. package/package.json +4 -2
  20. package/plugin-skills/sogni-creative-agent/SKILL.md +2 -2
  21. package/references/hosted-api.md +4 -2
  22. package/references/interactive-worlds.md +3 -0
  23. package/references/long-jobs-and-queues.md +22 -5
  24. package/references/loop-maker.md +13 -2
  25. package/references/models.md +67 -36
  26. package/references/openclaw-config.md +2 -2
  27. package/references/personal-loras.md +1 -1
  28. package/references/video-prompting.md +35 -15
  29. package/skill-package.json +1 -1
  30. package/skills/composition_planning.md +2 -2
  31. package/skills/video_editing.md +1 -1
  32. package/skills/video_generation.md +1 -1
  33. package/sogni-agent.mjs +401 -117
  34. package/sogni-app-id.mjs +50 -0
  35. package/version.mjs +1 -1
package/sogni-app-id.mjs CHANGED
@@ -305,6 +305,56 @@ export function getOrCreateSogniAppId({
305
305
  return processLease.appId;
306
306
  }
307
307
 
308
+ /**
309
+ * Lease the pool slot whose app ID is `appId`, so this process can sign in as
310
+ * that slot and take back the projects it left in flight: the socket delivers a
311
+ * project's events only to the app ID that submitted it. Returns
312
+ * `{ appId, release }` when the slot was free (or is this process's own),
313
+ * `{ heldByPid }` when a live process holds it (never connect as it: the socket
314
+ * would kick that process with SWITCH_CONNECTION), or `null` when `appId` is
315
+ * not one of this installation's slots.
316
+ */
317
+ export function claimSogniAppIdSlot(appId, {
318
+ poolDir = getEnv('SOGNI_APP_ID_POOL_DIR', { trim: true }) || DEFAULT_APP_ID_POOL_DIR,
319
+ isPidAlive = defaultIsPidAlive,
320
+ ownPid = process.pid,
321
+ } = {}) {
322
+ const resolvedPoolDir = expandHomePath(poolDir);
323
+ let names;
324
+ try {
325
+ names = readdirSync(resolvedPoolDir);
326
+ } catch {
327
+ return null;
328
+ }
329
+ for (const name of names.filter((entry) => /^slot-\d+$/.test(entry))) {
330
+ const slotPath = join(resolvedPoolDir, name);
331
+ let slotAppId;
332
+ try { slotAppId = readPersistedAppId(slotPath); } catch { continue; }
333
+ if (slotAppId !== appId) continue;
334
+ const leasePath = `${slotPath}.lease`;
335
+ if (processLease?.leasePath === leasePath) return { appId, release: () => {} };
336
+ if (!tryCreateLease(leasePath, ownPid)) {
337
+ if (!leaseIsStale(leasePath, { isPidAlive, ownPid })) {
338
+ let pid = null;
339
+ try { pid = JSON.parse(readFileSync(leasePath, 'utf8'))?.pid ?? null; } catch { /* unreadable: still held */ }
340
+ return { heldByPid: pid };
341
+ }
342
+ try { unlinkSync(leasePath); } catch { /* another reclaimer won */ }
343
+ if (!tryCreateLease(leasePath, ownPid)) return { heldByPid: null };
344
+ }
345
+ let released = false;
346
+ const release = () => {
347
+ if (released) return;
348
+ released = true;
349
+ process.off('exit', release);
350
+ try { unlinkSync(leasePath); } catch { /* best effort */ }
351
+ };
352
+ process.on('exit', release);
353
+ return { appId, release };
354
+ }
355
+ return null;
356
+ }
357
+
308
358
  /** Diagnostic view of the pool for doctor/debug output. */
309
359
  export function describeSogniAppIdPool({
310
360
  poolDir = getEnv('SOGNI_APP_ID_POOL_DIR', { trim: true }) || DEFAULT_APP_ID_POOL_DIR,
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.54.2';
1
+ export const PACKAGE_VERSION = '3.54.4';