import { a as IDevtoolsObservableDomain, i as IDevtoolsActionEntry, l as IDevtoolsSnapshotScope, n as IActionDevtoolsCoreOptions, o as TDevtoolsActionStatus, s as TDevtoolsListener, t as ActionDevtoolsCore } from "../../ActionDevtoolsCore-DM3F2IXJ.mjs"; //#region src/devtools/server/actionDomainScope.d.ts interface IActionDomainScopeOptions { /** Max action entries to retain in the server-side collector. Default 200. */ maxEntries?: number; /** * Whether action **payload contents** (`input` / `output` / `error` / `abortReason` / progress * values) leave this process — both in the `console` sink's log lines and in the snapshot streamed * to an attached devtools window. * * **Default `false`: metrics and lifecycle metadata only.** A server scope can be observed over a * socket (a Durable Object's dev endpoint, a relay), and a request body is the last thing that * should ride that channel by accident. Action id, domain, status, timings, durations and error * *shape* still stream — enough to answer "what ran, how long, did it fail". Turn it on * deliberately, in dev, when you need to see the values. * * (Before this existed the console sink honoured a `logPayloads` flag while the snapshot streamed * payloads regardless — the gap this closes.) */ logPayloads?: boolean; } /** * The snapshot an action domain contributes to a server devtools host: the recent * server-side actions (same normalized entries the frontend panel renders), so a * devtools window can show what a backend actually ran. Cloneable data. */ interface IActionServerScopeSnapshot { kind: "action"; domain: string; entries: readonly IDevtoolsActionEntry[]; } /** * Plug an action domain into a server devtools host (devtools-revamp Wave D). Builds * on the same React-free `ActionDevtoolsCore` collector the frontend uses, so the * host can both stream the server's action list to a window (`relay` sink) and log * each action's lifecycle (`console` sink) — folding the old `ActionServerDevtools` * logger in as one sink of the unified host. * * Takes a **root** action domain — the same thing the frontend's `domains:` option takes. An action * whose root is not attached here simply never surfaces. * * ```ts * import { createServerDevtoolsHost } from "@nice-code/devtools-core"; * import { actionDomainScope } from "@nice-code/action/devtools/server"; * * createServerDevtoolsHost({ name: "api", sinks: ["console"] }) * .contribute(actionDomainScope(act_root)) * .start(); * ``` * * Most backends never write this: `createNiceServerDevtools({ domains: [act_root] })` builds it. */ declare function actionDomainScope(domain: IDevtoolsObservableDomain, options?: IActionDomainScopeOptions): IDevtoolsSnapshotScope; //#endregion export { ActionDevtoolsCore, type IActionDevtoolsCoreOptions, type IActionDomainScopeOptions, type IActionServerScopeSnapshot, type IDevtoolsActionEntry, type IDevtoolsObservableDomain, type TDevtoolsActionStatus, type TDevtoolsListener, actionDomainScope }; //# sourceMappingURL=index.d.mts.map