/** * daemon/outbound.ts — a session reaching into systems we have no connector for. * * The mirror image of `inbound.ts`, and the more valuable half. * * Automation platforms are full of hands and empty of judgement: TinyCommand * ships 2,023 actions against 414 triggers, and its biggest business * integrations — Salesforce, Zoom — have actions only. Their agents run in a * cloud with no access to your files, your machine, or you. Ours is the * inverse: judgement, local context and a human reachable by voice, with no * connector to Stripe or HubSpot and no intention of writing one. * * So: a session decides, and POSTs `{action, params}` at a webhook the platform * already exposes. Their workflow fans it out to whichever of their actions it * needs. We never learn an API, never hold a vendor credential, and never * maintain a connector — the platform holds all three, which is the one thing * it is genuinely good at. * * The constraints mirror inbound for the same reasons: * * - **Targets are named at the terminal, never derived from a payload.** A * session choosing an arbitrary URL is a session with an unbounded egress * channel. Naming one is a decision, and it is recorded. * - **Every call is audited**, request and outcome. An action taken in someone * else's system with no local trace is the worst of both worlds. * - **Secrets are shown once**, on creation, and never by `list`. */ export interface OutboundTarget { /** Short name a session calls by. */ name: string; /** Webhook the platform exposes. */ url: string; /** Header name carrying the secret, if the platform wants one. */ header?: string; /** The secret itself. Never printed after creation. */ secret?: string; /** What lives on the other end, for whoever reads this in six months. */ note?: string; enabled?: boolean; createdAt: string; } export declare function listTargets(): OutboundTarget[]; export declare function findTarget(name: string): OutboundTarget | undefined; export declare function addTarget(name: string, opts: { url: string; header?: string; secret?: string; note?: string; }): OutboundTarget; export declare function removeTarget(name: string): boolean; export interface OutboundResult { ok: boolean; status?: number; body?: string; error?: string; } /** * Call a named target with an action and its parameters. * * The body is deliberately dull — `{ action, params, session, at }` — because * the shape is a contract with a workflow somebody drew on a canvas, and a * contract that changes with the caller's mood is not one. Anything richer * belongs inside `params`. */ export declare function callOutbound(name: string, action: string, params: Record, caller: string, fetchImpl?: typeof fetch): Promise; //# sourceMappingURL=outbound.d.ts.map