{"version":3,"file":"signature.mjs","names":[],"sources":["../../../../../../../ai/src/planner/signature.ts"],"sourcesContent":["import type { PlannerCapability } from \"../contracts/planner/planner-capability.type\";\n\n/**\n * Delimiter between capability names in a planner signature. A NUL\n * control character can never appear in a real capability name, so it\n * keeps name boundaries unambiguous — a single capability literally\n * named `\"a,b\"` can never collide with the two capabilities\n * `[\"a\", \"b\"]` (a comma delimiter would render both as `caps:a,b`).\n */\nconst CAPABILITY_DELIMITER = String.fromCharCode(0);\n\n/**\n * Compute a stable structural fingerprint for a planner definition —\n * the planner name plus its ordered capability names. Stamped on every\n * report node the planner produces so trace consumers can tell runs of\n * structurally-different planners apart even when they share a name.\n *\n * Deliberately coarse: it captures WHICH capabilities the planner can\n * dispatch (and in what registration order), not their descriptions or\n * the underlying executables' internals — those don't change the set of\n * plans the planner can produce.\n */\nexport function computeSignature(name: string, capabilities: PlannerCapability[]): string {\n  const capabilityNames = capabilities\n    .map((capability) => capability.name)\n    .join(CAPABILITY_DELIMITER);\n\n  return `planner:${name}|caps:${capabilityNames}`;\n}\n"],"mappings":";;;;;;;;AASA,MAAM,uBAAuB,OAAO,aAAa,CAAC;;;;;;;;;;;;AAalD,SAAgB,iBAAiB,MAAc,cAA2C;CAKxF,OAAO,WAAW,KAAK,QAJC,aACrB,KAAK,eAAe,WAAW,IAAI,CAAC,CACpC,KAAK,oBAEqC;AAC/C"}