(ref: ConnectionRef)
| 2736 | // arrive mid-invocation (an MCP `notifications/tools/list_changed`, an |
| 2737 | // unknown-tool rejection) where re-listing inline would block the caller. |
| 2738 | const connectionsMarkToolsStale = (ref: ConnectionRef): Effect.Effect<void, StorageFailure> => |
| 2739 | core.updateMany("connection", { |
| 2740 | where: (b: AnyCb) => |
| 2741 | b.and( |
| 2742 | byOwner(ref.owner)(b), |
| 2743 | b("integration", "=", String(ref.integration)), |
| 2744 | b("name", "=", String(ref.name)), |
| 2745 | ), |
| 2746 | set: { tools_synced_at: null }, |
| 2747 | }); |
| 2748 | |
| 2749 | // ------------------------------------------------------------------ |
| 2750 | // Active policy source. |
no test coverage detected