@wipcomputer/wip-ldm-os 0.4.58 → 0.4.59
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.
- package/SKILL.md +1 -1
- package/bin/ldm.js +24 -0
- package/package.json +1 -1
- package/shared/launchagents/ai.openclaw.ldm-backup.plist +31 -0
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.
|
|
12
|
+
version: "0.4.59"
|
|
13
13
|
homepage: "https://github.com/wipcomputer/wip-ldm-os"
|
|
14
14
|
author: "Parker Todd Brooks"
|
|
15
15
|
category: infrastructure
|
package/bin/ldm.js
CHANGED
|
@@ -594,6 +594,30 @@ async function cmdInit() {
|
|
|
594
594
|
} catch {}
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
+
// Deploy LaunchAgents to ~/Library/LaunchAgents/
|
|
598
|
+
const launchSrc = join(__dirname, '..', 'shared', 'launchagents');
|
|
599
|
+
const launchDest = join(HOME, 'Library', 'LaunchAgents');
|
|
600
|
+
if (existsSync(launchSrc) && existsSync(launchDest)) {
|
|
601
|
+
let launchCount = 0;
|
|
602
|
+
for (const file of readdirSync(launchSrc)) {
|
|
603
|
+
if (!file.endsWith('.plist')) continue;
|
|
604
|
+
const src = join(launchSrc, file);
|
|
605
|
+
const dest = join(launchDest, file);
|
|
606
|
+
const srcContent = readFileSync(src, 'utf8');
|
|
607
|
+
const destContent = existsSync(dest) ? readFileSync(dest, 'utf8') : '';
|
|
608
|
+
if (srcContent !== destContent) {
|
|
609
|
+
// Unload old, write new, load new
|
|
610
|
+
try { execSync(`launchctl unload "${dest}" 2>/dev/null`, { stdio: 'pipe' }); } catch {}
|
|
611
|
+
cpSync(src, dest);
|
|
612
|
+
try { execSync(`launchctl load "${dest}" 2>/dev/null`, { stdio: 'pipe' }); } catch {}
|
|
613
|
+
launchCount++;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
if (launchCount > 0) {
|
|
617
|
+
console.log(` + ${launchCount} LaunchAgent(s) deployed to ~/Library/LaunchAgents/`);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
597
621
|
console.log('');
|
|
598
622
|
console.log(` LDM OS v${PKG_VERSION} initialized at ${LDM_ROOT}`);
|
|
599
623
|
console.log('');
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>Label</key>
|
|
6
|
+
<string>ai.openclaw.ldm-backup</string>
|
|
7
|
+
<key>ProgramArguments</key>
|
|
8
|
+
<array>
|
|
9
|
+
<string>bash</string>
|
|
10
|
+
<string>/Users/lesa/.ldm/bin/ldm-backup.sh</string>
|
|
11
|
+
</array>
|
|
12
|
+
<key>StartCalendarInterval</key>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>Hour</key>
|
|
15
|
+
<integer>3</integer>
|
|
16
|
+
<key>Minute</key>
|
|
17
|
+
<integer>0</integer>
|
|
18
|
+
</dict>
|
|
19
|
+
<key>StandardOutPath</key>
|
|
20
|
+
<string>/Users/lesa/.ldm/logs/backup.log</string>
|
|
21
|
+
<key>StandardErrorPath</key>
|
|
22
|
+
<string>/Users/lesa/.ldm/logs/backup.log</string>
|
|
23
|
+
<key>EnvironmentVariables</key>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>HOME</key>
|
|
26
|
+
<string>/Users/lesa</string>
|
|
27
|
+
<key>PATH</key>
|
|
28
|
+
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
29
|
+
</dict>
|
|
30
|
+
</dict>
|
|
31
|
+
</plist>
|