instar 1.3.680 → 1.3.682
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 +32 -11
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +25 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/messaging/ColdStartFallbackReply.d.ts +68 -0
- package/dist/messaging/ColdStartFallbackReply.d.ts.map +1 -0
- package/dist/messaging/ColdStartFallbackReply.js +91 -0
- package/dist/messaging/ColdStartFallbackReply.js.map +1 -0
- package/dist/monitoring/AgentWorktreeReaper.d.ts +8 -0
- package/dist/monitoring/AgentWorktreeReaper.d.ts.map +1 -1
- package/dist/monitoring/AgentWorktreeReaper.js +1 -0
- package/dist/monitoring/AgentWorktreeReaper.js.map +1 -1
- package/dist/monitoring/agentWorktreeGit.d.ts +26 -0
- package/dist/monitoring/agentWorktreeGit.d.ts.map +1 -1
- package/dist/monitoring/agentWorktreeGit.js +83 -1
- package/dist/monitoring/agentWorktreeGit.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +7 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/src/scaffold/templates.ts +7 -0
- package/upgrades/1.3.681.md +43 -0
- package/upgrades/1.3.682.md +55 -0
- package/upgrades/coldstart-lifeline-fallback.eli16.md +49 -0
- package/upgrades/reaper-squash-merge-aware.eli16.md +43 -0
- package/upgrades/side-effects/coldstart-lifeline-fallback.md +85 -0
- package/upgrades/side-effects/reaper-squash-merge-aware.md +75 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAyBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAwH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+EtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA84CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CAigBN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqshBtE;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
|
@@ -51,6 +51,7 @@ import { AgentServer } from '../server/AgentServer.js';
|
|
|
51
51
|
import { BootHealthBeacon } from '../server/BootHealthBeacon.js';
|
|
52
52
|
import { TelegramAdapter, TOPIC_STYLE, selectTopicEmoji } from '../messaging/TelegramAdapter.js';
|
|
53
53
|
import { getTelegramInboundDir } from '../messaging/shared/telegramInboundFiles.js';
|
|
54
|
+
import { buildColdStartFallbackReply } from '../messaging/ColdStartFallbackReply.js';
|
|
54
55
|
import { RelationshipManager } from '../core/RelationshipManager.js';
|
|
55
56
|
import { getFeatureMetricsRecorder } from '../core/CircuitBreakingIntelligenceProvider.js';
|
|
56
57
|
import { configureLlmCircuitBreaker, llmCircuitAvailable } from '../core/LlmCircuitBreaker.js';
|
|
@@ -2070,11 +2071,18 @@ getAttentionTopicId) {
|
|
|
2070
2071
|
respawnSessionForTopic(sessionManager, telegram, targetSession, topicId, text, topicMemory, resolvedUser ?? undefined)
|
|
2071
2072
|
.catch(err => {
|
|
2072
2073
|
console.error(`[telegram→session] Respawn failed:`, err);
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2074
|
+
// G1 "Agent Is Always Reachable" corollary (2): no silent resource
|
|
2075
|
+
// rejection. On a restart failure, hand the user WHY + a pointer to the
|
|
2076
|
+
// always-alive Lifeline topic + a copy-paste debug message — on the
|
|
2077
|
+
// deterministic delivery path (sendToTopic, never the LLM tone gate).
|
|
2078
|
+
const { userMessage } = buildColdStartFallbackReply({
|
|
2079
|
+
error: err,
|
|
2080
|
+
topicId,
|
|
2081
|
+
topicName: storedTopicName,
|
|
2082
|
+
lifelineTopicId: telegram.getLifelineTopicId() ?? null,
|
|
2083
|
+
kind: 'restart',
|
|
2084
|
+
});
|
|
2085
|
+
telegram.sendToTopic(topicId, userMessage).catch(() => { });
|
|
2078
2086
|
})
|
|
2079
2087
|
.finally(() => {
|
|
2080
2088
|
spawningTopics.clear(topicId, _spawnTokB);
|
|
@@ -2109,11 +2117,18 @@ getAttentionTopicId) {
|
|
|
2109
2117
|
console.log(`[telegram→session] Auto-spawned "${newSessionName}" for topic ${topicId}`);
|
|
2110
2118
|
}).catch((err) => {
|
|
2111
2119
|
console.error(`[telegram→session] Auto-spawn failed:`, err);
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2120
|
+
// G1 "Agent Is Always Reachable" corollary (2): no silent resource rejection.
|
|
2121
|
+
// On a cold-start failure, hand the user WHY + a pointer to the always-alive
|
|
2122
|
+
// Lifeline topic + a copy-paste debug message — on the deterministic delivery
|
|
2123
|
+
// path (sendToTopic, never the LLM tone gate that can fail closed under load).
|
|
2124
|
+
const { userMessage } = buildColdStartFallbackReply({
|
|
2125
|
+
error: err,
|
|
2126
|
+
topicId,
|
|
2127
|
+
topicName: spawnName,
|
|
2128
|
+
lifelineTopicId: telegram.getLifelineTopicId() ?? null,
|
|
2129
|
+
kind: 'spawn',
|
|
2130
|
+
});
|
|
2131
|
+
telegram.sendToTopic(topicId, userMessage).catch(() => { });
|
|
2117
2132
|
}).finally(() => {
|
|
2118
2133
|
spawningTopics.clear(topicId, _spawnTokC);
|
|
2119
2134
|
});
|
|
@@ -14767,7 +14782,13 @@ export async function startServer(options) {
|
|
|
14767
14782
|
const { AgentWorktreeReaper } = await import('../monitoring/AgentWorktreeReaper.js');
|
|
14768
14783
|
const { makeAgentWorktreeReaperDeps } = await import('../monitoring/agentWorktreeGit.js');
|
|
14769
14784
|
const _agentWorktreesDir = path.join(path.dirname(config.stateDir), '.worktrees');
|
|
14770
|
-
const agentWorktreeReaper = new AgentWorktreeReaper(makeAgentWorktreeReaperDeps({
|
|
14785
|
+
const agentWorktreeReaper = new AgentWorktreeReaper(makeAgentWorktreeReaperDeps({
|
|
14786
|
+
instarRepo: config.projectDir,
|
|
14787
|
+
worktreesDir: _agentWorktreesDir,
|
|
14788
|
+
// Multi-commit squash-merge detection via GitHub merged-PR state (default
|
|
14789
|
+
// on; fail-safe to cherry-only). Off only if explicitly disabled in config.
|
|
14790
|
+
githubMergeCheck: config.monitoring?.agentWorktreeReaper?.githubMergeCheck ?? true,
|
|
14791
|
+
}), config.monitoring?.agentWorktreeReaper);
|
|
14771
14792
|
agentWorktreeReaper.start();
|
|
14772
14793
|
if (config.monitoring?.agentWorktreeReaper?.enabled) {
|
|
14773
14794
|
console.log(pc.green(config.monitoring.agentWorktreeReaper.dryRun === false
|