import { createReferenceFeatureInstalledInput } from "../../../src/features/reference-feature/adapters/create-reference-feature-input.ts"; import { scopeSnapshot, testExecutor, type Transport, } from "../../helpers/traffic-test-kit.ts"; /** * The reference feature's real application input, wired to the real V3 * executor over an injected transport. Used to prove collection loads and * multi-operation interactions stay bounded end to end. */ export function referenceFeatureOver( transport: Transport, options: Parameters[1] = {}, ) { const executor = testExecutor(transport, { credentialHeaders: { authorization: "Bearer traffic-test-token" }, ...options, }); return createReferenceFeatureInstalledInput({ http: Object.freeze({ execute(operation, input, context) { return executor.execute(operation, input, { routeId: context.routeId, scope: scopeSnapshot(), ...(context.signal === undefined ? {} : { signal: context.signal }), ...(context.intent === undefined ? {} : { intent: context.intent }), ...(context.execution === undefined ? {} : { execution: context.execution }), }); }, }), }).input; }