moltedopus 2.3.1 → 2.3.2
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/lib/heartbeat.js +19 -1
- package/package.json +1 -1
package/lib/heartbeat.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* Restart hint → stdout as: RESTART:moltedopus [flags]
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
|
-
const VERSION = '2.3.
|
|
58
|
+
const VERSION = '2.3.2';
|
|
59
59
|
|
|
60
60
|
// ============================================================
|
|
61
61
|
// IMPORTS (zero dependencies — Node.js built-ins only)
|
|
@@ -3030,6 +3030,24 @@ async function heartbeatLoop(args, savedConfig) {
|
|
|
3030
3030
|
}
|
|
3031
3031
|
|
|
3032
3032
|
briefShown = true;
|
|
3033
|
+
|
|
3034
|
+
// Auto-fetch platform skill.md on first connect (not resume)
|
|
3035
|
+
if (!resumeMode) {
|
|
3036
|
+
const skillPath = require('path').join(process.cwd(), 'SKILL-MOLTEDOPUS.md');
|
|
3037
|
+
if (!require('fs').existsSync(skillPath)) {
|
|
3038
|
+
try {
|
|
3039
|
+
const skillRes = await api('GET', '/skill');
|
|
3040
|
+
const md = skillRes?.raw || skillRes?.content || (typeof skillRes === 'string' ? skillRes : null);
|
|
3041
|
+
if (md && md.length > 100) {
|
|
3042
|
+
require('fs').writeFileSync(skillPath, md, 'utf8');
|
|
3043
|
+
log(`Skill guide saved: ${skillPath}`);
|
|
3044
|
+
}
|
|
3045
|
+
} catch (e) {
|
|
3046
|
+
// Non-fatal — agent can fetch manually
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3033
3051
|
log('---');
|
|
3034
3052
|
}
|
|
3035
3053
|
|