export const codeDebugCollectLogsDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.debug.collectLogs", kind: "runtime", required: true, description: "Runtime-owned debug log collector exposed through BaseToolExecutorPort.debug.collectLogs." },
    { dependencyId: "runtime.governancePlane.debugReadGrant", kind: "permission", required: true, description: "dryRun:false must carry explicit guard/governance approval before collecting logs." },
];
export function createHostExecutorCodeDebugCollectLogsProvider(executor) {
    const collectLogs = executor?.debug?.collectLogs;
    if (collectLogs === undefined)
        return undefined;
    return async (request, context) => {
        const result = await collectLogs({ sources: request.sources, maxEntries: request.maxEntries, since: request.since, redaction: request.redaction, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
