instar 0.23.7 → 0.23.8
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +29 -17
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/setup.d.ts +10 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +139 -2
- package/dist/commands/setup.js.map +1 -1
- package/dist/core/SessionManager.d.ts +2 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +45 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +35 -8
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/dist/messaging/TelegramAdapter.d.ts +7 -0
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +53 -14
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +4 -4
- package/upgrades/0.23.8.md +38 -0
- package/upgrades/NEXT.md +21 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8gCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8gCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAy1EtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -3212,27 +3212,39 @@ export async function startServer(options) {
|
|
|
3212
3212
|
const hasTelegram = !!telegram;
|
|
3213
3213
|
const autostartInstalled = isAutostartInstalled(config.projectName);
|
|
3214
3214
|
let needsReinstall = !autostartInstalled;
|
|
3215
|
-
// On macOS,
|
|
3216
|
-
if (
|
|
3217
|
-
|
|
3218
|
-
const plistPath = path.join(os.homedir(), 'Library', 'LaunchAgents', `${label}.plist`);
|
|
3215
|
+
// On macOS, keep node symlink fresh and check plist format
|
|
3216
|
+
if (process.platform === 'darwin') {
|
|
3217
|
+
// Always update the node symlink — primary defense against NVM/asdf switches
|
|
3219
3218
|
try {
|
|
3220
|
-
const
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3219
|
+
const { ensureStableNodeSymlink } = await import('./setup.js');
|
|
3220
|
+
ensureStableNodeSymlink(config.projectDir);
|
|
3221
|
+
}
|
|
3222
|
+
catch { /* non-critical */ }
|
|
3223
|
+
if (!needsReinstall) {
|
|
3224
|
+
const label = `ai.instar.${config.projectName}`;
|
|
3225
|
+
const plistPath = path.join(os.homedir(), 'Library', 'LaunchAgents', `${label}.plist`);
|
|
3226
|
+
try {
|
|
3227
|
+
const plistContent = fs.readFileSync(plistPath, 'utf-8');
|
|
3228
|
+
if (!plistContent.includes('instar-boot.js')) {
|
|
3229
|
+
needsReinstall = true;
|
|
3230
|
+
console.log(pc.yellow(` Auto-start uses legacy format — upgrading to TCC-safe node entry point`));
|
|
3231
|
+
}
|
|
3232
|
+
else if (!plistContent.includes('.instar/bin/node')) {
|
|
3229
3233
|
needsReinstall = true;
|
|
3230
|
-
console.log(pc.yellow(` Auto-start node path
|
|
3234
|
+
console.log(pc.yellow(` Auto-start uses direct node path — upgrading to stable symlink`));
|
|
3235
|
+
}
|
|
3236
|
+
else {
|
|
3237
|
+
// Verify node path in plist still exists (should be the symlink)
|
|
3238
|
+
const nodeMatch = plistContent.match(/<string>(\/[^<]+node[^<]*)<\/string>/);
|
|
3239
|
+
if (nodeMatch && !fs.existsSync(nodeMatch[1])) {
|
|
3240
|
+
needsReinstall = true;
|
|
3241
|
+
console.log(pc.yellow(` Auto-start node path stale (${nodeMatch[1]}) — regenerating`));
|
|
3242
|
+
}
|
|
3231
3243
|
}
|
|
3232
3244
|
}
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3245
|
+
catch { /* plist read failed — will reinstall */
|
|
3246
|
+
needsReinstall = true;
|
|
3247
|
+
}
|
|
3236
3248
|
}
|
|
3237
3249
|
}
|
|
3238
3250
|
if (needsReinstall) {
|