@slack/radar-mcp 1.21.0 → 1.23.0

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.
Files changed (87) hide show
  1. package/README.md +114 -18
  2. package/dist/mcp/api-paths.d.ts +2 -2
  3. package/dist/mcp/api-paths.js +4 -19
  4. package/dist/mcp/dashboard-identity.d.ts +6 -0
  5. package/dist/mcp/dashboard-identity.js +11 -0
  6. package/dist/mcp/index.js +210 -145
  7. package/dist/mcp/logs-result.d.ts +1 -0
  8. package/dist/mcp/logs-result.js +1 -0
  9. package/dist/mcp/radar-export-get.d.ts +30 -0
  10. package/dist/mcp/radar-export-get.js +49 -0
  11. package/dist/mcp/radar-http.d.ts +22 -0
  12. package/dist/mcp/radar-http.js +61 -0
  13. package/dist/mcp/radar-response.d.ts +5 -1
  14. package/dist/mcp/radar-response.js +8 -3
  15. package/dist/mcp/session-backfill.js +3 -4
  16. package/dist/mcp/session-enable.d.ts +15 -0
  17. package/dist/mcp/session-enable.js +268 -19
  18. package/dist/mcp/snapshot.js +42 -26
  19. package/dist/mcp/sources-gate.js +6 -0
  20. package/dist/mcp/stale-dashboard.d.ts +23 -0
  21. package/dist/mcp/stale-dashboard.js +122 -0
  22. package/dist/mcp/switchboard-spool.d.ts +12 -0
  23. package/dist/mcp/switchboard-spool.js +107 -0
  24. package/dist/mcp/switchboard-tools.d.ts +9 -0
  25. package/dist/mcp/switchboard-tools.js +144 -6
  26. package/dist/mcp/test-cases.d.ts +14 -0
  27. package/dist/mcp/test-cases.js +77 -0
  28. package/dist/mcp/test-runs-tools.d.ts +8 -0
  29. package/dist/mcp/test-runs-tools.js +95 -0
  30. package/dist/mcp/tools.d.ts +4 -1
  31. package/dist/mcp/tools.js +101 -21
  32. package/dist/mcp/web-child-env.d.ts +4 -1
  33. package/dist/mcp/web-child-env.js +4 -1
  34. package/dist/shared/android.d.ts +44 -0
  35. package/dist/shared/android.js +234 -24
  36. package/dist/shared/constants.d.ts +9 -4
  37. package/dist/shared/constants.js +9 -4
  38. package/dist/shared/feature-flags.d.ts +1 -0
  39. package/dist/shared/feature-flags.js +1 -0
  40. package/dist/shared/ios-logs.d.ts +10 -0
  41. package/dist/shared/ios-logs.js +91 -0
  42. package/dist/shared/ios.d.ts +25 -2
  43. package/dist/shared/ios.js +157 -3
  44. package/dist/{web → shared}/log-session.d.ts +45 -31
  45. package/dist/shared/log-session.js +300 -0
  46. package/dist/shared/logcat-capture.js +17 -1
  47. package/dist/shared/radar-request-raw.d.ts +7 -0
  48. package/dist/shared/radar-request-raw.js +89 -0
  49. package/dist/shared/radar-token.d.ts +25 -0
  50. package/dist/shared/radar-token.js +164 -0
  51. package/dist/shared/stream.d.ts +3 -0
  52. package/dist/shared/stream.js +107 -15
  53. package/dist/shared/switchboard-host-store.d.ts +21 -0
  54. package/dist/shared/switchboard-host-store.js +166 -0
  55. package/dist/shared/switchboard-note.d.ts +15 -0
  56. package/dist/shared/switchboard-note.js +92 -0
  57. package/dist/shared/switchboard-report-file.d.ts +5 -0
  58. package/dist/shared/switchboard-report-file.js +26 -0
  59. package/dist/shared/switchboard-report.d.ts +20 -0
  60. package/dist/shared/switchboard-report.js +406 -0
  61. package/dist/shared/switchboard.d.ts +111 -2
  62. package/dist/shared/switchboard.js +436 -3
  63. package/dist/shared/transport.d.ts +49 -3
  64. package/dist/shared/version.d.ts +2 -0
  65. package/dist/shared/version.js +18 -0
  66. package/dist/shared/wire.d.ts +14 -1
  67. package/dist/web/install-app.d.ts +75 -8
  68. package/dist/web/install-app.js +330 -67
  69. package/dist/web/macapp/RadarApp.swift +487 -23
  70. package/dist/web/public/index.html +51 -9
  71. package/dist/web/public/next/app.js +33 -18
  72. package/dist/web/public/next/feed.js +102 -15
  73. package/dist/web/public/next/flags.js +3 -0
  74. package/dist/web/public/next/inspector.js +69 -3
  75. package/dist/web/public/next/prefs.js +5 -2
  76. package/dist/web/public/next/registry.js +18 -5
  77. package/dist/web/public/next/store.js +455 -29
  78. package/dist/web/public/next/switchboard-note.js +93 -0
  79. package/dist/web/public/next/toast.js +9 -5
  80. package/dist/web/public/next/voice-model.js +215 -35
  81. package/dist/web/public/next/voice.js +173 -18
  82. package/dist/web/server.d.ts +15 -11
  83. package/dist/web/server.js +690 -168
  84. package/dist/web/spec.d.ts +2 -1
  85. package/dist/web/spec.js +2 -1
  86. package/package.json +2 -2
  87. package/dist/web/log-session.js +0 -166
@@ -68,7 +68,32 @@ export interface InstallConfigValues {
68
68
  node: string;
69
69
  webBin: string;
70
70
  mcpBin: string;
71
+ port: number;
71
72
  }
73
+ /**
74
+ * The port the installed app was built against, or null when there is no app or the port cannot be
75
+ * read. Info.plist records it from this version on. An app installed before that records it only in
76
+ * its executable: the native binary holds the baked RADAR_URL as a plain string, and the shell
77
+ * launcher has its PORT= line. A key that is present decides on its own, so an unreadable one falls
78
+ * back to the default rather than to whatever the executable happens to contain.
79
+ *
80
+ * Exported for testing.
81
+ */
82
+ export declare function readInstalledPort(app?: string): number | null;
83
+ /**
84
+ * The port this install bakes in. An explicit SLACK_RADAR_WEB_PORT wins, and has to be a real port:
85
+ * anything else would bake a URL the app cannot parse, and the app would crash on every launch until
86
+ * a reinstall, so the install throws instead. Without one, a
87
+ * rebuild keeps the port the installed app already has: the self-heal rebuild of an app installed
88
+ * before the port was passed on runs with no port in its environment, and baking the default there
89
+ * would move a user on 8101 to 8100 while their MCP config still names 8101. The default comes last,
90
+ * and is also what a rebuild bakes when the installed app's port cannot be read or is not a port.
91
+ * The installed app is read only when the environment names no port, since its answer is unused
92
+ * otherwise. `installed` is for tests: a value, including null, stands in for that read.
93
+ *
94
+ * Exported for testing.
95
+ */
96
+ export declare function installPort(env?: NodeJS.ProcessEnv, installed?: number | null): number;
72
97
  /**
73
98
  * Everything the app needs to know about THIS machine.
74
99
  *
@@ -102,9 +127,30 @@ export declare function installMacApp(): {
102
127
  app: string;
103
128
  native: boolean;
104
129
  node: string;
130
+ port: number;
105
131
  };
106
- /** Entry point for the `install-app` subcommand. Prints what to do next, then reveals the app. */
107
- export declare function runInstallApp(): void;
132
+ /**
133
+ * Entry point for the `install-app` subcommand. Prints what to do next, then reveals the app.
134
+ * `install` and `reveal` are for tests, so the printed message can be checked without building an
135
+ * app or opening a Finder window.
136
+ */
137
+ export declare function runInstallApp(install?: () => {
138
+ app: string;
139
+ native: boolean;
140
+ node: string;
141
+ port: number;
142
+ }, reveal?: () => void): void;
143
+ /**
144
+ * What install-app prints once the bundle is in place.
145
+ *
146
+ * Exported for testing.
147
+ */
148
+ export declare function installAppMessage(result: {
149
+ app: string;
150
+ native: boolean;
151
+ node: string;
152
+ port: number;
153
+ }): string;
108
154
  /**
109
155
  * Entry point for `install-app --self-heal-check`, spawned in the background by RadarApp.swift
110
156
  * on every dock launch. install-app bakes the .app's paths and version in ONCE, so a Radar
@@ -112,8 +158,9 @@ export declare function runInstallApp(): void;
112
158
  * pointed at a stale, orphaned npx cache path with no signal to the user. This rebuilds it in
113
159
  * place when this process's own version (itself just resolved via the same `@latest` npx call)
114
160
  * differs from what is installed, so the fix lands invisibly and takes effect on the NEXT
115
- * launch. Never throws out of this function: a launcher-triggered background process failing
116
- * loudly would look like a crash, which is exactly what staying invisible rules out.
161
+ * launch. Never throws out of this function, except when the final state write itself fails: a
162
+ * launcher-triggered background process failing loudly would look like a crash, which is exactly
163
+ * what staying invisible rules out. That one throw exits non-zero, which the precheck counts as a failure.
117
164
  */
118
165
  export declare function runSelfHealCheck(): void;
119
166
  /** Test seam: override the registry URL checkLatestPublishedVersion() reads from. */
@@ -129,6 +176,7 @@ export declare function checkLatestPublishedVersion(): Promise<string | null>;
129
176
  /** Test seam: override the spawn implementation runSelfHealPrecheckAsync() uses to trigger the
130
177
  * conditional npx rebuild. */
131
178
  export declare function _setSelfHealSpawnForTest(fn: typeof spawn): void;
179
+ export declare function _setSelfHealRebuildTimeoutForTest(ms: number): void;
132
180
  /**
133
181
  * Entry point for `install-app --self-heal-precheck`. RadarApp.swift now spawns THIS (the
134
182
  * already-installed, guaranteed self-heal-aware mcp/index.js) instead of going straight to `npx
@@ -139,12 +187,31 @@ export declare function _setSelfHealSpawnForTest(fn: typeof spawn): void;
139
187
  * the normal state, not an edge case, for a locally-built dock app ahead of what is published.
140
188
  *
141
189
  * This checks the registry's plain version metadata first (no package code ever executes) and
142
- * only spawns the npx follow-up once that confirms a real, strictly-newer version exists. At that
143
- * point whatever `npx @latest` resolves to is guaranteed to postdate this build and understand
144
- * `--self-heal-check`, because versions only move forward under this project's manual, sequential
145
- * publish model -- so the old-dispatch bug cannot trigger here.
190
+ * only spawns the npx follow-up once that confirms a real, strictly-newer version exists. Versions
191
+ * only move forward under this project's manual, sequential publish model, so `npx @latest` lands
192
+ * on this build or newer, unless npm config (min-release-age, a lagging mirror) holds it back. The
193
+ * precheck logs that skew. A held-back child from this release on refuses to downgrade, but an older
194
+ * one does not have that check.
146
195
  */
147
196
  export declare function runSelfHealPrecheck(): void;
148
197
  /** The awaitable core of runSelfHealPrecheck(), exported so a test can await its outcome
149
198
  * directly instead of polling for the fire-and-forget wrapper to finish. */
150
199
  export declare function runSelfHealPrecheckAsync(): Promise<void>;
200
+ export interface UpdateCheckResult {
201
+ installed: string | null;
202
+ latest: string | null;
203
+ updateAvailable: boolean;
204
+ /** The installed bundle is already newer than the app asking, so a restart (no install) picks it up. */
205
+ restartAvailable?: boolean;
206
+ error?: string;
207
+ }
208
+ /** Whether the registry has a newer Radar than the installed app, or the installed app is already
209
+ * ahead of `runningVersion` and just needs a restart. Never throws; failures land in `error`. */
210
+ export declare function checkForUpdate(runningVersion?: string): Promise<UpdateCheckResult>;
211
+ export interface UpdateNowResult {
212
+ updated: boolean;
213
+ error?: string;
214
+ }
215
+ /** Entry point for `install-app --update-now`. Reuses the self-heal rebuild, so an explicit update
216
+ * stays subject to the same npm config as the background one. */
217
+ export declare function runUpdateNow(): Promise<void>;