// Cross-arm `[rc-life]` log schema. One emitter shared by rc-spawn and
// rc-daemon so a single `grep '\[rc-life\]'` covers every spawn surface
// under one shape. Field order + null-handling stay identical between
// the arms.
//
// Task 573 — both arms spawn via node-pty + systemd-scope. `path` is
// therefore always `node-pty`; the parameter is preserved for log
// compatibility with prior tooling.
export function emitRcLife(logger, op, source, path, mode, unitToken, fields = {}) {
    const base = `[rc-life] op=${op} source=${source} path=${path} mode=${mode} unitToken=${unitToken}`;
    const extras = Object.entries(fields)
        .map(([k, v]) => `${k}=${v === null ? 'null' : typeof v === 'string' && v.includes(' ') ? JSON.stringify(v) : v}`)
        .join(' ');
    logger(extras ? `${base} ${extras}` : base);
}
//# sourceMappingURL=rc-life.js.map