claude-slack-channel-bots 0.6.3 → 0.6.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/package.json +1 -1
- package/src/session-manager.ts +7 -6
package/package.json
CHANGED
package/src/session-manager.ts
CHANGED
|
@@ -259,9 +259,10 @@ export async function approveDevChannelsDialog(
|
|
|
259
259
|
channelId: string,
|
|
260
260
|
web: WebClient | undefined,
|
|
261
261
|
isStartup: boolean,
|
|
262
|
+
normalizedName?: string,
|
|
262
263
|
): Promise<void> {
|
|
263
264
|
void web
|
|
264
|
-
const claude_instance_id = instanceIdFor(channelId)
|
|
265
|
+
const claude_instance_id = instanceIdFor(channelId, normalizedName)
|
|
265
266
|
const client = getClient()
|
|
266
267
|
const deadline = Date.now() + _dialogPollTimeoutMs
|
|
267
268
|
|
|
@@ -467,7 +468,7 @@ export async function spawnForRoute(
|
|
|
467
468
|
try {
|
|
468
469
|
const r = await client.spawn(params)
|
|
469
470
|
console.error(`[slack] spawnForRoute: spawned channel=${channelId} instanceId=${r.claude_instance_id}`)
|
|
470
|
-
await approveDevChannelsDialog(channelId, web, isStartup)
|
|
471
|
+
await approveDevChannelsDialog(channelId, web, isStartup, normalizedName)
|
|
471
472
|
return { channelId, action: 'spawned' }
|
|
472
473
|
} catch (err) {
|
|
473
474
|
if (!(err instanceof ErrInstanceIdCollision)) {
|
|
@@ -493,7 +494,7 @@ export async function spawnForRoute(
|
|
|
493
494
|
try {
|
|
494
495
|
const r = await client.spawn(params)
|
|
495
496
|
console.error(`[slack] spawnForRoute: retry-spawn succeeded for channel=${channelId} instanceId=${r.claude_instance_id}`)
|
|
496
|
-
await approveDevChannelsDialog(channelId, web, isStartup)
|
|
497
|
+
await approveDevChannelsDialog(channelId, web, isStartup, normalizedName)
|
|
497
498
|
return { channelId, action: 'spawned' }
|
|
498
499
|
} catch (err2) {
|
|
499
500
|
const e = err2 instanceof AgentDirectorError ? err2 : new AgentDirectorError('spawn', 'UnknownError', String(err2))
|
|
@@ -519,7 +520,7 @@ export async function spawnForRoute(
|
|
|
519
520
|
try {
|
|
520
521
|
await client.spawn(params)
|
|
521
522
|
console.error(`[slack] spawnForRoute: fresh-spawned (after kill+delete) for channel=${channelId}`)
|
|
522
|
-
await approveDevChannelsDialog(channelId, web, isStartup)
|
|
523
|
+
await approveDevChannelsDialog(channelId, web, isStartup, normalizedName)
|
|
523
524
|
return { channelId, action: 'spawned' }
|
|
524
525
|
} catch (err) {
|
|
525
526
|
const e = err instanceof AgentDirectorError ? err : new AgentDirectorError('spawn', 'UnknownError', String(err))
|
|
@@ -543,7 +544,7 @@ export async function spawnForRoute(
|
|
|
543
544
|
try {
|
|
544
545
|
await client.spawn(params)
|
|
545
546
|
console.error(`[slack] spawnForRoute: fresh-spawned (after delete) for channel=${channelId}`)
|
|
546
|
-
await approveDevChannelsDialog(channelId, web, isStartup)
|
|
547
|
+
await approveDevChannelsDialog(channelId, web, isStartup, normalizedName)
|
|
547
548
|
return { channelId, action: 'spawned' }
|
|
548
549
|
} catch (err2) {
|
|
549
550
|
const e = err2 instanceof AgentDirectorError ? err2 : new AgentDirectorError('spawn', 'UnknownError', String(err2))
|
|
@@ -560,7 +561,7 @@ export async function spawnForRoute(
|
|
|
560
561
|
if (!(await tryDelete(channelId, normalizedName, web, isStartup))) return { channelId, action: 'failed' }
|
|
561
562
|
try {
|
|
562
563
|
await client.spawn(params)
|
|
563
|
-
await approveDevChannelsDialog(channelId, web, isStartup)
|
|
564
|
+
await approveDevChannelsDialog(channelId, web, isStartup, normalizedName)
|
|
564
565
|
return { channelId, action: 'spawned' }
|
|
565
566
|
} catch (err2) {
|
|
566
567
|
const e = err2 instanceof AgentDirectorError ? err2 : new AgentDirectorError('spawn', 'UnknownError', String(err2))
|