@@ -209,12 +209,11 @@ export function setPluginRunContext(params: {
|
209 | 209 | return true; |
210 | 210 | } |
211 | 211 | |
212 | | -// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Run-context JSON reads are caller-typed by namespace. |
213 | 212 | /** Reads previously stored plugin run context for one run/plugin/namespace tuple. */ |
214 | | -export function getPluginRunContext<T extends PluginJsonValue = PluginJsonValue>(params: { |
| 213 | +export function getPluginRunContext(params: { |
215 | 214 | pluginId: string; |
216 | 215 | get: PluginRunContextGetParams; |
217 | | -}): T | undefined { |
| 216 | +}): PluginJsonValue | undefined { |
218 | 217 | const runId = normalizeOptionalString(params.get.runId); |
219 | 218 | const namespace = normalizeNamespace(params.get.namespace); |
220 | 219 | if (!runId || !namespace) { |
@@ -224,7 +223,7 @@ export function getPluginRunContext<T extends PluginJsonValue = PluginJsonValue>
|
224 | 223 | runId, |
225 | 224 | pluginId: params.pluginId, |
226 | 225 | })?.get(namespace); |
227 | | -return value === undefined ? undefined : (copyJsonValue(value) as T); |
| 226 | +return value === undefined ? undefined : copyJsonValue(value); |
228 | 227 | } |
229 | 228 | |
230 | 229 | export function clearPluginRunContext(params: { |
@@ -309,7 +308,7 @@ export function dispatchPluginAgentEventSubscriptions(params: {
|
309 | 308 | const ctx = { |
310 | 309 | // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Run-context JSON reads are caller-typed by namespace. |
311 | 310 | getRunContext: <T extends PluginJsonValue = PluginJsonValue>(namespace: string) => |
312 | | -getPluginRunContext<T>({ pluginId, get: { runId, namespace } }), |
| 311 | +getPluginRunContext({ pluginId, get: { runId, namespace } }) as T | undefined, |
313 | 312 | setRunContext: (namespace: string, value: PluginJsonValue) => { |
314 | 313 | setPluginRunContext({ |
315 | 314 | pluginId, |
|