/** * definition-app-link — the durable App Link bound to a cloud definition, read * from the Sapiom CORE surface for the session bar's running-app slot * (SAP-3255). * * `GET /v1/workflows/definitions/:id/app-link` → `{ url, status }` (SAP-3633). * Core withholds the URL until a bundle is published, so `"live"` means there * is something to open, not that a sandbox is awake: an App Link sleeps when * idle and starts on demand. Nothing here claims availability. * * Same auth contract as account-plan.ts and vault-secrets.ts: core takes * `Authorization: Bearer`, every path is prefixed `/v1`, and a 401/403 gets * exactly one credential refresh + retry. The key stays server-side. * * READS DEGRADE. Every failure (signed out, unreachable, 404, drifted shape, a * URL that is not `https:`) reads as `{ url: null, status: null }`, which the * slot renders as nothing — exactly the bar an agent without an App Link gets. * A broken dashboard read must never take the session bar down. */ import type { DefinitionAppLinkView } from "../shared/types.js"; import { type ApiKeyProvider } from "./api-key-provider.js"; export declare const NO_APP_LINK: DefinitionAppLinkView; export interface DefinitionAppLinkReader { /** Never throws; see the module header for what degrades to `NO_APP_LINK`. */ read(definitionId: string): Promise; } /** * Narrow core's body to the view. The URL becomes an `href` in the browser, so * only a well-formed `https:` URL survives; a `live` status without one is not * something the slot can open, and reads as nothing. */ export declare function extractDefinitionAppLink(body: unknown): DefinitionAppLinkView; export declare function createDefinitionAppLinkReader(opts: { /** Accepts a provider (preferred — enables refresh-on-401) or a bare key. */ apiKey: string | null | ApiKeyProvider; /** Override the core base URL (resolved from env by default). Test seam. */ baseUrl?: string; /** Injectable fetch. Test seam. */ fetchImpl?: typeof fetch; /** Network deadline per read. Test seam; defaults to {@link READ_TIMEOUT_MS}. */ timeoutMs?: number; }): DefinitionAppLinkReader; //# sourceMappingURL=definition-app-link.d.ts.map