{"version":3,"file":"index.cjs","names":["path","randomUUID"],"sources":["../../../../src/services/delegationPlatform/index.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport path from 'node:path';\n\nimport type { DelegationPlatform } from '../delegation';\n\nfunction formatBriefPath(entry: string, cwd: string): string {\n  if (!path.isAbsolute(entry)) return path.normalize(entry);\n  const relative = path.relative(cwd, entry);\n  // Outside the run directory the original beats a `../../` chain.\n  return relative && !relative.startsWith('..') ? relative : entry;\n}\n\n/** Supply Node-owned process and path facilities to the host-neutral manager. */\nexport function createNodeDelegationPlatform(\n  environment: Readonly<Record<string, string | undefined>> = process.env,\n): DelegationPlatform {\n  return {\n    environment,\n    processId: process.pid,\n    createRequestId: randomUUID,\n    formatBriefPath,\n  };\n}\n"],"mappings":";;;;;AAKA,SAAS,gBAAgB,OAAe,KAAqB;CAC3D,IAAI,CAACA,UAAAA,QAAK,WAAW,KAAK,GAAG,OAAOA,UAAAA,QAAK,UAAU,KAAK;CACxD,MAAM,WAAWA,UAAAA,QAAK,SAAS,KAAK,KAAK;CAEzC,OAAO,YAAY,CAAC,SAAS,WAAW,IAAI,IAAI,WAAW;AAC7D;;AAGA,SAAgB,6BACd,cAA4D,QAAQ,KAChD;CACpB,OAAO;EACL;EACA,WAAW,QAAQ;EACnB,iBAAiBC,YAAAA;EACjB;CACF;AACF"}