import { AgentTool } from '@earendil-works/pi-agent-core'; import type { Config } from '../../config/schema.js'; export interface CreateShareToolDeps { workspace: string; getConfig: () => Config | undefined; /** Optional agent id for workspace resolution audit (currently unused but kept for parity with /api/shares). */ getAgentId?: () => string | undefined; /** * Optional user-facing locale ('en' / 'zh' / etc.). Falls back to env LANG * → DEFAULT_SERVER_LOCALE when unset. Returned text follows this locale; * the structured `details` payload stays language-neutral. */ getLocale?: () => string | undefined; } /** * Whether the create_share tool is worth registering. Returns false when: * - no gateway config is present (sharing routes wouldn't be reachable anyway), or * - BOTH file sharing (`gateway.share.enabled`) and site sharing * (`gateway.siteShare.enabled`) are explicitly disabled. * * Reachability (`tunnel up?`) is intentionally NOT checked here — it is * runtime state, the tool surfaces it via the `reachability` field, and the * agent should still be able to create local-only shares when the user is * testing or on the same network. */ export declare function isShareToolAvailable(cfg: Config | undefined): boolean; export declare function createCreateShareTool(deps: CreateShareToolDeps): AgentTool;