ponch-mcp-server 1.0.96 → 1.0.97
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 +14 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12578,14 +12578,19 @@ Luego llama execute_photo_edit con tu analisis y prompt.`,
|
|
|
12578
12578
|
async ({ fotoId, brandId: inputBrandId }) => {
|
|
12579
12579
|
const tenantId = session.requireTenant();
|
|
12580
12580
|
const brandId = inputBrandId ?? session.requireBrand();
|
|
12581
|
-
const lang = await resolveTenantLanguage(tenantId);
|
|
12582
12581
|
const ctx = await buildContext(session, brandId);
|
|
12583
12582
|
const dispatchResult = await dispatchWithContract({
|
|
12584
12583
|
contract: photoDirectorPlanContract,
|
|
12585
|
-
helper:
|
|
12584
|
+
// `lang` se resuelve DENTRO del closure helper: dispatchWithContract
|
|
12585
|
+
// solo invoca `helper` en Modo A (admin SDK disponible); en Modo B
|
|
12586
|
+
// corre el `callable` (CF), cuyo runtime resuelve idioma server-side.
|
|
12587
|
+
// resolveTenantLanguage usa firebase-admin getFirestore(), que en el
|
|
12588
|
+
// proceso MCP Modo B (Client SDK, sin initializeApp) NO tiene default
|
|
12589
|
+
// app y lanzaba "The default Firebase app does not exist".
|
|
12590
|
+
helper: async (input) => photoDirectorPlan({
|
|
12586
12591
|
...input,
|
|
12587
12592
|
deps: { compressImageForTransport },
|
|
12588
|
-
lang
|
|
12593
|
+
lang: await resolveTenantLanguage(tenantId)
|
|
12589
12594
|
}),
|
|
12590
12595
|
callable: callPhotoDirectorPlan,
|
|
12591
12596
|
input: { tenantId, brandId, fotoId },
|
|
@@ -12635,7 +12640,6 @@ Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si
|
|
|
12635
12640
|
async ({ fotoId, brandId: inputBrandId, prompt, acciones, descripcion, tipo, tagsPrimarios, tagsSecundarios, tagsContexto }) => {
|
|
12636
12641
|
const tenantId = session.requireTenant();
|
|
12637
12642
|
const brandId = inputBrandId ?? session.requireBrand();
|
|
12638
|
-
const lang = await resolveTenantLanguage(tenantId);
|
|
12639
12643
|
const executePhotoEditAdapter = async (payload) => {
|
|
12640
12644
|
const cfUrl = process.env.MARKETING_PHOTO_EDIT_CF_URL || "https://us-central1-atteyo-ops.cloudfunctions.net/marketingExecutePhotoEdit";
|
|
12641
12645
|
const { GoogleAuth: GoogleAuth2 } = await import("google-auth-library");
|
|
@@ -12652,10 +12656,14 @@ Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si
|
|
|
12652
12656
|
const ctx = await buildContext(session, brandId);
|
|
12653
12657
|
const dispatchResult = await dispatchWithContract({
|
|
12654
12658
|
contract: photoDirectorExecuteContract,
|
|
12655
|
-
helper
|
|
12659
|
+
// `lang` resuelto DENTRO del closure helper (solo corre en Modo A).
|
|
12660
|
+
// Ver nota en plan_photo_edit: en Modo B corre el callable (CF) y
|
|
12661
|
+
// resolveTenantLanguage (firebase-admin) no tiene default app en el
|
|
12662
|
+
// proceso MCP Client SDK.
|
|
12663
|
+
helper: async (input) => photoDirectorExecute({
|
|
12656
12664
|
...input,
|
|
12657
12665
|
deps: { compressImageForTransport, executePhotoEdit: executePhotoEditAdapter },
|
|
12658
|
-
lang
|
|
12666
|
+
lang: await resolveTenantLanguage(tenantId)
|
|
12659
12667
|
}),
|
|
12660
12668
|
callable: callPhotoDirectorExecute,
|
|
12661
12669
|
// Refactor 7.2: tenantId+brandId requeridos en input para path
|