instar 1.2.79 → 1.2.81
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 +31 -10
- package/dist/commands/server.js.map +1 -1
- package/dist/core/SessionManager.d.ts +14 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +41 -1
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/messaging/MessageRouter.d.ts +8 -0
- package/dist/messaging/MessageRouter.d.ts.map +1 -1
- package/dist/messaging/MessageRouter.js +37 -0
- package/dist/messaging/MessageRouter.js.map +1 -1
- package/dist/server/routes.d.ts +10 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +40 -5
- package/dist/server/routes.js.map +1 -1
- package/dist/threadline/ThreadResumeMap.d.ts.map +1 -1
- package/dist/threadline/ThreadResumeMap.js +10 -2
- package/dist/threadline/ThreadResumeMap.js.map +1 -1
- package/dist/threadline/TopicLinkageHandler.d.ts +7 -2
- package/dist/threadline/TopicLinkageHandler.d.ts.map +1 -1
- package/dist/threadline/TopicLinkageHandler.js +33 -18
- package/dist/threadline/TopicLinkageHandler.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +47 -47
- package/upgrades/1.2.80.md +28 -0
- package/upgrades/1.2.81.md +27 -0
- package/upgrades/side-effects/enable-layer-coherence.md +74 -0
- package/upgrades/side-effects/threadline-reply-surfacing.md +68 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0QH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiqDD,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;AA0QH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiqDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgkMtE;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
|
@@ -2372,14 +2372,23 @@ export async function startServer(options) {
|
|
|
2372
2372
|
});
|
|
2373
2373
|
console.log(pc.green(` Quota tracking enabled (${quotaFile})`));
|
|
2374
2374
|
}
|
|
2375
|
-
// Set up opt-in telemetry heartbeat
|
|
2375
|
+
// Set up opt-in telemetry heartbeat.
|
|
2376
|
+
// ALWAYS construct, even when disabled — fixes the chicken-and-egg deadlock
|
|
2377
|
+
// where POST /telemetry/enable returned 503 because the subsystem was only
|
|
2378
|
+
// constructed when telemetry was already enabled at boot (so it could never
|
|
2379
|
+
// be turned on through its own endpoint). Construction is cheap and pure;
|
|
2380
|
+
// the side-effects (.start()/submit()) already self-gate on `config.enabled`
|
|
2381
|
+
// inside TelemetryHeartbeat, so an always-constructed-but-disabled heartbeat
|
|
2382
|
+
// never starts a loop and never submits. Spec: docs/specs/enable-layer-coherence.md
|
|
2376
2383
|
let telemetryHeartbeat;
|
|
2377
|
-
|
|
2384
|
+
{
|
|
2378
2385
|
const { TelemetryHeartbeat } = await import('../monitoring/TelemetryHeartbeat.js');
|
|
2379
|
-
telemetryHeartbeat = new TelemetryHeartbeat(config.monitoring
|
|
2386
|
+
telemetryHeartbeat = new TelemetryHeartbeat(config.monitoring?.telemetry ?? { enabled: false }, config.stateDir, config.projectDir, config.version || 'unknown');
|
|
2380
2387
|
// Note: .start() is deferred until after scheduler is available so
|
|
2381
|
-
// TelemetryCollector can be wired
|
|
2382
|
-
|
|
2388
|
+
// TelemetryCollector can be wired; .start() itself no-ops when disabled.
|
|
2389
|
+
if (config.monitoring?.telemetry?.enabled) {
|
|
2390
|
+
console.log(pc.green(` Telemetry: enabled (${config.monitoring.telemetry.level || 'basic'} level, every ${Math.round((config.monitoring.telemetry.intervalMs || 21600000) / 3600000)}h)`));
|
|
2391
|
+
}
|
|
2383
2392
|
}
|
|
2384
2393
|
// ── Prompt Gate: detect and handle interactive prompts in sessions ──
|
|
2385
2394
|
const promptGateConfig = config.monitoring?.promptGate;
|
|
@@ -6263,10 +6272,13 @@ export async function startServer(options) {
|
|
|
6263
6272
|
salienceGate,
|
|
6264
6273
|
messageStore,
|
|
6265
6274
|
localAgent: config.projectName,
|
|
6266
|
-
injectIntoSession: (sessionName, text) => {
|
|
6275
|
+
injectIntoSession: async (sessionName, text) => {
|
|
6276
|
+
// Confirm the inject actually submitted (not left stuck at the prompt
|
|
6277
|
+
// by the paste-end race). A bare dispatch returning true is the A2 bug:
|
|
6278
|
+
// a stalled inject must NOT count as delivered, so the Telegram fallback
|
|
6279
|
+
// surfaces the reply instead.
|
|
6267
6280
|
try {
|
|
6268
|
-
sessionManager.
|
|
6269
|
-
return true;
|
|
6281
|
+
return await sessionManager.injectPasteNotificationConfirmed(sessionName, text);
|
|
6270
6282
|
}
|
|
6271
6283
|
catch {
|
|
6272
6284
|
return false;
|
|
@@ -6698,8 +6710,17 @@ export async function startServer(options) {
|
|
|
6698
6710
|
}
|
|
6699
6711
|
}
|
|
6700
6712
|
}
|
|
6701
|
-
// Phase 2b: Route to warm listener if available and appropriate
|
|
6702
|
-
|
|
6713
|
+
// Phase 2b: Route to warm listener if available and appropriate.
|
|
6714
|
+
// EXCEPT topic-bound replies: a reply on a thread bound to a Telegram
|
|
6715
|
+
// topic must reach handleInboundMessage → TopicLinkageHandler so it
|
|
6716
|
+
// surfaces in the bound topic. The listener inbox is a side-channel
|
|
6717
|
+
// that never surfaces to the topic — routing a topic-bound reply there
|
|
6718
|
+
// is exactly the relay-path leak (A1-relay) that makes the reply vanish
|
|
6719
|
+
// for the user even though transport succeeded. (The pipe-spawn branch
|
|
6720
|
+
// above is already excluded for topic-bound threads via its
|
|
6721
|
+
// `!threadResumeMap.get(...)` guard, now that get() no longer nulls them.)
|
|
6722
|
+
const isTopicBoundReply = !!msg.threadId && threadResumeMap.get(msg.threadId)?.originTopicId !== undefined;
|
|
6723
|
+
if (listenerManager && listenerManager.shouldUseListener(trustLevel, textContent.length) && !isTopicBoundReply) {
|
|
6703
6724
|
listenerManager.writeToInbox({ from: senderFingerprint, senderName, trustLevel, threadId: msg.threadId ?? getSyntheticThreadId(senderFingerprint), text: textContent });
|
|
6704
6725
|
console.log(`[relay] Routed to listener inbox from ${senderName} (trust: ${trustLevel})`);
|
|
6705
6726
|
return;
|