/** * synap bridge-setup (HIDDEN) * * One-shot provisioning for the Discord ↔ Synap bridge — the terminal-native * "complete it all" flow. Automates everything that CAN be automated: * * 1. lets you CHOOSE which saved pod the bridge connects to (kept separate * from your global CLI pod via the "discord" surface override), then * resolves a durable hub key + workspace from it * 2. sanity-checks pod reachability + key scope (GET /capabilities) * 3. applies the bridge's OWN capability definition (POST /capabilities/apply) * — read from the bridge repo so there is ONE source of truth * 4. optionally routes the agent's proactive posts back to a Discord channel * 5. writes the bridge .env (pod creds + feature flags), preserving your * existing Discord token / guild / relay settings * 6. prints the bot invite URL + the few steps only a human can do * * Hidden on purpose: this is a dogfood/dev convenience, not a first-class * surface. Not shown in `synap --help`. * * Usage: * synap bridge-setup --client-id [--bridge-dir ] * [--pod ] [--workspace-id ] * [--proactive-channel ] [--enable-react] * [--pod-url ] [--api-key ] */ import { type GovernancePreset } from "../lib/targets.js"; export interface BridgeSetupOpts { /** Saved pod profile to connect the bridge to (separate from the global CLI pod). */ pod?: string; /** Governance preset for the agent — skips the interactive prompt when set. */ governance?: GovernancePreset; podUrl?: string; apiKey?: string; bridgeDir?: string; clientId?: string; workspaceId?: string; proactiveChannel?: string; enableReact?: boolean; /** Discord bot token — provisioned INTO the pod vault (not a loose env var). */ botToken?: string; /** Discord server (guild) id — written to the bridge .env. */ guildId?: string; } export declare function bridgeSetup(opts: BridgeSetupOpts): Promise; /** * Resolve the bundled skills templates directory (standard SKILL.md dirs). * Shared with `synap skill add --bundled` via resolveBundledSkillsDir. */ export declare function resolveBundledSkillsDir(): string | null; /** * Static structural validation of an automation flow, run at seed time. Catches * the silent-failure class the engine can't warn about at runtime: a template * reference to a step that doesn't exist (resolves to ""), a condition node * whose out-edges carry no sourceHandle (the branch prune becomes a no-op — both * branches run, the exact link-gate bug), and a cycle (throws at runtime). * Returns human-readable issue strings; the caller logs them warn-only. */ export declare function validateFlowStructure(flow: { nodes: Array<{ id: string; type: string; data: Record; }>; edges: Array>; }): string[];