ponch-mcp-server 1.0.97 → 1.0.99
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 +25 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -775,6 +775,22 @@ var DisabledOutputSchema = import_zod8.z.object({
|
|
|
775
775
|
function getDisabledMessage(code, locale, vars) {
|
|
776
776
|
return getMessage(`marketing.disabled.${code}`, locale, vars);
|
|
777
777
|
}
|
|
778
|
+
var QUOTA_KEYS = [
|
|
779
|
+
"brands",
|
|
780
|
+
"usuarios",
|
|
781
|
+
"ubicaciones",
|
|
782
|
+
"productos",
|
|
783
|
+
"insumos",
|
|
784
|
+
"ordenesMes",
|
|
785
|
+
"almacenamientoGB",
|
|
786
|
+
"creditosMes",
|
|
787
|
+
"tenantCreditsAllowance",
|
|
788
|
+
"weeklyContentsPerMonth",
|
|
789
|
+
"fotosPorMes",
|
|
790
|
+
"auditOptimizationsPerMonth",
|
|
791
|
+
"aiCostBudgetUSD",
|
|
792
|
+
"brandsIncluidas"
|
|
793
|
+
];
|
|
778
794
|
var SideEffectEnum = import_zod7.z.enum([
|
|
779
795
|
"reads_firestore",
|
|
780
796
|
"writes_firestore",
|
|
@@ -842,7 +858,7 @@ var MartinContractSchema = import_zod7.z.object({
|
|
|
842
858
|
extractTargetPath: ExtractTargetPathSchema.optional(),
|
|
843
859
|
extractChanges: ExtractChangesSchema.optional(),
|
|
844
860
|
// Governance
|
|
845
|
-
quotasConsumed: import_zod7.z.array(import_zod7.z.
|
|
861
|
+
quotasConsumed: import_zod7.z.array(import_zod7.z.enum(QUOTA_KEYS)),
|
|
846
862
|
// ── PermissionScope (HITO 6 A6) ────────────────────────────
|
|
847
863
|
// Cada contract declara EXPLÍCITAMENTE su scope de acceso.
|
|
848
864
|
// Sin paths legacy. Sin opcionales. Un solo modelo.
|
|
@@ -11253,7 +11269,7 @@ var executeRawContract = {
|
|
|
11253
11269
|
creditsConsumed: output.creditsConsumed
|
|
11254
11270
|
} : null
|
|
11255
11271
|
}),
|
|
11256
|
-
quotasConsumed: ["
|
|
11272
|
+
quotasConsumed: ["fotosPorMes"],
|
|
11257
11273
|
permissionScope: "module",
|
|
11258
11274
|
permissionKey: "marketing",
|
|
11259
11275
|
permissionAction: "editar",
|
|
@@ -12625,7 +12641,9 @@ Retorna la foto editada para que la revises. Si no te gusta:
|
|
|
12625
12641
|
- Llama de nuevo con prompt ajustado
|
|
12626
12642
|
- Maximo 3 iteraciones por foto
|
|
12627
12643
|
|
|
12628
|
-
Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si se genera thumbnail y embedding con tus tags
|
|
12644
|
+
Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si se genera thumbnail y embedding con tus tags.
|
|
12645
|
+
|
|
12646
|
+
Consume creditos: la primera llamada retorna state=pending_confirmation; pasa confirm=true en la segunda llamada para ejecutar la edicion.`,
|
|
12629
12647
|
{
|
|
12630
12648
|
fotoId: import_zod63.z.string(),
|
|
12631
12649
|
brandId: import_zod63.z.string().optional().describe("Brand identifier (defaults to session brand)"),
|
|
@@ -12635,9 +12653,10 @@ Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si
|
|
|
12635
12653
|
tipo: import_zod63.z.string().nullable().describe("Tipo del catalogoVisual del tenant"),
|
|
12636
12654
|
tagsPrimarios: import_zod63.z.array(import_zod63.z.string()),
|
|
12637
12655
|
tagsSecundarios: import_zod63.z.array(import_zod63.z.string()),
|
|
12638
|
-
tagsContexto: import_zod63.z.array(import_zod63.z.string())
|
|
12656
|
+
tagsContexto: import_zod63.z.array(import_zod63.z.string()),
|
|
12657
|
+
confirm: import_zod63.z.boolean().optional().describe("Set to true on the re-invocation after the user confirms. Default false. First call returns state=pending_confirmation (consumes credits).")
|
|
12639
12658
|
},
|
|
12640
|
-
async ({ fotoId, brandId: inputBrandId, prompt, acciones, descripcion, tipo, tagsPrimarios, tagsSecundarios, tagsContexto }) => {
|
|
12659
|
+
async ({ fotoId, brandId: inputBrandId, prompt, acciones, descripcion, tipo, tagsPrimarios, tagsSecundarios, tagsContexto, confirm }) => {
|
|
12641
12660
|
const tenantId = session.requireTenant();
|
|
12642
12661
|
const brandId = inputBrandId ?? session.requireBrand();
|
|
12643
12662
|
const executePhotoEditAdapter = async (payload) => {
|
|
@@ -12653,7 +12672,7 @@ Si estrategia era 'tal_cual', pasa acciones=['none'] \u2014 no se edita pero si
|
|
|
12653
12672
|
});
|
|
12654
12673
|
return response.data ?? {};
|
|
12655
12674
|
};
|
|
12656
|
-
const ctx = await buildContext(session, brandId);
|
|
12675
|
+
const ctx = await buildContext(session, brandId, { confirmationGranted: confirm === true });
|
|
12657
12676
|
const dispatchResult = await dispatchWithContract({
|
|
12658
12677
|
contract: photoDirectorExecuteContract,
|
|
12659
12678
|
// `lang` resuelto DENTRO del closure helper (solo corre en Modo A).
|