@wipcomputer/wip-ldm-os 0.4.51 → 0.4.53

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 (3) hide show
  1. package/SKILL.md +1 -1
  2. package/lib/deploy.mjs +24 -11
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -9,7 +9,7 @@ license: MIT
9
9
  compatibility: Requires git, npm, node. Node.js 18+.
10
10
  metadata:
11
11
  display-name: "LDM OS"
12
- version: "0.4.51"
12
+ version: "0.4.53"
13
13
  homepage: "https://github.com/wipcomputer/wip-ldm-os"
14
14
  author: "Parker Todd Brooks"
15
15
  category: infrastructure
package/lib/deploy.mjs CHANGED
@@ -86,7 +86,7 @@ function updateRegistry(name, info) {
86
86
  registry.extensions[name] = {
87
87
  ...existing,
88
88
  ...info,
89
- enabled: existing?.enabled ?? isCore,
89
+ enabled: existing?.enabled ?? true,
90
90
  updatedAt: new Date().toISOString(),
91
91
  };
92
92
  saveRegistry(registry);
@@ -650,10 +650,16 @@ function installClaudeCodeHook(repoPath, door) {
650
650
  }
651
651
 
652
652
  function installSkill(repoPath, toolName) {
653
- const skillSrc = join(repoPath, 'SKILL.md');
653
+ let skillSrc = join(repoPath, 'SKILL.md');
654
654
  const ocSkillDir = join(OC_ROOT, 'skills', toolName);
655
655
  const ocSkillDest = join(ocSkillDir, 'SKILL.md');
656
656
 
657
+ // If the original source is gone (tmp clone cleaned up), use the already-deployed OC copy
658
+ if (!existsSync(skillSrc) && existsSync(ocSkillDest)) {
659
+ skillSrc = ocSkillDest;
660
+ }
661
+ if (!existsSync(skillSrc)) return false;
662
+
657
663
  if (existsSync(ocSkillDest)) {
658
664
  try {
659
665
  const srcContent = readFileSync(skillSrc, 'utf8');
@@ -685,7 +691,11 @@ function installSkill(repoPath, toolName) {
685
691
  ok(`Skill: deployed to ~/.openclaw/skills/ and ~/.claude/skills/`);
686
692
 
687
693
  // Deploy references/ if it exists (Agent Skills Spec pattern)
688
- const refsSrc = join(repoPath, 'references');
694
+ let refsSrc = join(repoPath, 'references');
695
+ // Fallback to already-deployed OC copy if source is gone
696
+ if (!existsSync(refsSrc) && existsSync(join(ocSkillDir, 'references'))) {
697
+ refsSrc = join(ocSkillDir, 'references');
698
+ }
689
699
  if (existsSync(refsSrc)) {
690
700
  // To OpenClaw skill dir
691
701
  cpSync(refsSrc, join(ocSkillDir, 'references'), { recursive: true });
@@ -814,29 +824,32 @@ export function installSingleTool(toolPath) {
814
824
  }
815
825
  }
816
826
 
817
- // Only register MCP, hooks, and skills if extension is enabled (#111)
827
+ // Deploy MCP, hooks, and skills for any extension that is enabled OR already deployed.
828
+ // Extensions installed before the enable/disable system have enabled=false in the registry
829
+ // but are already running (MCP registered, hooks in settings.json). Don't block their updates.
818
830
  const registry = loadRegistry();
819
- const isEnabled = registry.extensions?.[toolName]?.enabled ?? CORE_EXTENSIONS.has(toolName);
831
+ const registryEntry = registry.extensions?.[toolName];
832
+ const isEnabled = registryEntry?.enabled ?? CORE_EXTENSIONS.has(toolName);
833
+ const isAlreadyDeployed = registryEntry?.ldmPath && existsSync(registryEntry.ldmPath);
820
834
 
821
835
  if (interfaces.mcp) {
822
- if (isEnabled) {
836
+ if (isEnabled || isAlreadyDeployed) {
823
837
  if (registerMCP(toolPath, interfaces.mcp, toolName)) installed++;
824
838
  } else {
825
- skip(`MCP: ${toolName} installed but not enabled. Run: ldm enable ${toolName}`);
839
+ skip(`MCP: ${toolName} not enabled. Run: ldm enable ${toolName}`);
826
840
  }
827
841
  }
828
842
 
829
843
  if (interfaces.claudeCodeHook) {
830
- if (isEnabled) {
844
+ if (isEnabled || isAlreadyDeployed) {
831
845
  if (installClaudeCodeHook(toolPath, interfaces.claudeCodeHook)) installed++;
832
846
  } else {
833
- skip(`Hook: ${toolName} installed but not enabled`);
847
+ skip(`Hook: ${toolName} not enabled`);
834
848
  }
835
849
  }
836
850
 
837
851
  if (interfaces.skill) {
838
- // Skills always deploy regardless of enabled state.
839
- // They're instruction files (SKILL.md), not running code.
852
+ // Skills always deploy. They're instruction files, not running code.
840
853
  if (installSkill(toolPath, toolName)) installed++;
841
854
  }
842
855
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.51",
3
+ "version": "0.4.53",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "engines": {