instar 1.3.298 → 1.3.299
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 +12 -2
- package/dist/commands/server.js.map +1 -1
- package/dist/core/AgentRegistry.d.ts +28 -5
- package/dist/core/AgentRegistry.d.ts.map +1 -1
- package/dist/core/AgentRegistry.js +53 -7
- package/dist/core/AgentRegistry.js.map +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +10 -2
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/1.3.299.md +21 -0
- package/upgrades/registry-guarded-unregister.eli16.md +13 -0
- package/upgrades/side-effects/registry-guarded-unregister.md +46 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqxDD,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;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkmRtE;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
|
@@ -2175,7 +2175,13 @@ export async function startServer(options) {
|
|
|
2175
2175
|
// detector still runs and falls back to the JSONL append.
|
|
2176
2176
|
let stopHeartbeat;
|
|
2177
2177
|
try {
|
|
2178
|
-
|
|
2178
|
+
// The reRegister callback closes the registry lost-update race: if an
|
|
2179
|
+
// old server generation's shutdown deleted our fresh registration
|
|
2180
|
+
// (back-to-back update restarts), the next heartbeat notices the
|
|
2181
|
+
// missing entry and resurrects it instead of silently no-oping forever.
|
|
2182
|
+
stopHeartbeat = startHeartbeat(config.projectDir, undefined, () => {
|
|
2183
|
+
registerAgent(config.projectDir, config.projectName, config.port);
|
|
2184
|
+
});
|
|
2179
2185
|
}
|
|
2180
2186
|
catch (err) {
|
|
2181
2187
|
// Registry heartbeat is non-critical — server should run without it.
|
|
@@ -10219,8 +10225,12 @@ export async function startServer(options) {
|
|
|
10219
10225
|
stopHeartbeat?.();
|
|
10220
10226
|
}
|
|
10221
10227
|
catch { /* non-critical during shutdown */ }
|
|
10228
|
+
// pid-guarded: only remove OUR OWN registration. An unguarded
|
|
10229
|
+
// unregister-by-path here deletes the successor generation's fresh
|
|
10230
|
+
// entry during back-to-back update restarts (registry lost-update
|
|
10231
|
+
// race) — the agent then vanishes from the registry until restart.
|
|
10222
10232
|
try {
|
|
10223
|
-
unregisterAgent(config.projectDir);
|
|
10233
|
+
unregisterAgent(config.projectDir, { onlyIfPid: process.pid });
|
|
10224
10234
|
}
|
|
10225
10235
|
catch { /* ELOCKED is non-critical during shutdown */ }
|
|
10226
10236
|
scheduler?.stop();
|