const require_chunk = require("./chunk-DakpK96I.cjs");
const require_session_store = require("./session-store-yfwnj0OC.cjs");
let path = require("path");
path = require_chunk.__toESM(path, 1);
//#region src/core/tone.ts
function globalPath(dataDir) {
	return path.default.join(dataDir, ".agentic", "tone.json");
}
function customerPath(dataDir, slug) {
	return path.default.join(dataDir, "customers", slug, "tone.json");
}
function readProfile(p) {
	return require_session_store.readJsonFile(p, {});
}
/** Effective profile: global as base, customer fields override. */
function resolveTone(dataDir, slug) {
	const global = readProfile(globalPath(dataDir));
	if (!slug) return global;
	return {
		...global,
		...readProfile(customerPath(dataDir, slug))
	};
}
/** Render a tone profile into an instruction string ("" when blank). */
function toneInstruction(profile) {
	const parts = [];
	if (profile.formality) parts.push(`tone: ${profile.formality}`);
	if (profile.language) parts.push(`language: ${profile.language}`);
	if (profile.dos && profile.dos.length) parts.push(`prefer: ${profile.dos.join(", ")}`);
	if (profile.donts && profile.donts.length) parts.push(`avoid: ${profile.donts.join(", ")}`);
	return parts.join("; ");
}
//#endregion
exports.resolveTone = resolveTone;
exports.toneInstruction = toneInstruction;

//# sourceMappingURL=tone-Cmc7O2Fx.cjs.map