instar 0.25.3 → 0.25.5
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 +34 -3
- package/dist/commands/server.js.map +1 -1
- package/dist/core/ContextHierarchy.d.ts +1 -0
- package/dist/core/ContextHierarchy.d.ts.map +1 -1
- package/dist/core/ContextHierarchy.js +84 -0
- package/dist/core/ContextHierarchy.js.map +1 -1
- package/dist/core/EvolutionManager.d.ts +30 -0
- package/dist/core/EvolutionManager.d.ts.map +1 -1
- package/dist/core/EvolutionManager.js +131 -0
- package/dist/core/EvolutionManager.js.map +1 -1
- package/dist/lifeline/ServerSupervisor.d.ts.map +1 -1
- package/dist/lifeline/ServerSupervisor.js +3 -2
- package/dist/lifeline/ServerSupervisor.js.map +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts +4 -0
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +19 -0
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/dist/messaging/slack/SlackAdapter.d.ts +37 -2
- package/dist/messaging/slack/SlackAdapter.d.ts.map +1 -1
- package/dist/messaging/slack/SlackAdapter.js +150 -3
- package/dist/messaging/slack/SlackAdapter.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +18 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +57 -49
- package/src/templates/scripts/smart-fetch.py +215 -0
- package/upgrades/0.25.4.md +24 -0
- package/upgrades/0.25.5.md +19 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkoCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAslHtE;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
|
@@ -426,6 +426,17 @@ async function spawnSessionForTopic(sessionManager, telegram, sessionName, topic
|
|
|
426
426
|
bootstrapMessage = `[telegram:${topicId}] ${msg}`;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
+
// Large bootstrap messages (e.g. CONTINUATION context with full thread history)
|
|
430
|
+
// can exceed tmux send-keys limits. Write to a temp file and inject a reference,
|
|
431
|
+
// same pattern as injectTelegramMessage's FILE_THRESHOLD.
|
|
432
|
+
const BOOTSTRAP_FILE_THRESHOLD = 500;
|
|
433
|
+
if (bootstrapMessage.length > BOOTSTRAP_FILE_THRESHOLD) {
|
|
434
|
+
const bootstrapFilename = `bootstrap-${topicId}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}.txt`;
|
|
435
|
+
const bootstrapFilepath = path.join(tmpDir, bootstrapFilename);
|
|
436
|
+
fs.writeFileSync(bootstrapFilepath, bootstrapMessage);
|
|
437
|
+
console.log(`[spawnSessionForTopic] Bootstrap message too large (${bootstrapMessage.length} chars), wrote to ${bootstrapFilepath}`);
|
|
438
|
+
bootstrapMessage = `[IMPORTANT: Read ${bootstrapFilepath} — it contains your full session context, conversation history, and the user's latest message. You MUST read this file before responding.]`;
|
|
439
|
+
}
|
|
429
440
|
// Check for a resume UUID from a previously-killed session on this topic.
|
|
430
441
|
// TopicResumeMap is authoritative — it saved the UUID for this specific topic at kill time
|
|
431
442
|
// or via the refresh heartbeat. Skip LLM validation (which was failing due to JSONL sampling
|
|
@@ -2515,10 +2526,15 @@ export async function startServer(options) {
|
|
|
2515
2526
|
clearTimeout(timer);
|
|
2516
2527
|
}
|
|
2517
2528
|
};
|
|
2518
|
-
//
|
|
2529
|
+
// Wire intelligence provider for LLM-gated stall confirmation
|
|
2530
|
+
if (sharedIntelligence) {
|
|
2531
|
+
slackAdapter.intelligence = sharedIntelligence;
|
|
2532
|
+
}
|
|
2533
|
+
// Start stall detection timer (with promise tracking)
|
|
2519
2534
|
const stallTimeout = slackConfig.config.stallTimeoutMinutes ?? 5;
|
|
2535
|
+
const promiseTimeout = slackConfig.config.promiseTimeoutMinutes ?? 10;
|
|
2520
2536
|
if (stallTimeout > 0) {
|
|
2521
|
-
slackAdapter.startStallDetection(stallTimeout * 60 * 1000);
|
|
2537
|
+
slackAdapter.startStallDetection(stallTimeout * 60 * 1000, promiseTimeout * 60 * 1000);
|
|
2522
2538
|
}
|
|
2523
2539
|
// Wire session management callbacks for slash commands
|
|
2524
2540
|
slackAdapter.onInterruptSession = async (sessionName) => {
|
|
@@ -2559,7 +2575,7 @@ export async function startServer(options) {
|
|
|
2559
2575
|
sessionManager.sendKey(sessionName, value);
|
|
2560
2576
|
console.log(`[slack] Prompt response injected: session="${sessionName}" key="${value}"`);
|
|
2561
2577
|
};
|
|
2562
|
-
// Standby commands will be wired after PresenceProxy
|
|
2578
|
+
// Standby commands and triage status will be wired after PresenceProxy/TriageOrchestrator (below)
|
|
2563
2579
|
}
|
|
2564
2580
|
catch (err) {
|
|
2565
2581
|
const reason = err instanceof Error ? err.message : String(err);
|
|
@@ -3662,6 +3678,21 @@ export async function startServer(options) {
|
|
|
3662
3678
|
const syntheticId = slackChannelToSyntheticId(channelId);
|
|
3663
3679
|
return presenceProxy.handleCommand(syntheticId, command, parseInt(userId, 10) || 0);
|
|
3664
3680
|
};
|
|
3681
|
+
// Wire triage status for Slack !triage command
|
|
3682
|
+
if (triageOrchestrator) {
|
|
3683
|
+
_slackAdapter.onGetTriageStatus = (channelId) => {
|
|
3684
|
+
const syntheticId = slackChannelToSyntheticId(channelId);
|
|
3685
|
+
const ts = triageOrchestrator.getTriageState(syntheticId);
|
|
3686
|
+
if (!ts)
|
|
3687
|
+
return null;
|
|
3688
|
+
return {
|
|
3689
|
+
active: true,
|
|
3690
|
+
classification: ts.classification,
|
|
3691
|
+
checkCount: ts.checkCount,
|
|
3692
|
+
lastCheck: new Date(ts.lastCheckAt).toISOString(),
|
|
3693
|
+
};
|
|
3694
|
+
};
|
|
3695
|
+
}
|
|
3665
3696
|
}
|
|
3666
3697
|
console.log(pc.green(' Presence Proxy enabled (🔭 [Standby])'));
|
|
3667
3698
|
}
|