Skip to main content

Function: visibleTo()

visibleTo(tool, ctx): boolean

Defined in: src/server/ai/assistant/registry.ts:19

Whether tool is available to ctx. Scope-gates first (surface), then authorizes:

  • contractor surface: only self-scoped contractor/both tools, and only with a contractor identity;
  • admin surface: requiredDomain === 'self' (cross-surface tools) or a held permitted domain.

Parameters

tool

AnyTool

ctx

ToolContext

Returns

boolean