claude-slack-channel-bots 0.7.0 → 0.7.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-slack-channel-bots",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Multi-session Slack-to-Claude bridge — run multiple Claude Code bots across Slack channels via Socket Mode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "src/*.ts",
11
11
  "!src/*.test.ts",
12
12
  "scripts/fixup-bun-cache.ts",
13
+ "scripts/install-check.ts",
13
14
  "slack-app-manifest.yml",
14
15
  "README.md",
15
16
  "skills/"
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * scripts/install-check.ts — `bun run install-check` entry point.
4
+ *
5
+ * SR-6: standalone diagnostic command. Calls runInstallCheck() once,
6
+ * renders the result to stdout (success) or stderr (failure), and exits
7
+ * with the appropriate code.
8
+ *
9
+ * Appends the manual-skill-install instructions block to every failure
10
+ * class EXCEPT ad-version-floor-unreadable — that case's remediation is
11
+ * "reinstall agent-director from npm," not "install the install skill."
12
+ *
13
+ * The script MUST NOT prompt for input, MUST NOT run any install command,
14
+ * MUST NOT attempt to fetch the install skill. It is purely diagnostic.
15
+ *
16
+ * Not wired to any npm/bun lifecycle (no preinstall, postinstall, prepare,
17
+ * prepublishOnly). Operator runs it manually via `bun run install-check`.
18
+ *
19
+ * SPDX-License-Identifier: MIT
20
+ */
21
+
22
+ import { runInstallCheck } from '../src/install-check.ts'
23
+ import type { InstallCheckResult } from '../src/install-check.ts'
24
+ import { renderInstallSkillInstructions } from '../src/install-skill-pointer.ts'
25
+
26
+ export function renderSuccess(result: InstallCheckResult & { ok: true }): string {
27
+ return [
28
+ 'agent-director install check: OK',
29
+ ` binary: ${result.binaryPath}`,
30
+ ` version: ${result.binaryVersion}`,
31
+ ` floor: ${result.floor}`,
32
+ ].join('\n')
33
+ }
34
+
35
+ export function renderFailure(result: InstallCheckResult & { ok: false }): string {
36
+ const lines = [
37
+ `agent-director install check: FAILED (${result.classLabel})`,
38
+ result.message,
39
+ ]
40
+ if (Object.keys(result.detail).length > 0) {
41
+ lines.push(` detail: ${JSON.stringify(result.detail)}`)
42
+ }
43
+ return lines.join('\n')
44
+ }
45
+
46
+ export async function main(): Promise<void> {
47
+ const result = await runInstallCheck()
48
+
49
+ if (result.ok) {
50
+ process.stdout.write(renderSuccess(result) + '\n')
51
+ process.exit(0)
52
+ }
53
+
54
+ let body = renderFailure(result)
55
+ // SR-6.3: append the manual-skill-install block to every failure class
56
+ // EXCEPT ad-version-floor-unreadable (the skill can't fix a corrupt AD
57
+ // package; remediation is "reinstall agent-director").
58
+ if (result.classLabel !== 'ad-version-floor-unreadable') {
59
+ body += renderInstallSkillInstructions()
60
+ }
61
+ process.stderr.write(body + '\n')
62
+ process.exit(1)
63
+ }
64
+
65
+ if (import.meta.main) {
66
+ void main()
67
+ }