ponch-mcp-server 1.0.86 → 1.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12900,7 +12900,7 @@ var contenidoRejecterContract = MartinContractSchema.parse(
|
|
|
12900
12900
|
);
|
|
12901
12901
|
async function photoBriefingWriter(input) {
|
|
12902
12902
|
const { db, tenantId, brandId, semana, necesidades } = input;
|
|
12903
|
-
const docId = `${brandId}_${semana}`;
|
|
12903
|
+
const docId = `${tenantId}_${brandId}_${semana}`;
|
|
12904
12904
|
const ref = db.collection("tenants").doc(tenantId).collection("marketing_fotobriefings").doc(docId);
|
|
12905
12905
|
const snap = await ref.get();
|
|
12906
12906
|
const existing = snap.exists ? snap.data() : null;
|
|
@@ -12995,7 +12995,7 @@ var rawContract14 = {
|
|
|
12995
12995
|
return `Agregu\xE9 ${output.necesidadesAgregadas} necesidad(es) al briefing semanal de fotos (semana ${input.semana}). Total activas: ${output.totalNecesidades - output.totalCubiertas}/${output.totalNecesidades}.`;
|
|
12996
12996
|
},
|
|
12997
12997
|
auditAction: "marketing.foto_briefing.agregar",
|
|
12998
|
-
extractTargetPath: (input) => `tenants/${input.tenantId}/marketing_fotobriefings/${input.brandId}_${input.semana}`,
|
|
12998
|
+
extractTargetPath: (input) => `tenants/${input.tenantId}/marketing_fotobriefings/${input.tenantId}_${input.brandId}_${input.semana}`,
|
|
12999
12999
|
extractChanges: (input, output) => ({
|
|
13000
13000
|
before: null,
|
|
13001
13001
|
// Helper no captura snapshot pre-merge.
|
|
@@ -17946,15 +17946,16 @@ NUNCA uses update_calendar_slot para asignar fotos \u2014 eso escribe en la agen
|
|
|
17946
17946
|
);
|
|
17947
17947
|
server.tool(
|
|
17948
17948
|
"approve_content",
|
|
17949
|
-
"Approve marketing content for publication. Validates state transition (pendiente_aprobacion \u2192 aprobado).",
|
|
17949
|
+
"Approve marketing content for publication. Validates state transition (pendiente_aprobacion \u2192 aprobado). Requires confirmation: first call returns state=pending_confirmation; pass confirm=true on the second call to execute.",
|
|
17950
17950
|
{
|
|
17951
17951
|
contenidoId: import_zod64.z.string().describe("Marketing content document id"),
|
|
17952
|
-
brandId: import_zod64.z.string().optional().describe("Brand identifier (defaults to session brand)")
|
|
17952
|
+
brandId: import_zod64.z.string().optional().describe("Brand identifier (defaults to session brand)"),
|
|
17953
|
+
confirm: import_zod64.z.boolean().optional().describe("Set to true on the re-invocation after the user confirms. Default false.")
|
|
17953
17954
|
},
|
|
17954
|
-
async ({ contenidoId, brandId: inputBrandId }) => {
|
|
17955
|
+
async ({ contenidoId, brandId: inputBrandId, confirm }) => {
|
|
17955
17956
|
const tenantId = session.requireTenant();
|
|
17956
17957
|
const brandId = inputBrandId ?? session.requireBrand();
|
|
17957
|
-
const ctx = await buildContext(session, brandId);
|
|
17958
|
+
const ctx = await buildContext(session, brandId, { confirmationGranted: confirm === true });
|
|
17958
17959
|
const actor = {
|
|
17959
17960
|
uid: ctx.user.uid,
|
|
17960
17961
|
nombre: ctx.user.nombre ?? ctx.user.uid,
|
|
@@ -17985,16 +17986,17 @@ NUNCA uses update_calendar_slot para asignar fotos \u2014 eso escribe en la agen
|
|
|
17985
17986
|
);
|
|
17986
17987
|
server.tool(
|
|
17987
17988
|
"reject_content",
|
|
17988
|
-
"Reject marketing content with a reason. Validates state transition (pendiente_aprobacion \u2192 rechazado). Reversible via rechazado \u2192 editado \u2192 pendiente_aprobacion \u2192 aprobado.",
|
|
17989
|
+
"Reject marketing content with a reason. Validates state transition (pendiente_aprobacion \u2192 rechazado). Reversible via rechazado \u2192 editado \u2192 pendiente_aprobacion \u2192 aprobado. Requires confirmation: first call returns state=pending_confirmation; pass confirm=true on the second call to execute.",
|
|
17989
17990
|
{
|
|
17990
17991
|
contenidoId: import_zod64.z.string().describe("Marketing content document id"),
|
|
17991
17992
|
motivo: import_zod64.z.string().describe("Reason for rejection (required, surfaced to tenant)"),
|
|
17992
|
-
brandId: import_zod64.z.string().optional().describe("Brand identifier (defaults to session brand)")
|
|
17993
|
+
brandId: import_zod64.z.string().optional().describe("Brand identifier (defaults to session brand)"),
|
|
17994
|
+
confirm: import_zod64.z.boolean().optional().describe("Set to true on the re-invocation after the user confirms. Default false.")
|
|
17993
17995
|
},
|
|
17994
|
-
async ({ contenidoId, motivo, brandId: inputBrandId }) => {
|
|
17996
|
+
async ({ contenidoId, motivo, brandId: inputBrandId, confirm }) => {
|
|
17995
17997
|
const tenantId = session.requireTenant();
|
|
17996
17998
|
const brandId = inputBrandId ?? session.requireBrand();
|
|
17997
|
-
const ctx = await buildContext(session, brandId);
|
|
17999
|
+
const ctx = await buildContext(session, brandId, { confirmationGranted: confirm === true });
|
|
17998
18000
|
const actor = {
|
|
17999
18001
|
uid: ctx.user.uid,
|
|
18000
18002
|
nombre: ctx.user.nombre ?? ctx.user.uid,
|