instar 1.3.489 → 1.3.491
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/dashboard/index.html +30 -0
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +1124 -28
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +23 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CodexResumeMap.d.ts +95 -0
- package/dist/core/CodexResumeMap.d.ts.map +1 -0
- package/dist/core/CodexResumeMap.js +283 -0
- package/dist/core/CodexResumeMap.js.map +1 -0
- package/dist/core/GuardPostureStore.d.ts +38 -0
- package/dist/core/GuardPostureStore.d.ts.map +1 -0
- package/dist/core/GuardPostureStore.js +87 -0
- package/dist/core/GuardPostureStore.js.map +1 -0
- package/dist/core/MachinePoolRegistry.d.ts +16 -0
- package/dist/core/MachinePoolRegistry.d.ts.map +1 -1
- package/dist/core/MachinePoolRegistry.js +24 -1
- package/dist/core/MachinePoolRegistry.js.map +1 -1
- package/dist/core/MeshRpc.d.ts +3 -0
- package/dist/core/MeshRpc.d.ts.map +1 -1
- package/dist/core/MeshRpc.js +5 -0
- package/dist/core/MeshRpc.js.map +1 -1
- package/dist/core/ModelSwapService.d.ts +26 -11
- package/dist/core/ModelSwapService.d.ts.map +1 -1
- package/dist/core/ModelSwapService.js +59 -21
- package/dist/core/ModelSwapService.js.map +1 -1
- package/dist/core/PeerPresencePuller.d.ts +9 -0
- package/dist/core/PeerPresencePuller.d.ts.map +1 -1
- package/dist/core/PeerPresencePuller.js +1 -1
- package/dist/core/PeerPresencePuller.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +16 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +92 -4
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts +4 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +3 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/SessionRefresh.d.ts +36 -7
- package/dist/core/SessionRefresh.d.ts.map +1 -1
- package/dist/core/SessionRefresh.js +90 -29
- package/dist/core/SessionRefresh.js.map +1 -1
- package/dist/core/TopicProfileOrchestrator.d.ts +480 -0
- package/dist/core/TopicProfileOrchestrator.d.ts.map +1 -0
- package/dist/core/TopicProfileOrchestrator.js +1404 -0
- package/dist/core/TopicProfileOrchestrator.js.map +1 -0
- package/dist/core/TopicProfileResolver.d.ts +104 -0
- package/dist/core/TopicProfileResolver.d.ts.map +1 -0
- package/dist/core/TopicProfileResolver.js +231 -0
- package/dist/core/TopicProfileResolver.js.map +1 -0
- package/dist/core/TopicProfileStore.d.ts +308 -0
- package/dist/core/TopicProfileStore.d.ts.map +1 -0
- package/dist/core/TopicProfileStore.js +781 -0
- package/dist/core/TopicProfileStore.js.map +1 -0
- package/dist/core/TopicProfileTransferCarrier.d.ts +227 -0
- package/dist/core/TopicProfileTransferCarrier.d.ts.map +1 -0
- package/dist/core/TopicProfileTransferCarrier.js +533 -0
- package/dist/core/TopicProfileTransferCarrier.js.map +1 -0
- package/dist/core/TopicResumeMap.d.ts +67 -1
- package/dist/core/TopicResumeMap.d.ts.map +1 -1
- package/dist/core/TopicResumeMap.js +114 -1
- package/dist/core/TopicResumeMap.js.map +1 -1
- package/dist/core/classifyProfileChange.d.ts +83 -0
- package/dist/core/classifyProfileChange.d.ts.map +1 -0
- package/dist/core/classifyProfileChange.js +274 -0
- package/dist/core/classifyProfileChange.js.map +1 -0
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/frameworkSessionLaunch.d.ts +26 -0
- package/dist/core/frameworkSessionLaunch.d.ts.map +1 -1
- package/dist/core/frameworkSessionLaunch.js +58 -0
- package/dist/core/frameworkSessionLaunch.js.map +1 -1
- package/dist/core/slackRefreshBinding.d.ts +83 -0
- package/dist/core/slackRefreshBinding.d.ts.map +1 -0
- package/dist/core/slackRefreshBinding.js +54 -0
- package/dist/core/slackRefreshBinding.js.map +1 -0
- package/dist/core/topicProfileIngress.d.ts +128 -0
- package/dist/core/topicProfileIngress.d.ts.map +1 -0
- package/dist/core/topicProfileIngress.js +249 -0
- package/dist/core/topicProfileIngress.js.map +1 -0
- package/dist/core/topicProfileValidation.d.ts +109 -0
- package/dist/core/topicProfileValidation.d.ts.map +1 -0
- package/dist/core/topicProfileValidation.js +247 -0
- package/dist/core/topicProfileValidation.js.map +1 -0
- package/dist/core/topicProfileWriteSurface.d.ts +222 -0
- package/dist/core/topicProfileWriteSurface.d.ts.map +1 -0
- package/dist/core/topicProfileWriteSurface.js +631 -0
- package/dist/core/topicProfileWriteSurface.js.map +1 -0
- package/dist/core/types.d.ts +66 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +6 -0
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/dist/messaging/TelegramAdapter.d.ts +10 -1
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +41 -1
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/monitoring/ActiveWorkSilenceSentinel.d.ts +8 -0
- package/dist/monitoring/ActiveWorkSilenceSentinel.d.ts.map +1 -1
- package/dist/monitoring/ActiveWorkSilenceSentinel.js +8 -0
- package/dist/monitoring/ActiveWorkSilenceSentinel.js.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.d.ts +8 -0
- package/dist/monitoring/ContextWedgeSentinel.d.ts.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.js +8 -0
- package/dist/monitoring/ContextWedgeSentinel.js.map +1 -1
- package/dist/monitoring/GuardPostureTripwire.d.ts +3 -27
- package/dist/monitoring/GuardPostureTripwire.d.ts.map +1 -1
- package/dist/monitoring/GuardPostureTripwire.js +8 -76
- package/dist/monitoring/GuardPostureTripwire.js.map +1 -1
- package/dist/monitoring/GuardRegistry.d.ts +48 -0
- package/dist/monitoring/GuardRegistry.d.ts.map +1 -0
- package/dist/monitoring/GuardRegistry.js +49 -0
- package/dist/monitoring/GuardRegistry.js.map +1 -0
- package/dist/monitoring/SessionReaper.d.ts +7 -0
- package/dist/monitoring/SessionReaper.d.ts.map +1 -1
- package/dist/monitoring/SessionReaper.js +9 -0
- package/dist/monitoring/SessionReaper.js.map +1 -1
- package/dist/monitoring/SessionWatchdog.d.ts +8 -0
- package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
- package/dist/monitoring/SessionWatchdog.js +8 -0
- package/dist/monitoring/SessionWatchdog.js.map +1 -1
- package/dist/monitoring/SocketDisconnectSentinel.d.ts +8 -0
- package/dist/monitoring/SocketDisconnectSentinel.d.ts.map +1 -1
- package/dist/monitoring/SocketDisconnectSentinel.js +8 -0
- package/dist/monitoring/SocketDisconnectSentinel.js.map +1 -1
- package/dist/monitoring/guardManifest.d.ts +67 -0
- package/dist/monitoring/guardManifest.d.ts.map +1 -0
- package/dist/monitoring/guardManifest.js +536 -0
- package/dist/monitoring/guardManifest.js.map +1 -0
- package/dist/monitoring/guardPosture.d.ts +77 -0
- package/dist/monitoring/guardPosture.d.ts.map +1 -0
- package/dist/monitoring/guardPosture.js +198 -0
- package/dist/monitoring/guardPosture.js.map +1 -0
- package/dist/monitoring/guardPostureView.d.ts +100 -0
- package/dist/monitoring/guardPostureView.d.ts.map +1 -0
- package/dist/monitoring/guardPostureView.js +294 -0
- package/dist/monitoring/guardPostureView.js.map +1 -0
- package/dist/monitoring/probes/GuardPostureProbe.d.ts +82 -0
- package/dist/monitoring/probes/GuardPostureProbe.d.ts.map +1 -0
- package/dist/monitoring/probes/GuardPostureProbe.js +384 -0
- package/dist/monitoring/probes/GuardPostureProbe.js.map +1 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +18 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scheduler/JobScheduler.d.ts +10 -0
- package/dist/scheduler/JobScheduler.d.ts.map +1 -1
- package/dist/scheduler/JobScheduler.js +12 -0
- package/dist/scheduler/JobScheduler.js.map +1 -1
- package/dist/server/AgentServer.d.ts +40 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +54 -3
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +12 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/peerUrlGuard.d.ts +35 -0
- package/dist/server/peerUrlGuard.d.ts.map +1 -0
- package/dist/server/peerUrlGuard.js +93 -0
- package/dist/server/peerUrlGuard.js.map +1 -0
- package/dist/server/routes.d.ts +31 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +407 -1
- package/dist/server/routes.js.map +1 -1
- package/package.json +3 -2
- package/scripts/lint-guard-manifest.js +264 -0
- package/src/data/builtin-manifest.json +67 -67
- package/src/data/state-coherence-registry.json +54 -18
- package/src/scaffold/templates.ts +18 -0
- package/upgrades/1.3.490.md +34 -0
- package/upgrades/1.3.491.md +37 -0
- package/upgrades/side-effects/guard-posture-endpoint.md +101 -0
- package/upgrades/side-effects/topic-profile.md +142 -0
|
@@ -17,13 +17,20 @@
|
|
|
17
17
|
* docs/signal-vs-authority.md "safety guards on irreversible actions"
|
|
18
18
|
* carve-out) — prevents infinite-respawn loops. Not a judgment call.
|
|
19
19
|
*
|
|
20
|
-
* Scope: Telegram-bound
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* the registry
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* Scope: Telegram-bound AND Slack-bound sessions (TOPIC-PROFILE-SPEC §10.5 —
|
|
21
|
+
* Slack parity is an explicit prerequisite, not a v2 follow-up). Binding
|
|
22
|
+
* resolution checks Telegram first (in-memory map, then a fresh disk read of
|
|
23
|
+
* the persisted topic-session registry — so a binding registered after this
|
|
24
|
+
* process loaded the registry, e.g. on a --no-telegram server, is still
|
|
25
|
+
* recoverable), then the Slack channel/thread registry via the optional
|
|
26
|
+
* `slack` dep. Slack respawns go through the optional `slackRespawner`
|
|
27
|
+
* callback; when a session is Slack-bound but no slackRespawner is wired the
|
|
28
|
+
* refusal is the structured `slack_respawner_unwired` (so callers can degrade
|
|
29
|
+
* to CONTINUATION-on-next-message, disclosed honestly, per §10.5). Genuinely
|
|
30
|
+
* unbound sessions (iMessage, headless) return
|
|
31
|
+
* { ok: false, code: 'not_telegram_bound' } (code kept for back-compat).
|
|
26
32
|
*/
|
|
33
|
+
import { type SlackRefreshBinding, type SlackRespawner } from './slackRefreshBinding.js';
|
|
27
34
|
import type { SessionManager } from './SessionManager.js';
|
|
28
35
|
import type { StateManager } from './StateManager.js';
|
|
29
36
|
import type { TelegramAdapter } from '../messaging/TelegramAdapter.js';
|
|
@@ -56,6 +63,20 @@ export interface SessionRefreshDeps {
|
|
|
56
63
|
configHome?: string;
|
|
57
64
|
accountId?: string;
|
|
58
65
|
}) => Promise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Slack binding resolution (§10.5, optional + additive). SlackAdapter
|
|
68
|
+
* satisfies this structurally; null/omitted = Telegram-only behavior,
|
|
69
|
+
* byte-for-byte as before. Consulted only after BOTH Telegram lookups miss
|
|
70
|
+
* (Telegram-bound resolution takes precedence, matching today's order).
|
|
71
|
+
*/
|
|
72
|
+
slack?: SlackRefreshBinding | null;
|
|
73
|
+
/**
|
|
74
|
+
* Slack respawner callback (§10.5, optional + additive). Wired by server
|
|
75
|
+
* bootstrap to mirror the Slack message-handler spawn path (resume read +
|
|
76
|
+
* spawnInteractiveSession + registerChannelSession) — see SlackRespawner
|
|
77
|
+
* docs. Same kill contract as `respawner`: SessionRefresh kills first.
|
|
78
|
+
*/
|
|
79
|
+
slackRespawner?: SlackRespawner | null;
|
|
59
80
|
/** Rate-guard config. Defaults: 5 refreshes per 10-minute rolling window. */
|
|
60
81
|
rateLimit?: {
|
|
61
82
|
maxPerWindow: number;
|
|
@@ -67,13 +88,21 @@ export interface SessionRefreshDeps {
|
|
|
67
88
|
export type RefreshResult = {
|
|
68
89
|
ok: true;
|
|
69
90
|
newSessionName: string;
|
|
91
|
+
/** Telegram topic id, or (Slack) the stable NEGATIVE synthetic id —
|
|
92
|
+
* same hash the rest of the system uses to bridge Slack channels into
|
|
93
|
+
* numeric topic space. Kept required for back-compat consumers. */
|
|
70
94
|
topicId: number;
|
|
95
|
+
/** §10.5 platform tag. Absent = Telegram (pre-Slack result shape is
|
|
96
|
+
* preserved byte-for-byte for existing consumers/tests). */
|
|
97
|
+
platform?: 'slack';
|
|
98
|
+
/** §10.5 conversation key (`slack:<channel>[:<thread>]`). Slack only. */
|
|
99
|
+
conversationKey?: string;
|
|
71
100
|
} | {
|
|
72
101
|
ok: false;
|
|
73
102
|
code: RefreshFailureCode;
|
|
74
103
|
message: string;
|
|
75
104
|
};
|
|
76
|
-
export type RefreshFailureCode = 'rate_limited' | 'session_not_found' | 'not_telegram_bound' | 'no_telegram_adapter' | 'refresh_in_progress';
|
|
105
|
+
export type RefreshFailureCode = 'rate_limited' | 'session_not_found' | 'not_telegram_bound' | 'no_telegram_adapter' | 'slack_respawner_unwired' | 'refresh_in_progress';
|
|
77
106
|
export interface RefreshOptions {
|
|
78
107
|
sessionName: string;
|
|
79
108
|
followUpPrompt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRefresh.d.ts","sourceRoot":"","sources":["../../src/core/SessionRefresh.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SessionRefresh.d.ts","sourceRoot":"","sources":["../../src/core/SessionRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,O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16 +17,23 @@
|
|
|
17
17
|
* docs/signal-vs-authority.md "safety guards on irreversible actions"
|
|
18
18
|
* carve-out) — prevents infinite-respawn loops. Not a judgment call.
|
|
19
19
|
*
|
|
20
|
-
* Scope: Telegram-bound
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* the registry
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* Scope: Telegram-bound AND Slack-bound sessions (TOPIC-PROFILE-SPEC §10.5 —
|
|
21
|
+
* Slack parity is an explicit prerequisite, not a v2 follow-up). Binding
|
|
22
|
+
* resolution checks Telegram first (in-memory map, then a fresh disk read of
|
|
23
|
+
* the persisted topic-session registry — so a binding registered after this
|
|
24
|
+
* process loaded the registry, e.g. on a --no-telegram server, is still
|
|
25
|
+
* recoverable), then the Slack channel/thread registry via the optional
|
|
26
|
+
* `slack` dep. Slack respawns go through the optional `slackRespawner`
|
|
27
|
+
* callback; when a session is Slack-bound but no slackRespawner is wired the
|
|
28
|
+
* refusal is the structured `slack_respawner_unwired` (so callers can degrade
|
|
29
|
+
* to CONTINUATION-on-next-message, disclosed honestly, per §10.5). Genuinely
|
|
30
|
+
* unbound sessions (iMessage, headless) return
|
|
31
|
+
* { ok: false, code: 'not_telegram_bound' } (code kept for back-compat).
|
|
26
32
|
*/
|
|
27
33
|
import fs from 'node:fs';
|
|
28
34
|
import path from 'node:path';
|
|
29
35
|
import { ensureInteractiveReady } from './ensureInteractiveReady.js';
|
|
36
|
+
import { slackConversationKey, slackRoutingKeySyntheticId, } from './slackRefreshBinding.js';
|
|
30
37
|
/**
|
|
31
38
|
* Account-swap conversation continuity. Claude stores conversation transcripts
|
|
32
39
|
* PER CONFIG HOME (`<CLAUDE_CONFIG_DIR>/projects/<projectDir>/<uuid>.jsonl`), so a
|
|
@@ -120,34 +127,62 @@ export class SessionRefresh {
|
|
|
120
127
|
async refreshSession(opts) {
|
|
121
128
|
const { sessionName, followUpPrompt, reason, fresh } = opts;
|
|
122
129
|
// ── detect ─────────────────────────────────────────────────────────
|
|
123
|
-
if (!this.deps.telegram) {
|
|
130
|
+
if (!this.deps.telegram && !this.deps.slack) {
|
|
124
131
|
return {
|
|
125
132
|
ok: false,
|
|
126
133
|
code: 'no_telegram_adapter',
|
|
127
|
-
message: 'No Telegram adapter wired — self-refresh requires a
|
|
134
|
+
message: 'No Telegram adapter wired (and no Slack binding either) — self-refresh requires a platform-bound session.',
|
|
128
135
|
};
|
|
129
136
|
}
|
|
130
|
-
let topicId =
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
let topicId = null;
|
|
138
|
+
if (this.deps.telegram) {
|
|
139
|
+
topicId = this.deps.telegram.getTopicForSession(sessionName);
|
|
140
|
+
if (topicId === null) {
|
|
141
|
+
// In-memory miss does NOT mean the session is unbound. A binding
|
|
142
|
+
// registered after this process loaded the registry won't be in the
|
|
143
|
+
// in-memory reverse map — most importantly on a `--no-telegram` server,
|
|
144
|
+
// whose map reflects only its boot-time snapshot while the lifeline keeps
|
|
145
|
+
// writing new bindings to disk. That is exactly the gap that left wedged
|
|
146
|
+
// long-lived dev sessions (e.g. the Codey collaboration session, topic
|
|
147
|
+
// 13435) un-recoverable: getTopicForSession returned null, recovery bailed
|
|
148
|
+
// with not_telegram_bound, and the dead session stayed dead. Fall back to
|
|
149
|
+
// a fresh disk-backed reverse lookup before giving up.
|
|
150
|
+
topicId = this.deps.telegram.resolveTopicForSessionFromDisk?.(sessionName) ?? null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// §10.5 Slack arm: consulted only after BOTH Telegram lookups miss, so a
|
|
154
|
+
// Telegram-bound session resolves exactly as before. The routing key is
|
|
155
|
+
// `<channelId>` or `<channelId>:<thread_ts>` — the same key the kill-time
|
|
156
|
+
// beforeSessionKill listener saves the channel-resume entry under.
|
|
157
|
+
let slackRoutingKey = null;
|
|
158
|
+
if (topicId === null && this.deps.slack) {
|
|
159
|
+
slackRoutingKey = this.deps.slack.getChannelForSession(sessionName);
|
|
160
|
+
if (slackRoutingKey === null) {
|
|
161
|
+
// Disk-backed fallback parity with the Telegram arm (optional method —
|
|
162
|
+
// adapters without it just skip the fallback).
|
|
163
|
+
slackRoutingKey = this.deps.slack.resolveChannelForSessionFromDisk?.(sessionName) ?? null;
|
|
164
|
+
}
|
|
142
165
|
}
|
|
143
|
-
if (topicId === null) {
|
|
144
|
-
// Genuinely unbound (no
|
|
145
|
-
//
|
|
146
|
-
//
|
|
166
|
+
if (topicId === null && slackRoutingKey === null) {
|
|
167
|
+
// Genuinely unbound (no binding on either platform): iMessage/headless
|
|
168
|
+
// sessions remain a follow-up — the respawn path is built around
|
|
169
|
+
// conversation-key → context routing. Code kept as 'not_telegram_bound'
|
|
170
|
+
// for back-compat with existing consumers/log greps.
|
|
147
171
|
return {
|
|
148
172
|
ok: false,
|
|
149
173
|
code: 'not_telegram_bound',
|
|
150
|
-
message: `Session "${sessionName}" is not bound to a Telegram topic (checked in-memory + disk registry); cannot self-refresh.`,
|
|
174
|
+
message: `Session "${sessionName}" is not bound to a Telegram topic${this.deps.slack ? ' or Slack conversation' : ''} (checked in-memory + disk registry); cannot self-refresh.`,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
if (topicId === null && slackRoutingKey !== null && !this.deps.slackRespawner) {
|
|
178
|
+
// Slack-bound, but the Slack respawner isn't wired on this server.
|
|
179
|
+
// Structured refusal (NOT a throw) so the caller can degrade honestly —
|
|
180
|
+
// §10.5: "a respawn-requiring change on a Slack topic degrades to
|
|
181
|
+
// CONTINUATION-on-next-message, disclosed honestly."
|
|
182
|
+
return {
|
|
183
|
+
ok: false,
|
|
184
|
+
code: 'slack_respawner_unwired',
|
|
185
|
+
message: `Session "${sessionName}" is Slack-bound (${slackConversationKey(slackRoutingKey)}) but no Slack respawner is wired — the session will resume via CONTINUATION on the next message instead of an immediate respawn.`,
|
|
151
186
|
};
|
|
152
187
|
}
|
|
153
188
|
// Look up the state session by tmux name — needed for killSession,
|
|
@@ -196,10 +231,18 @@ export class SessionRefresh {
|
|
|
196
231
|
// so the respawner finds no entry and spawns a brand-new conversation
|
|
197
232
|
// instead of `--resume`-ing the corrupted transcript. MUST run after the
|
|
198
233
|
// kill (beforeSessionKill writes the entry) and before the respawner
|
|
199
|
-
// reads it.
|
|
234
|
+
// reads it. Platform-routed: Telegram entries live in TopicResumeMap;
|
|
235
|
+
// Slack entries live in the adapter's channel-resume map keyed on the
|
|
236
|
+
// routing key (the same key beforeSessionKill saved under).
|
|
200
237
|
if (fresh) {
|
|
201
|
-
|
|
202
|
-
|
|
238
|
+
if (topicId !== null) {
|
|
239
|
+
this.deps.topicResumeMap?.remove(topicId);
|
|
240
|
+
console.log(`[SessionRefresh] fresh respawn — cleared resume UUID for topic ${topicId} (sessionName=${sessionName})`);
|
|
241
|
+
}
|
|
242
|
+
else if (slackRoutingKey !== null) {
|
|
243
|
+
this.deps.slack?.removeChannelResume(slackRoutingKey);
|
|
244
|
+
console.log(`[SessionRefresh] fresh respawn — cleared Slack channel resume for ${slackConversationKey(slackRoutingKey)} (sessionName=${sessionName})`);
|
|
245
|
+
}
|
|
203
246
|
}
|
|
204
247
|
// The respawner spawns a fresh tmux session that runs `claude
|
|
205
248
|
// --resume <uuid>` (resolved by spawnSessionForTopic via the saved
|
|
@@ -235,10 +278,28 @@ export class SessionRefresh {
|
|
|
235
278
|
console.log(`[SessionRefresh] account-swap continuity: no claudeSessionId on session "${sessionName}" — cannot pre-copy transcript; resumed session may start fresh`);
|
|
236
279
|
}
|
|
237
280
|
}
|
|
281
|
+
// §10.5 Slack respawn path. The slackRespawner mirrors the Slack
|
|
282
|
+
// message-handler spawn: read+consume getChannelResume(routingKey) and
|
|
283
|
+
// spawnInteractiveSession with the resume UUID + channel/thread opts,
|
|
284
|
+
// then re-register the routing-key → session binding. Guarded non-null
|
|
285
|
+
// by the slack_respawner_unwired refusal in detect.
|
|
286
|
+
if (topicId === null && slackRoutingKey !== null) {
|
|
287
|
+
const newSessionName = await this.deps.slackRespawner(sessionName, slackRoutingKey, followUpPrompt, accountSwap);
|
|
288
|
+
const conversationKey = slackConversationKey(slackRoutingKey);
|
|
289
|
+
// ── verify + finalize (Slack) ──────────────────────────────────
|
|
290
|
+
console.log(`[SessionRefresh] Refreshed "${sessionName}" → "${newSessionName}" (${conversationKey})${reason ? ` reason="${reason}"` : ''}`);
|
|
291
|
+
return {
|
|
292
|
+
ok: true,
|
|
293
|
+
newSessionName,
|
|
294
|
+
topicId: slackRoutingKeySyntheticId(slackRoutingKey),
|
|
295
|
+
platform: 'slack',
|
|
296
|
+
conversationKey,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
238
299
|
const newSessionName = await this.deps.respawner(sessionName, topicId, followUpPrompt, accountSwap);
|
|
239
300
|
// ── verify + finalize ────────────────────────────────────────────
|
|
240
301
|
console.log(`[SessionRefresh] Refreshed "${sessionName}" → "${newSessionName}" (topic ${topicId})${reason ? ` reason="${reason}"` : ''}`);
|
|
241
|
-
return { ok: true, newSessionName, topicId };
|
|
302
|
+
return { ok: true, newSessionName, topicId: topicId };
|
|
242
303
|
}
|
|
243
304
|
finally {
|
|
244
305
|
this.inFlight.delete(sessionName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRefresh.js","sourceRoot":"","sources":["../../src/core/SessionRefresh.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SessionRefresh.js","sourceRoot":"","sources":["../../src/core/SessionRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,0BAA0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