import { DapClient, type Backoff, type Timers } from './conn.js'; import { Inbox } from './inbox.js'; import type { ExtensionAPI } from './types.js'; export interface ExtensionOptions { /** Test/config overrides; otherwise env (DAP_HUB_URL / DAP_KEY_PATH / * DAP_AGENT_NAME / DAP_CHANNELS_FILE) > ~/.dap/config.json > defaults. */ url?: string; keyPath?: string; name?: string; channelsFile?: string; channels?: Record; channelPrivs?: Record; backoff?: Partial; timers?: Timers; } export interface DapExtension { client: DapClient; inbox: Inbox; dispose(): void; } /** Owner gate: without ANY resolvable credential (DAP_MASTER_SECRET to * enroll, or a client secret via env / config to connect) the whole * extension stays inert — no socket, no reconnect, no poller, no footer. * The one honest error every gated tool/command answers with. */ export declare const DISABLED_ERROR = "no DAP credential \u2014 set DAP_MASTER_SECRET (enroll) or DAP_CLIENT_SECRET / config clientSecret (connect); DAP disabled"; /** * oh-my-pi DAP/1 extension. Default-export factory: * registers dap_send/dap_dm/dap_invite/dap_inbox/dap_whois tools, keeps one * inbox entries. Channel keys auto-generate on first send and persist to * ~/.dap/channels.json; invites travel as E2E DMs (see dap_invite). */ export default function dapExtension(ctx: ExtensionAPI, overrides?: ExtensionOptions): DapExtension;