(context: PluginContext, client: unknown)
| 368 | } |
| 369 | |
| 370 | function buildPluginInput(context: PluginContext, client: unknown): UnknownRecord { |
| 371 | let serverUrl: string | URL = context.serverUrl; |
| 372 | try { |
| 373 | serverUrl = new URL(context.serverUrl); |
| 374 | } catch { |
| 375 | // Keep as string if URL parsing fails. |
| 376 | } |
| 377 | |
| 378 | return { |
| 379 | // Legacy Rust host shape (already used by some plugins) |
| 380 | context, |
| 381 | // TS plugin ecosystem shape |
| 382 | client, |
| 383 | directory: context.directory, |
| 384 | worktree: context.worktree, |
| 385 | serverUrl, |
| 386 | project: { |
| 387 | directory: context.directory, |
| 388 | worktree: context.worktree, |
| 389 | }, |
| 390 | $: createShell(), |
| 391 | }; |
| 392 | } |
| 393 | |
| 394 | // --------------------------------------------------------------------------- |
| 395 | // Handlers |
no test coverage detected