@nextblock-cms/cortex 0.14.6 → 0.15.1

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.
@@ -46,6 +46,12 @@ type ToolExecutionContext = {
46
46
  latestUserMessage?: string | null;
47
47
  pageContext?: CortexAiPageContext | null;
48
48
  recordRevision?: RecordRevisionFn;
49
+ /**
50
+ * Set by the MCP route when a bearer token outlived the account that created it,
51
+ * so `actorUserId` is a substituted stand-in. Usable for attribution, never for
52
+ * authorization — see the role checks in ai-global-agent-theming-tools.ts.
53
+ */
54
+ actorFromOrphanedToken?: boolean;
49
55
  revalidatePath?: RevalidateFn;
50
56
  skipConfirmation?: boolean;
51
57
  supabase?: SupabaseLike;
@@ -140,8 +146,8 @@ export declare const fetchEcommerceStatsInputSchema: z.ZodObject<{
140
146
  }, z.core.$strip>;
141
147
  export declare const cortexAiPageContextSchema: z.ZodObject<{
142
148
  contentType: z.ZodEnum<{
143
- product: "product";
144
149
  page: "page";
150
+ product: "product";
145
151
  post: "post";
146
152
  }>;
147
153
  currentEditor: z.ZodOptional<z.ZodObject<{
@@ -156,10 +162,30 @@ export declare const cortexAiPageContextSchema: z.ZodObject<{
156
162
  translationGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
163
  }, z.core.$strict>;
158
164
  export declare const readCurrentCmsItemInputSchema: z.ZodObject<{
165
+ cmsTarget: z.ZodOptional<z.ZodObject<{
166
+ contentType: z.ZodOptional<z.ZodEnum<{
167
+ page: "page";
168
+ product: "product";
169
+ post: "post";
170
+ }>>;
171
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
172
+ slug: z.ZodOptional<z.ZodString>;
173
+ title: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strict>>;
159
175
  includeBlockContent: z.ZodDefault<z.ZodBoolean>;
160
176
  includeBlocks: z.ZodDefault<z.ZodBoolean>;
161
177
  }, z.core.$strict>;
162
178
  export declare const updateCurrentCmsFieldsInputSchema: z.ZodObject<{
179
+ cmsTarget: z.ZodOptional<z.ZodObject<{
180
+ contentType: z.ZodOptional<z.ZodEnum<{
181
+ page: "page";
182
+ product: "product";
183
+ post: "post";
184
+ }>>;
185
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
186
+ slug: z.ZodOptional<z.ZodString>;
187
+ title: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strict>>;
163
189
  fields: z.ZodObject<{
164
190
  description_json: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
165
191
  excerpt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -198,6 +224,16 @@ export declare const updateContentBlockInputSchema: z.ZodObject<{
198
224
  cart: "cart";
199
225
  product_details: "product_details";
200
226
  }>>;
227
+ cmsTarget: z.ZodOptional<z.ZodObject<{
228
+ contentType: z.ZodOptional<z.ZodEnum<{
229
+ page: "page";
230
+ product: "product";
231
+ post: "post";
232
+ }>>;
233
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
234
+ slug: z.ZodOptional<z.ZodString>;
235
+ title: z.ZodOptional<z.ZodString>;
236
+ }, z.core.$strict>>;
201
237
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
202
238
  }, z.core.$strict>;
203
239
  export declare const updateSectionColumnBlockInputSchema: z.ZodObject<{
@@ -218,14 +254,24 @@ export declare const updateSectionColumnBlockInputSchema: z.ZodObject<{
218
254
  cart: "cart";
219
255
  product_details: "product_details";
220
256
  }>>;
257
+ cmsTarget: z.ZodOptional<z.ZodObject<{
258
+ contentType: z.ZodOptional<z.ZodEnum<{
259
+ page: "page";
260
+ product: "product";
261
+ post: "post";
262
+ }>>;
263
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
264
+ slug: z.ZodOptional<z.ZodString>;
265
+ title: z.ZodOptional<z.ZodString>;
266
+ }, z.core.$strict>>;
221
267
  columnIndex: z.ZodNumber;
222
268
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
223
269
  parentBlockId: z.ZodNumber;
224
270
  }, z.core.$strict>;
225
271
  export declare const setContentImagesInputSchema: z.ZodObject<{
226
272
  contentType: z.ZodOptional<z.ZodEnum<{
227
- product: "product";
228
273
  page: "page";
274
+ product: "product";
229
275
  post: "post";
230
276
  }>>;
231
277
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -236,8 +282,8 @@ export declare const setContentImagesInputSchema: z.ZodObject<{
236
282
  type SetContentImagesInput = z.input<typeof setContentImagesInputSchema>;
237
283
  export declare const insertContentBlockInputSchema: z.ZodObject<{
238
284
  contentType: z.ZodOptional<z.ZodEnum<{
239
- product: "product";
240
285
  page: "page";
286
+ product: "product";
241
287
  post: "post";
242
288
  }>>;
243
289
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -419,8 +465,8 @@ export declare const createCmsProductInputSchema: z.ZodObject<{
419
465
  }, z.core.$strict>;
420
466
  export declare const updateCmsItemFieldInputSchema: z.ZodObject<{
421
467
  contentType: z.ZodOptional<z.ZodEnum<{
422
- product: "product";
423
468
  page: "page";
469
+ product: "product";
424
470
  post: "post";
425
471
  }>>;
426
472
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -434,8 +480,8 @@ export declare const updateCmsItemFieldInputSchema: z.ZodObject<{
434
480
  }, z.core.$strict>;
435
481
  export declare const prepareDeleteCmsItemInputSchema: z.ZodObject<{
436
482
  contentType: z.ZodOptional<z.ZodEnum<{
437
- product: "product";
438
483
  page: "page";
484
+ product: "product";
439
485
  post: "post";
440
486
  }>>;
441
487
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -444,8 +490,8 @@ export declare const prepareDeleteCmsItemInputSchema: z.ZodObject<{
444
490
  }, z.core.$strict>;
445
491
  export declare const deleteCmsItemInputSchema: z.ZodObject<{
446
492
  contentType: z.ZodOptional<z.ZodEnum<{
447
- product: "product";
448
493
  page: "page";
494
+ product: "product";
449
495
  post: "post";
450
496
  }>>;
451
497
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -592,8 +638,8 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
592
638
  }, z.core.$strict>, z.ZodObject<{
593
639
  input: z.ZodObject<{
594
640
  contentType: z.ZodOptional<z.ZodEnum<{
595
- product: "product";
596
641
  page: "page";
642
+ product: "product";
597
643
  post: "post";
598
644
  }>>;
599
645
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -604,8 +650,8 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
604
650
  }, z.core.$strict>, z.ZodObject<{
605
651
  input: z.ZodObject<{
606
652
  contentType: z.ZodOptional<z.ZodEnum<{
607
- product: "product";
608
653
  page: "page";
654
+ product: "product";
609
655
  post: "post";
610
656
  }>>;
611
657
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -637,14 +683,24 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
637
683
  cart: "cart";
638
684
  product_details: "product_details";
639
685
  }>>;
686
+ cmsTarget: z.ZodOptional<z.ZodObject<{
687
+ contentType: z.ZodOptional<z.ZodEnum<{
688
+ page: "page";
689
+ product: "product";
690
+ post: "post";
691
+ }>>;
692
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
693
+ slug: z.ZodOptional<z.ZodString>;
694
+ title: z.ZodOptional<z.ZodString>;
695
+ }, z.core.$strict>>;
640
696
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
641
697
  }, z.core.$strict>;
642
698
  tool: z.ZodLiteral<"update_content_block">;
643
699
  }, z.core.$strict>, z.ZodObject<{
644
700
  input: z.ZodObject<{
645
701
  contentType: z.ZodOptional<z.ZodEnum<{
646
- product: "product";
647
702
  page: "page";
703
+ product: "product";
648
704
  post: "post";
649
705
  }>>;
650
706
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -697,6 +753,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
697
753
  tool: z.ZodLiteral<"insert_content_block">;
698
754
  }, z.core.$strict>, z.ZodObject<{
699
755
  input: z.ZodObject<{
756
+ cmsTarget: z.ZodOptional<z.ZodObject<{
757
+ contentType: z.ZodOptional<z.ZodEnum<{
758
+ page: "page";
759
+ product: "product";
760
+ post: "post";
761
+ }>>;
762
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
763
+ slug: z.ZodOptional<z.ZodString>;
764
+ title: z.ZodOptional<z.ZodString>;
765
+ }, z.core.$strict>>;
700
766
  fields: z.ZodObject<{
701
767
  description_json: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
702
768
  excerpt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -789,6 +855,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
789
855
  cart: "cart";
790
856
  product_details: "product_details";
791
857
  }>>;
858
+ cmsTarget: z.ZodOptional<z.ZodObject<{
859
+ contentType: z.ZodOptional<z.ZodEnum<{
860
+ page: "page";
861
+ product: "product";
862
+ post: "post";
863
+ }>>;
864
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
865
+ slug: z.ZodOptional<z.ZodString>;
866
+ title: z.ZodOptional<z.ZodString>;
867
+ }, z.core.$strict>>;
792
868
  columnIndex: z.ZodNumber;
793
869
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
794
870
  parentBlockId: z.ZodNumber;
@@ -797,8 +873,8 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
797
873
  }, z.core.$strict>, z.ZodObject<{
798
874
  input: z.ZodObject<{
799
875
  contentType: z.ZodOptional<z.ZodEnum<{
800
- product: "product";
801
876
  page: "page";
877
+ product: "product";
802
878
  post: "post";
803
879
  }>>;
804
880
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -1079,8 +1155,8 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1079
1155
  upc?: string | null | undefined;
1080
1156
  }>>, z.ZodPipe<z.ZodObject<{
1081
1157
  contentType: z.ZodOptional<z.ZodEnum<{
1082
- product: "product";
1083
1158
  page: "page";
1159
+ product: "product";
1084
1160
  post: "post";
1085
1161
  }>>;
1086
1162
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -1089,7 +1165,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1089
1165
  tool: z.ZodLiteral<"delete_cms_item">;
1090
1166
  }, z.core.$strict>, z.ZodTransform<{
1091
1167
  input: {
1092
- contentType?: "product" | "page" | "post" | undefined;
1168
+ contentType?: "page" | "product" | "post" | undefined;
1093
1169
  entityId?: string | number | undefined;
1094
1170
  slug?: string | undefined;
1095
1171
  title?: string | undefined;
@@ -1097,14 +1173,14 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1097
1173
  tool: "delete_cms_item";
1098
1174
  }, {
1099
1175
  tool: "delete_cms_item";
1100
- contentType?: "product" | "page" | "post" | undefined;
1176
+ contentType?: "page" | "product" | "post" | undefined;
1101
1177
  entityId?: string | number | undefined;
1102
1178
  slug?: string | undefined;
1103
1179
  title?: string | undefined;
1104
1180
  }>>, z.ZodPipe<z.ZodObject<{
1105
1181
  contentType: z.ZodOptional<z.ZodEnum<{
1106
- product: "product";
1107
1182
  page: "page";
1183
+ product: "product";
1108
1184
  post: "post";
1109
1185
  }>>;
1110
1186
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -1120,7 +1196,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1120
1196
  input: {
1121
1197
  field: string;
1122
1198
  value: unknown;
1123
- contentType?: "product" | "page" | "post" | undefined;
1199
+ contentType?: "page" | "product" | "post" | undefined;
1124
1200
  entityId?: string | number | undefined;
1125
1201
  slug?: string | undefined;
1126
1202
  title?: string | undefined;
@@ -1133,7 +1209,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1133
1209
  field: string;
1134
1210
  value: unknown;
1135
1211
  tool: "update_cms_item_field";
1136
- contentType?: "product" | "page" | "post" | undefined;
1212
+ contentType?: "page" | "product" | "post" | undefined;
1137
1213
  entityId?: string | number | undefined;
1138
1214
  slug?: string | undefined;
1139
1215
  title?: string | undefined;
@@ -1158,6 +1234,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1158
1234
  cart: "cart";
1159
1235
  product_details: "product_details";
1160
1236
  }>>;
1237
+ cmsTarget: z.ZodOptional<z.ZodObject<{
1238
+ contentType: z.ZodOptional<z.ZodEnum<{
1239
+ page: "page";
1240
+ product: "product";
1241
+ post: "post";
1242
+ }>>;
1243
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1244
+ slug: z.ZodOptional<z.ZodString>;
1245
+ title: z.ZodOptional<z.ZodString>;
1246
+ }, z.core.$strict>>;
1161
1247
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1162
1248
  tool: z.ZodLiteral<"update_content_block">;
1163
1249
  }, z.core.$strict>, z.ZodTransform<{
@@ -1165,6 +1251,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1165
1251
  blockId: number;
1166
1252
  content: Record<string, unknown>;
1167
1253
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1254
+ cmsTarget?: {
1255
+ contentType?: "page" | "product" | "post" | undefined;
1256
+ entityId?: string | number | undefined;
1257
+ slug?: string | undefined;
1258
+ title?: string | undefined;
1259
+ } | undefined;
1168
1260
  };
1169
1261
  tool: "update_content_block";
1170
1262
  }, {
@@ -1172,10 +1264,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1172
1264
  content: Record<string, unknown>;
1173
1265
  tool: "update_content_block";
1174
1266
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1267
+ cmsTarget?: {
1268
+ contentType?: "page" | "product" | "post" | undefined;
1269
+ entityId?: string | number | undefined;
1270
+ slug?: string | undefined;
1271
+ title?: string | undefined;
1272
+ } | undefined;
1175
1273
  }>>, z.ZodPipe<z.ZodObject<{
1176
1274
  contentType: z.ZodOptional<z.ZodEnum<{
1177
- product: "product";
1178
1275
  page: "page";
1276
+ product: "product";
1179
1277
  post: "post";
1180
1278
  }>>;
1181
1279
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -1233,7 +1331,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1233
1331
  order?: number | undefined;
1234
1332
  };
1235
1333
  position: "start" | "before" | "after" | "end";
1236
- contentType?: "product" | "page" | "post" | undefined;
1334
+ contentType?: "page" | "product" | "post" | undefined;
1237
1335
  entityId?: string | number | undefined;
1238
1336
  slug?: string | undefined;
1239
1337
  title?: string | undefined;
@@ -1249,13 +1347,23 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1249
1347
  };
1250
1348
  position: "start" | "before" | "after" | "end";
1251
1349
  tool: "insert_content_block";
1252
- contentType?: "product" | "page" | "post" | undefined;
1350
+ contentType?: "page" | "product" | "post" | undefined;
1253
1351
  entityId?: string | number | undefined;
1254
1352
  slug?: string | undefined;
1255
1353
  title?: string | undefined;
1256
1354
  anchorBlockId?: number | undefined;
1257
1355
  anchorBlockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1258
1356
  }>>, z.ZodPipe<z.ZodObject<{
1357
+ cmsTarget: z.ZodOptional<z.ZodObject<{
1358
+ contentType: z.ZodOptional<z.ZodEnum<{
1359
+ page: "page";
1360
+ product: "product";
1361
+ post: "post";
1362
+ }>>;
1363
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1364
+ slug: z.ZodOptional<z.ZodString>;
1365
+ title: z.ZodOptional<z.ZodString>;
1366
+ }, z.core.$strict>>;
1259
1367
  fields: z.ZodObject<{
1260
1368
  description_json: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
1261
1369
  excerpt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -1292,6 +1400,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1292
1400
  subtitle?: string | null | undefined;
1293
1401
  title?: string | undefined;
1294
1402
  };
1403
+ cmsTarget?: {
1404
+ contentType?: "page" | "product" | "post" | undefined;
1405
+ entityId?: string | number | undefined;
1406
+ slug?: string | undefined;
1407
+ title?: string | undefined;
1408
+ } | undefined;
1295
1409
  };
1296
1410
  tool: "update_current_cms_fields";
1297
1411
  }, {
@@ -1310,6 +1424,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1310
1424
  title?: string | undefined;
1311
1425
  };
1312
1426
  tool: "update_current_cms_fields";
1427
+ cmsTarget?: {
1428
+ contentType?: "page" | "product" | "post" | undefined;
1429
+ entityId?: string | number | undefined;
1430
+ slug?: string | undefined;
1431
+ title?: string | undefined;
1432
+ } | undefined;
1313
1433
  }>>, z.ZodPipe<z.ZodObject<{
1314
1434
  copyright: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1315
1435
  languageCode: z.ZodDefault<z.ZodString>;
@@ -1444,6 +1564,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1444
1564
  cart: "cart";
1445
1565
  product_details: "product_details";
1446
1566
  }>>;
1567
+ cmsTarget: z.ZodOptional<z.ZodObject<{
1568
+ contentType: z.ZodOptional<z.ZodEnum<{
1569
+ page: "page";
1570
+ product: "product";
1571
+ post: "post";
1572
+ }>>;
1573
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1574
+ slug: z.ZodOptional<z.ZodString>;
1575
+ title: z.ZodOptional<z.ZodString>;
1576
+ }, z.core.$strict>>;
1447
1577
  columnIndex: z.ZodNumber;
1448
1578
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1449
1579
  parentBlockId: z.ZodNumber;
@@ -1455,6 +1585,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1455
1585
  content: Record<string, unknown>;
1456
1586
  parentBlockId: number;
1457
1587
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1588
+ cmsTarget?: {
1589
+ contentType?: "page" | "product" | "post" | undefined;
1590
+ entityId?: string | number | undefined;
1591
+ slug?: string | undefined;
1592
+ title?: string | undefined;
1593
+ } | undefined;
1458
1594
  };
1459
1595
  tool: "update_section_column_block";
1460
1596
  }, {
@@ -1464,10 +1600,16 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1464
1600
  parentBlockId: number;
1465
1601
  tool: "update_section_column_block";
1466
1602
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1603
+ cmsTarget?: {
1604
+ contentType?: "page" | "product" | "post" | undefined;
1605
+ entityId?: string | number | undefined;
1606
+ slug?: string | undefined;
1607
+ title?: string | undefined;
1608
+ } | undefined;
1467
1609
  }>>, z.ZodPipe<z.ZodObject<{
1468
1610
  contentType: z.ZodOptional<z.ZodEnum<{
1469
- product: "product";
1470
1611
  page: "page";
1612
+ product: "product";
1471
1613
  post: "post";
1472
1614
  }>>;
1473
1615
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -1478,7 +1620,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1478
1620
  }, z.core.$strict>, z.ZodTransform<{
1479
1621
  input: {
1480
1622
  images: string[];
1481
- contentType?: "product" | "page" | "post" | undefined;
1623
+ contentType?: "page" | "product" | "post" | undefined;
1482
1624
  entityId?: string | number | undefined;
1483
1625
  slug?: string | undefined;
1484
1626
  title?: string | undefined;
@@ -1487,7 +1629,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1487
1629
  }, {
1488
1630
  images: string[];
1489
1631
  tool: "set_content_images";
1490
- contentType?: "product" | "page" | "post" | undefined;
1632
+ contentType?: "page" | "product" | "post" | undefined;
1491
1633
  entityId?: string | number | undefined;
1492
1634
  slug?: string | undefined;
1493
1635
  title?: string | undefined;
@@ -1566,7 +1708,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1566
1708
  tool: "create_cms_product";
1567
1709
  } | {
1568
1710
  input: {
1569
- contentType?: "product" | "page" | "post" | undefined;
1711
+ contentType?: "page" | "product" | "post" | undefined;
1570
1712
  entityId?: string | number | undefined;
1571
1713
  slug?: string | undefined;
1572
1714
  title?: string | undefined;
@@ -1576,7 +1718,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1576
1718
  input: {
1577
1719
  field: string;
1578
1720
  value: unknown;
1579
- contentType?: "product" | "page" | "post" | undefined;
1721
+ contentType?: "page" | "product" | "post" | undefined;
1580
1722
  entityId?: string | number | undefined;
1581
1723
  slug?: string | undefined;
1582
1724
  title?: string | undefined;
@@ -1590,6 +1732,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1590
1732
  blockId: number;
1591
1733
  content: Record<string, unknown>;
1592
1734
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1735
+ cmsTarget?: {
1736
+ contentType?: "page" | "product" | "post" | undefined;
1737
+ entityId?: string | number | undefined;
1738
+ slug?: string | undefined;
1739
+ title?: string | undefined;
1740
+ } | undefined;
1593
1741
  };
1594
1742
  tool: "update_content_block";
1595
1743
  } | {
@@ -1600,7 +1748,7 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1600
1748
  order?: number | undefined;
1601
1749
  };
1602
1750
  position: "start" | "before" | "after" | "end";
1603
- contentType?: "product" | "page" | "post" | undefined;
1751
+ contentType?: "page" | "product" | "post" | undefined;
1604
1752
  entityId?: string | number | undefined;
1605
1753
  slug?: string | undefined;
1606
1754
  title?: string | undefined;
@@ -1624,6 +1772,12 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1624
1772
  subtitle?: string | null | undefined;
1625
1773
  title?: string | undefined;
1626
1774
  };
1775
+ cmsTarget?: {
1776
+ contentType?: "page" | "product" | "post" | undefined;
1777
+ entityId?: string | number | undefined;
1778
+ slug?: string | undefined;
1779
+ title?: string | undefined;
1780
+ } | undefined;
1627
1781
  };
1628
1782
  tool: "update_current_cms_fields";
1629
1783
  } | {
@@ -1669,12 +1823,18 @@ export declare const executeCmsActionPlanInputSchema: z.ZodObject<{
1669
1823
  content: Record<string, unknown>;
1670
1824
  parentBlockId: number;
1671
1825
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
1826
+ cmsTarget?: {
1827
+ contentType?: "page" | "product" | "post" | undefined;
1828
+ entityId?: string | number | undefined;
1829
+ slug?: string | undefined;
1830
+ title?: string | undefined;
1831
+ } | undefined;
1672
1832
  };
1673
1833
  tool: "update_section_column_block";
1674
1834
  } | {
1675
1835
  input: {
1676
1836
  images: string[];
1677
- contentType?: "product" | "page" | "post" | undefined;
1837
+ contentType?: "page" | "product" | "post" | undefined;
1678
1838
  entityId?: string | number | undefined;
1679
1839
  slug?: string | undefined;
1680
1840
  title?: string | undefined;
@@ -1776,7 +1936,7 @@ export declare function executeReadCurrentCmsItem(input: ReadCurrentCmsItemInput
1776
1936
  postId: any;
1777
1937
  }[];
1778
1938
  context: {
1779
- contentType: "product" | "page" | "post";
1939
+ contentType: "page" | "product" | "post";
1780
1940
  entityId: string | number;
1781
1941
  currentEditor?: {
1782
1942
  blockId?: string | number | null | undefined;
@@ -1798,7 +1958,7 @@ export declare function executeUpdateCurrentCmsFields(input: UpdateCurrentCmsFie
1798
1958
  requiresConfirmation: boolean;
1799
1959
  success: boolean;
1800
1960
  } | {
1801
- contentType: "product" | "page" | "post";
1961
+ contentType: "page" | "product" | "post";
1802
1962
  entityId: string | number;
1803
1963
  mutationExecuted: boolean;
1804
1964
  slug: any;
@@ -1827,7 +1987,7 @@ export declare function executeInsertContentBlock(input: InsertContentBlockInput
1827
1987
  } | {
1828
1988
  blockId: any;
1829
1989
  blockType: any;
1830
- contentType: "product" | "page" | "post";
1990
+ contentType: "page" | "product" | "post";
1831
1991
  entityId: any;
1832
1992
  mutationExecuted: boolean;
1833
1993
  order: any;
@@ -1999,7 +2159,7 @@ export declare function executeDeleteCmsItem(input: DeleteCmsItemInput, context?
1999
2159
  } | {
2000
2160
  affectedCount: number;
2001
2161
  collectionPath: string;
2002
- contentType: "product" | "page" | "post";
2162
+ contentType: "page" | "product" | "post";
2003
2163
  mutationExecuted: boolean;
2004
2164
  redirectPath: string;
2005
2165
  success: boolean;
@@ -2049,7 +2209,7 @@ export declare function executeCmsActionPlan(input: z.input<typeof executeCmsAct
2049
2209
  mutationExecuted: boolean;
2050
2210
  success: boolean;
2051
2211
  } | {
2052
- contentType: "product" | "page" | "post";
2212
+ contentType: "page" | "product" | "post";
2053
2213
  entityId: string | number;
2054
2214
  mutationExecuted: boolean;
2055
2215
  slug: any;
@@ -2064,7 +2224,7 @@ export declare function executeCmsActionPlan(input: z.input<typeof executeCmsAct
2064
2224
  } | {
2065
2225
  blockId: any;
2066
2226
  blockType: any;
2067
- contentType: "product" | "page" | "post";
2227
+ contentType: "page" | "product" | "post";
2068
2228
  entityId: any;
2069
2229
  mutationExecuted: boolean;
2070
2230
  order: any;
@@ -2110,7 +2270,7 @@ export declare function executeCmsActionPlan(input: z.input<typeof executeCmsAct
2110
2270
  } | {
2111
2271
  affectedCount: number;
2112
2272
  collectionPath: string;
2113
- contentType: "product" | "page" | "post";
2273
+ contentType: "page" | "product" | "post";
2114
2274
  mutationExecuted: boolean;
2115
2275
  redirectPath: string;
2116
2276
  success: boolean;
@@ -2123,7 +2283,7 @@ export declare function executeCmsActionPlan(input: z.input<typeof executeCmsAct
2123
2283
  success: boolean;
2124
2284
  extraImagesIgnored?: undefined;
2125
2285
  } | {
2126
- contentType: "product" | "page" | "post";
2286
+ contentType: "page" | "product" | "post";
2127
2287
  entityId: string | number;
2128
2288
  extraImagesIgnored: number;
2129
2289
  imageCount: number;
@@ -2161,6 +2321,8 @@ export declare const fetchUrlContentInputSchema: z.ZodObject<{
2161
2321
  url: z.ZodString;
2162
2322
  }, z.core.$strict>;
2163
2323
  export type FetchUrlContentInput = z.input<typeof fetchUrlContentInputSchema>;
2324
+ /** Exported for the SSRF regression tests in ai-global-agent-ssrf.test.ts. */
2325
+ export declare function isBlockedFetchHost(hostname: string): boolean;
2164
2326
  export declare function executeFetchUrlContent(input: FetchUrlContentInput): Promise<{
2165
2327
  message: string;
2166
2328
  success: boolean;
@@ -2281,8 +2443,8 @@ export declare function executeSearchStockPhotos(input: SearchStockPhotosInput,
2281
2443
  }>;
2282
2444
  export declare const rewritePageDraftInputSchema: z.ZodObject<{
2283
2445
  contentType: z.ZodOptional<z.ZodEnum<{
2284
- product: "product";
2285
2446
  page: "page";
2447
+ product: "product";
2286
2448
  post: "post";
2287
2449
  }>>;
2288
2450
  entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -2339,7 +2501,133 @@ export declare function executeRewritePageDraft(input: RewritePageDraftInput, co
2339
2501
  success: boolean;
2340
2502
  title: string;
2341
2503
  }>;
2504
+ export declare const manageProductVariantsInputSchema: z.ZodObject<{
2505
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2506
+ name: z.ZodString;
2507
+ terms: z.ZodArray<z.ZodString>;
2508
+ }, z.core.$strict>>>;
2509
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2510
+ mode: z.ZodDefault<z.ZodEnum<{
2511
+ replace: "replace";
2512
+ append: "append";
2513
+ }>>;
2514
+ slug: z.ZodOptional<z.ZodString>;
2515
+ title: z.ZodOptional<z.ZodString>;
2516
+ variants: z.ZodArray<z.ZodObject<{
2517
+ image: z.ZodOptional<z.ZodString>;
2518
+ options: z.ZodRecord<z.ZodString, z.ZodString>;
2519
+ price: z.ZodOptional<z.ZodNumber>;
2520
+ sale_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2521
+ sku: z.ZodString;
2522
+ stock: z.ZodDefault<z.ZodNumber>;
2523
+ upc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2524
+ }, z.core.$strict>>;
2525
+ }, z.core.$strict>;
2526
+ export type ManageProductVariantsInput = z.infer<typeof manageProductVariantsInputSchema>;
2527
+ export declare function executeManageProductVariants(input: ManageProductVariantsInput, context?: ToolExecutionContext): Promise<{
2528
+ confirmationPhrase: string;
2529
+ mutationExecuted: boolean;
2530
+ preview: Record<string, unknown>;
2531
+ requiresConfirmation: boolean;
2532
+ success: boolean;
2533
+ } | {
2534
+ contentType: string;
2535
+ entityId: string;
2536
+ mode: "replace" | "append";
2537
+ mutationExecuted: boolean;
2538
+ skus: string[];
2539
+ slug: any;
2540
+ success: boolean;
2541
+ totalStock: any;
2542
+ variantCount: number;
2543
+ }>;
2544
+ export declare const translateContentBulkInputSchema: z.ZodObject<{
2545
+ items: z.ZodArray<z.ZodObject<{
2546
+ contentType: z.ZodDefault<z.ZodEnum<{
2547
+ page: "page";
2548
+ post: "post";
2549
+ }>>;
2550
+ slug: z.ZodString;
2551
+ title: z.ZodOptional<z.ZodString>;
2552
+ translations: z.ZodRecord<z.ZodString, z.ZodString>;
2553
+ }, z.core.$strict>>;
2554
+ targetLanguageCode: z.ZodString;
2555
+ }, z.core.$strict>;
2556
+ export type TranslateContentBulkInput = z.infer<typeof translateContentBulkInputSchema>;
2557
+ export declare function executeTranslateContentBulk(input: TranslateContentBulkInput, context?: ToolExecutionContext): Promise<{
2558
+ confirmationPhrase: string;
2559
+ mutationExecuted: boolean;
2560
+ preview: Record<string, unknown>;
2561
+ requiresConfirmation: boolean;
2562
+ success: boolean;
2563
+ } | {
2564
+ failed: {
2565
+ error: string;
2566
+ slug: string;
2567
+ }[];
2568
+ failedCount: number;
2569
+ mutationExecuted: boolean;
2570
+ success: boolean;
2571
+ targetLanguageCode: string;
2572
+ translated: Record<string, unknown>[];
2573
+ translatedCount: number;
2574
+ }>;
2575
+ export declare const publishContentDraftInputSchema: z.ZodObject<{
2576
+ action: z.ZodDefault<z.ZodEnum<{
2577
+ publish: "publish";
2578
+ discard: "discard";
2579
+ }>>;
2580
+ contentType: z.ZodOptional<z.ZodEnum<{
2581
+ page: "page";
2582
+ post: "post";
2583
+ }>>;
2584
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2585
+ slug: z.ZodOptional<z.ZodString>;
2586
+ title: z.ZodOptional<z.ZodString>;
2587
+ }, z.core.$strict>;
2588
+ export type PublishContentDraftInput = z.infer<typeof publishContentDraftInputSchema>;
2589
+ export declare function executePublishContentDraft(input: PublishContentDraftInput, context?: ToolExecutionContext): Promise<{
2590
+ confirmationPhrase: string;
2591
+ mutationExecuted: boolean;
2592
+ preview: Record<string, unknown>;
2593
+ requiresConfirmation: boolean;
2594
+ success: boolean;
2595
+ } | {
2596
+ contentType: "page" | "post";
2597
+ entityId: number;
2598
+ message: string;
2599
+ mutationExecuted: boolean;
2600
+ success: boolean;
2601
+ action?: undefined;
2602
+ } | {
2603
+ action: string;
2604
+ contentType: "page" | "post";
2605
+ entityId: number;
2606
+ mutationExecuted: boolean;
2607
+ success: boolean;
2608
+ message?: undefined;
2609
+ } | {
2610
+ warning?: string | undefined;
2611
+ action: string;
2612
+ blockCount: number;
2613
+ contentType: "page" | "post";
2614
+ entityId: number;
2615
+ mutationExecuted: boolean;
2616
+ slug: string | null | undefined;
2617
+ success: boolean;
2618
+ message?: undefined;
2619
+ }>;
2342
2620
  export declare const translatePageInputSchema: z.ZodObject<{
2621
+ cmsTarget: z.ZodOptional<z.ZodObject<{
2622
+ contentType: z.ZodOptional<z.ZodEnum<{
2623
+ page: "page";
2624
+ product: "product";
2625
+ post: "post";
2626
+ }>>;
2627
+ entityId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2628
+ slug: z.ZodOptional<z.ZodString>;
2629
+ title: z.ZodOptional<z.ZodString>;
2630
+ }, z.core.$strict>>;
2343
2631
  targetLanguageCode: z.ZodString;
2344
2632
  title: z.ZodOptional<z.ZodString>;
2345
2633
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -2381,7 +2669,7 @@ export declare function executeSetContentImages(input: SetContentImagesInput, co
2381
2669
  success: boolean;
2382
2670
  extraImagesIgnored?: undefined;
2383
2671
  } | {
2384
- contentType: "product" | "page" | "post";
2672
+ contentType: "page" | "product" | "post";
2385
2673
  entityId: string | number;
2386
2674
  extraImagesIgnored: number;
2387
2675
  imageCount: number;
@@ -2402,6 +2690,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2402
2690
  read_current_cms_item: import('ai').Tool<{
2403
2691
  includeBlockContent: boolean;
2404
2692
  includeBlocks: boolean;
2693
+ cmsTarget?: {
2694
+ contentType?: "page" | "product" | "post" | undefined;
2695
+ entityId?: string | number | undefined;
2696
+ slug?: string | undefined;
2697
+ title?: string | undefined;
2698
+ } | undefined;
2405
2699
  }, {
2406
2700
  blocks: {
2407
2701
  blockType: any;
@@ -2413,7 +2707,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2413
2707
  postId: any;
2414
2708
  }[];
2415
2709
  context: {
2416
- contentType: "product" | "page" | "post";
2710
+ contentType: "page" | "product" | "post";
2417
2711
  entityId: string | number;
2418
2712
  currentEditor?: {
2419
2713
  blockId?: string | number | null | undefined;
@@ -2530,13 +2824,111 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2530
2824
  query?: undefined;
2531
2825
  usageGuidance?: undefined;
2532
2826
  }>;
2827
+ manage_product_variants: import('ai').Tool<{
2828
+ mode: "replace" | "append";
2829
+ variants: {
2830
+ options: Record<string, string>;
2831
+ sku: string;
2832
+ stock: number;
2833
+ image?: string | undefined;
2834
+ price?: number | undefined;
2835
+ sale_price?: number | null | undefined;
2836
+ upc?: string | null | undefined;
2837
+ }[];
2838
+ attributes?: {
2839
+ name: string;
2840
+ terms: string[];
2841
+ }[] | undefined;
2842
+ entityId?: string | number | undefined;
2843
+ slug?: string | undefined;
2844
+ title?: string | undefined;
2845
+ }, {
2846
+ confirmationPhrase: string;
2847
+ mutationExecuted: boolean;
2848
+ preview: Record<string, unknown>;
2849
+ requiresConfirmation: boolean;
2850
+ success: boolean;
2851
+ } | {
2852
+ contentType: string;
2853
+ entityId: string;
2854
+ mode: "replace" | "append";
2855
+ mutationExecuted: boolean;
2856
+ skus: string[];
2857
+ slug: any;
2858
+ success: boolean;
2859
+ totalStock: any;
2860
+ variantCount: number;
2861
+ }>;
2862
+ translate_content_bulk: import('ai').Tool<{
2863
+ items: {
2864
+ contentType: "page" | "post";
2865
+ slug: string;
2866
+ translations: Record<string, string>;
2867
+ title?: string | undefined;
2868
+ }[];
2869
+ targetLanguageCode: string;
2870
+ }, {
2871
+ confirmationPhrase: string;
2872
+ mutationExecuted: boolean;
2873
+ preview: Record<string, unknown>;
2874
+ requiresConfirmation: boolean;
2875
+ success: boolean;
2876
+ } | {
2877
+ failed: {
2878
+ error: string;
2879
+ slug: string;
2880
+ }[];
2881
+ failedCount: number;
2882
+ mutationExecuted: boolean;
2883
+ success: boolean;
2884
+ targetLanguageCode: string;
2885
+ translated: Record<string, unknown>[];
2886
+ translatedCount: number;
2887
+ }>;
2888
+ publish_content_draft: import('ai').Tool<{
2889
+ action: "publish" | "discard";
2890
+ contentType?: "page" | "post" | undefined;
2891
+ entityId?: string | number | undefined;
2892
+ slug?: string | undefined;
2893
+ title?: string | undefined;
2894
+ }, {
2895
+ confirmationPhrase: string;
2896
+ mutationExecuted: boolean;
2897
+ preview: Record<string, unknown>;
2898
+ requiresConfirmation: boolean;
2899
+ success: boolean;
2900
+ } | {
2901
+ contentType: "page" | "post";
2902
+ entityId: number;
2903
+ message: string;
2904
+ mutationExecuted: boolean;
2905
+ success: boolean;
2906
+ action?: undefined;
2907
+ } | {
2908
+ action: string;
2909
+ contentType: "page" | "post";
2910
+ entityId: number;
2911
+ mutationExecuted: boolean;
2912
+ success: boolean;
2913
+ message?: undefined;
2914
+ } | {
2915
+ warning?: string | undefined;
2916
+ action: string;
2917
+ blockCount: number;
2918
+ contentType: "page" | "post";
2919
+ entityId: number;
2920
+ mutationExecuted: boolean;
2921
+ slug: string | null | undefined;
2922
+ success: boolean;
2923
+ message?: undefined;
2924
+ }>;
2533
2925
  rewrite_page_draft: import('ai').Tool<{
2534
2926
  blocks: {
2535
2927
  blockType: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details";
2536
2928
  content: Record<string, unknown>;
2537
2929
  order?: number | undefined;
2538
2930
  }[];
2539
- contentType?: "product" | "page" | "post" | undefined;
2931
+ contentType?: "page" | "product" | "post" | undefined;
2540
2932
  entityId?: string | number | undefined;
2541
2933
  slug?: string | undefined;
2542
2934
  title?: string | undefined;
@@ -2568,6 +2960,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2568
2960
  translate_page: import('ai').Tool<{
2569
2961
  targetLanguageCode: string;
2570
2962
  translations: Record<string, string>;
2963
+ cmsTarget?: {
2964
+ contentType?: "page" | "product" | "post" | undefined;
2965
+ entityId?: string | number | undefined;
2966
+ slug?: string | undefined;
2967
+ title?: string | undefined;
2968
+ } | undefined;
2571
2969
  title?: string | undefined;
2572
2970
  }, {
2573
2971
  confirmationPhrase: string;
@@ -2581,7 +2979,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2581
2979
  }>;
2582
2980
  set_content_images: import('ai').Tool<{
2583
2981
  images: string[];
2584
- contentType?: "product" | "page" | "post" | undefined;
2982
+ contentType?: "page" | "product" | "post" | undefined;
2585
2983
  entityId?: string | number | undefined;
2586
2984
  slug?: string | undefined;
2587
2985
  title?: string | undefined;
@@ -2600,7 +2998,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2600
2998
  success: boolean;
2601
2999
  extraImagesIgnored?: undefined;
2602
3000
  } | {
2603
- contentType: "product" | "page" | "post";
3001
+ contentType: "page" | "product" | "post";
2604
3002
  entityId: string | number;
2605
3003
  extraImagesIgnored: number;
2606
3004
  imageCount: number;
@@ -2780,7 +3178,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2780
3178
  imageCount: number;
2781
3179
  }>;
2782
3180
  delete_cms_item: import('ai').Tool<{
2783
- contentType?: "product" | "page" | "post" | undefined;
3181
+ contentType?: "page" | "product" | "post" | undefined;
2784
3182
  entityId?: string | number | undefined;
2785
3183
  slug?: string | undefined;
2786
3184
  title?: string | undefined;
@@ -2793,13 +3191,13 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2793
3191
  } | {
2794
3192
  affectedCount: number;
2795
3193
  collectionPath: string;
2796
- contentType: "product" | "page" | "post";
3194
+ contentType: "page" | "product" | "post";
2797
3195
  mutationExecuted: boolean;
2798
3196
  redirectPath: string;
2799
3197
  success: boolean;
2800
3198
  }>;
2801
3199
  prepare_delete_cms_item: import('ai').Tool<{
2802
- contentType?: "product" | "page" | "post" | undefined;
3200
+ contentType?: "page" | "product" | "post" | undefined;
2803
3201
  entityId?: string | number | undefined;
2804
3202
  slug?: string | undefined;
2805
3203
  title?: string | undefined;
@@ -2846,6 +3244,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2846
3244
  blockId: number;
2847
3245
  content: Record<string, unknown>;
2848
3246
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3247
+ cmsTarget?: {
3248
+ contentType?: "page" | "product" | "post" | undefined;
3249
+ entityId?: string | number | undefined;
3250
+ slug?: string | undefined;
3251
+ title?: string | undefined;
3252
+ } | undefined;
2849
3253
  }, {
2850
3254
  confirmationPhrase: string;
2851
3255
  mutationExecuted: boolean;
@@ -2866,7 +3270,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2866
3270
  order?: number | undefined;
2867
3271
  };
2868
3272
  position: "start" | "before" | "after" | "end";
2869
- contentType?: "product" | "page" | "post" | undefined;
3273
+ contentType?: "page" | "product" | "post" | undefined;
2870
3274
  entityId?: string | number | undefined;
2871
3275
  slug?: string | undefined;
2872
3276
  title?: string | undefined;
@@ -2881,7 +3285,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2881
3285
  } | {
2882
3286
  blockId: any;
2883
3287
  blockType: any;
2884
- contentType: "product" | "page" | "post";
3288
+ contentType: "page" | "product" | "post";
2885
3289
  entityId: any;
2886
3290
  mutationExecuted: boolean;
2887
3291
  order: any;
@@ -2902,6 +3306,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2902
3306
  subtitle?: string | null | undefined;
2903
3307
  title?: string | undefined;
2904
3308
  };
3309
+ cmsTarget?: {
3310
+ contentType?: "page" | "product" | "post" | undefined;
3311
+ entityId?: string | number | undefined;
3312
+ slug?: string | undefined;
3313
+ title?: string | undefined;
3314
+ } | undefined;
2905
3315
  }, {
2906
3316
  confirmationPhrase: string;
2907
3317
  mutationExecuted: boolean;
@@ -2909,7 +3319,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2909
3319
  requiresConfirmation: boolean;
2910
3320
  success: boolean;
2911
3321
  } | {
2912
- contentType: "product" | "page" | "post";
3322
+ contentType: "page" | "product" | "post";
2913
3323
  entityId: string | number;
2914
3324
  mutationExecuted: boolean;
2915
3325
  slug: any;
@@ -2919,7 +3329,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2919
3329
  update_cms_item_field: import('ai').Tool<{
2920
3330
  field: string;
2921
3331
  value: unknown;
2922
- contentType?: "product" | "page" | "post" | undefined;
3332
+ contentType?: "page" | "product" | "post" | undefined;
2923
3333
  entityId?: string | number | undefined;
2924
3334
  slug?: string | undefined;
2925
3335
  title?: string | undefined;
@@ -2992,6 +3402,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
2992
3402
  content: Record<string, unknown>;
2993
3403
  parentBlockId: number;
2994
3404
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3405
+ cmsTarget?: {
3406
+ contentType?: "page" | "product" | "post" | undefined;
3407
+ entityId?: string | number | undefined;
3408
+ slug?: string | undefined;
3409
+ title?: string | undefined;
3410
+ } | undefined;
2995
3411
  }, {
2996
3412
  confirmationPhrase: string;
2997
3413
  mutationExecuted: boolean;
@@ -3083,7 +3499,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3083
3499
  tool: "create_cms_product";
3084
3500
  } | {
3085
3501
  input: {
3086
- contentType?: "product" | "page" | "post" | undefined;
3502
+ contentType?: "page" | "product" | "post" | undefined;
3087
3503
  entityId?: string | number | undefined;
3088
3504
  slug?: string | undefined;
3089
3505
  title?: string | undefined;
@@ -3093,7 +3509,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3093
3509
  input: {
3094
3510
  field: string;
3095
3511
  value: unknown;
3096
- contentType?: "product" | "page" | "post" | undefined;
3512
+ contentType?: "page" | "product" | "post" | undefined;
3097
3513
  entityId?: string | number | undefined;
3098
3514
  slug?: string | undefined;
3099
3515
  title?: string | undefined;
@@ -3107,6 +3523,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3107
3523
  blockId: number;
3108
3524
  content: Record<string, unknown>;
3109
3525
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3526
+ cmsTarget?: {
3527
+ contentType?: "page" | "product" | "post" | undefined;
3528
+ entityId?: string | number | undefined;
3529
+ slug?: string | undefined;
3530
+ title?: string | undefined;
3531
+ } | undefined;
3110
3532
  };
3111
3533
  tool: "update_content_block";
3112
3534
  } | {
@@ -3117,7 +3539,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3117
3539
  order?: number | undefined;
3118
3540
  };
3119
3541
  position: "start" | "before" | "after" | "end";
3120
- contentType?: "product" | "page" | "post" | undefined;
3542
+ contentType?: "page" | "product" | "post" | undefined;
3121
3543
  entityId?: string | number | undefined;
3122
3544
  slug?: string | undefined;
3123
3545
  title?: string | undefined;
@@ -3141,6 +3563,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3141
3563
  subtitle?: string | null | undefined;
3142
3564
  title?: string | undefined;
3143
3565
  };
3566
+ cmsTarget?: {
3567
+ contentType?: "page" | "product" | "post" | undefined;
3568
+ entityId?: string | number | undefined;
3569
+ slug?: string | undefined;
3570
+ title?: string | undefined;
3571
+ } | undefined;
3144
3572
  };
3145
3573
  tool: "update_current_cms_fields";
3146
3574
  } | {
@@ -3186,12 +3614,18 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3186
3614
  content: Record<string, unknown>;
3187
3615
  parentBlockId: number;
3188
3616
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3617
+ cmsTarget?: {
3618
+ contentType?: "page" | "product" | "post" | undefined;
3619
+ entityId?: string | number | undefined;
3620
+ slug?: string | undefined;
3621
+ title?: string | undefined;
3622
+ } | undefined;
3189
3623
  };
3190
3624
  tool: "update_section_column_block";
3191
3625
  } | {
3192
3626
  input: {
3193
3627
  images: string[];
3194
- contentType?: "product" | "page" | "post" | undefined;
3628
+ contentType?: "page" | "product" | "post" | undefined;
3195
3629
  entityId?: string | number | undefined;
3196
3630
  slug?: string | undefined;
3197
3631
  title?: string | undefined;
@@ -3272,7 +3706,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3272
3706
  tool: "create_cms_product";
3273
3707
  } | {
3274
3708
  input: {
3275
- contentType?: "product" | "page" | "post" | undefined;
3709
+ contentType?: "page" | "product" | "post" | undefined;
3276
3710
  entityId?: string | number | undefined;
3277
3711
  slug?: string | undefined;
3278
3712
  title?: string | undefined;
@@ -3282,7 +3716,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3282
3716
  input: {
3283
3717
  field: string;
3284
3718
  value: unknown;
3285
- contentType?: "product" | "page" | "post" | undefined;
3719
+ contentType?: "page" | "product" | "post" | undefined;
3286
3720
  entityId?: string | number | undefined;
3287
3721
  slug?: string | undefined;
3288
3722
  title?: string | undefined;
@@ -3296,6 +3730,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3296
3730
  blockId: number;
3297
3731
  content: Record<string, unknown>;
3298
3732
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3733
+ cmsTarget?: {
3734
+ contentType?: "page" | "product" | "post" | undefined;
3735
+ entityId?: string | number | undefined;
3736
+ slug?: string | undefined;
3737
+ title?: string | undefined;
3738
+ } | undefined;
3299
3739
  };
3300
3740
  tool: "update_content_block";
3301
3741
  } | {
@@ -3306,7 +3746,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3306
3746
  order?: number | undefined;
3307
3747
  };
3308
3748
  position: "start" | "before" | "after" | "end";
3309
- contentType?: "product" | "page" | "post" | undefined;
3749
+ contentType?: "page" | "product" | "post" | undefined;
3310
3750
  entityId?: string | number | undefined;
3311
3751
  slug?: string | undefined;
3312
3752
  title?: string | undefined;
@@ -3330,6 +3770,12 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3330
3770
  subtitle?: string | null | undefined;
3331
3771
  title?: string | undefined;
3332
3772
  };
3773
+ cmsTarget?: {
3774
+ contentType?: "page" | "product" | "post" | undefined;
3775
+ entityId?: string | number | undefined;
3776
+ slug?: string | undefined;
3777
+ title?: string | undefined;
3778
+ } | undefined;
3333
3779
  };
3334
3780
  tool: "update_current_cms_fields";
3335
3781
  } | {
@@ -3375,12 +3821,18 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3375
3821
  content: Record<string, unknown>;
3376
3822
  parentBlockId: number;
3377
3823
  blockType?: "text" | "section" | "form" | "heading" | "checkout" | "button" | "image" | "posts_grid" | "video_embed" | "testimonial" | "product_grid" | "featured_product" | "cart" | "product_details" | undefined;
3824
+ cmsTarget?: {
3825
+ contentType?: "page" | "product" | "post" | undefined;
3826
+ entityId?: string | number | undefined;
3827
+ slug?: string | undefined;
3828
+ title?: string | undefined;
3829
+ } | undefined;
3378
3830
  };
3379
3831
  tool: "update_section_column_block";
3380
3832
  } | {
3381
3833
  input: {
3382
3834
  images: string[];
3383
- contentType?: "product" | "page" | "post" | undefined;
3835
+ contentType?: "page" | "product" | "post" | undefined;
3384
3836
  entityId?: string | number | undefined;
3385
3837
  slug?: string | undefined;
3386
3838
  title?: string | undefined;
@@ -3433,7 +3885,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3433
3885
  mutationExecuted: boolean;
3434
3886
  success: boolean;
3435
3887
  } | {
3436
- contentType: "product" | "page" | "post";
3888
+ contentType: "page" | "product" | "post";
3437
3889
  entityId: string | number;
3438
3890
  mutationExecuted: boolean;
3439
3891
  slug: any;
@@ -3448,7 +3900,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3448
3900
  } | {
3449
3901
  blockId: any;
3450
3902
  blockType: any;
3451
- contentType: "product" | "page" | "post";
3903
+ contentType: "page" | "product" | "post";
3452
3904
  entityId: any;
3453
3905
  mutationExecuted: boolean;
3454
3906
  order: any;
@@ -3494,7 +3946,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3494
3946
  } | {
3495
3947
  affectedCount: number;
3496
3948
  collectionPath: string;
3497
- contentType: "product" | "page" | "post";
3949
+ contentType: "page" | "product" | "post";
3498
3950
  mutationExecuted: boolean;
3499
3951
  redirectPath: string;
3500
3952
  success: boolean;
@@ -3507,7 +3959,7 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3507
3959
  success: boolean;
3508
3960
  extraImagesIgnored?: undefined;
3509
3961
  } | {
3510
- contentType: "product" | "page" | "post";
3962
+ contentType: "page" | "product" | "post";
3511
3963
  entityId: string | number;
3512
3964
  extraImagesIgnored: number;
3513
3965
  imageCount: number;
@@ -3540,6 +3992,179 @@ export declare function createCortexGlobalAgentTools(context?: ToolExecutionCont
3540
3992
  success: boolean;
3541
3993
  summary: string | null;
3542
3994
  }>;
3995
+ list_site_script_revisions: import('ai').Tool<{
3996
+ limit: number;
3997
+ scriptName?: string | undefined;
3998
+ }, {
3999
+ count: any;
4000
+ revisions: any;
4001
+ success: boolean;
4002
+ }>;
4003
+ revert_site_script: import('ai').Tool<{
4004
+ revisionId: string;
4005
+ }, {
4006
+ message: string;
4007
+ mutationExecuted: boolean;
4008
+ success: boolean;
4009
+ name?: undefined;
4010
+ recreated?: undefined;
4011
+ } | {
4012
+ mutationExecuted: boolean;
4013
+ name: string;
4014
+ recreated: boolean;
4015
+ success: boolean;
4016
+ message?: undefined;
4017
+ }>;
4018
+ list_site_scripts: import('ai').Tool<Record<string, never>, {
4019
+ count: any;
4020
+ scripts: any;
4021
+ success: boolean;
4022
+ }>;
4023
+ manage_site_script: import('ai').Tool<{
4024
+ action: "delete" | "upsert";
4025
+ is_active: boolean;
4026
+ load_strategy: "default" | "defer" | "async";
4027
+ name: string;
4028
+ purpose: string;
4029
+ placement: "body_end" | "head" | "body_start";
4030
+ sort_order: number;
4031
+ code?: string | undefined;
4032
+ description?: string | null | undefined;
4033
+ src?: string | null | undefined;
4034
+ }, {
4035
+ message: string;
4036
+ mutationExecuted: boolean;
4037
+ success: boolean;
4038
+ action?: undefined;
4039
+ name?: undefined;
4040
+ created?: undefined;
4041
+ isActive?: undefined;
4042
+ placement?: undefined;
4043
+ safetyReview?: undefined;
4044
+ statedPurpose?: undefined;
4045
+ } | {
4046
+ action: string;
4047
+ mutationExecuted: boolean;
4048
+ name: string;
4049
+ success: boolean;
4050
+ message?: undefined;
4051
+ created?: undefined;
4052
+ isActive?: undefined;
4053
+ placement?: undefined;
4054
+ safetyReview?: undefined;
4055
+ statedPurpose?: undefined;
4056
+ } | {
4057
+ action: string;
4058
+ created: boolean;
4059
+ isActive: boolean;
4060
+ mutationExecuted: boolean;
4061
+ name: string;
4062
+ placement: "body_end" | "head" | "body_start";
4063
+ safetyReview: import('../../../utils/src/lib/script-safety').ScriptReview;
4064
+ statedPurpose: string;
4065
+ success: boolean;
4066
+ message?: undefined;
4067
+ }>;
4068
+ list_site_themes: import('ai').Tool<Record<string, never>, {
4069
+ globalCss: string;
4070
+ success: boolean;
4071
+ themes: any;
4072
+ }>;
4073
+ manage_site_theme: import('ai').Tool<{
4074
+ slug: string;
4075
+ color_scheme?: "light" | "dark" | undefined;
4076
+ description?: string | null | undefined;
4077
+ extra_css?: string | null | undefined;
4078
+ icon?: string | undefined;
4079
+ is_default?: boolean | undefined;
4080
+ name?: string | undefined;
4081
+ tokens?: Record<string, string> | undefined;
4082
+ }, {
4083
+ created: boolean;
4084
+ isDefault: boolean;
4085
+ mutationExecuted: boolean;
4086
+ slug: string;
4087
+ success: boolean;
4088
+ themeId: string;
4089
+ tokenCount: number;
4090
+ }>;
4091
+ update_global_css: import('ai').Tool<{
4092
+ css: string;
4093
+ mode: "replace" | "append";
4094
+ }, {
4095
+ characters: number;
4096
+ mode: "replace" | "append";
4097
+ mutationExecuted: boolean;
4098
+ success: boolean;
4099
+ }>;
4100
+ list_media: import('ai').Tool<{
4101
+ limit: number;
4102
+ query?: string | undefined;
4103
+ }, {
4104
+ count: any;
4105
+ media: any;
4106
+ success: boolean;
4107
+ }>;
4108
+ list_product_categories: import('ai').Tool<Record<string, never>, {
4109
+ categories: any;
4110
+ count: any;
4111
+ success: boolean;
4112
+ }>;
4113
+ manage_language: import('ai').Tool<{
4114
+ code: string;
4115
+ is_active: boolean;
4116
+ is_default: boolean;
4117
+ name: string;
4118
+ }, {
4119
+ code: string;
4120
+ created: boolean;
4121
+ languageId: number;
4122
+ mutationExecuted: boolean;
4123
+ success: boolean;
4124
+ }>;
4125
+ manage_product_category: import('ai').Tool<{
4126
+ action: "delete" | "upsert";
4127
+ name: string;
4128
+ description?: string | null | undefined;
4129
+ name_translations?: Record<string, string> | undefined;
4130
+ productSlugs?: string[] | undefined;
4131
+ slug?: string | undefined;
4132
+ }, {
4133
+ message: string;
4134
+ mutationExecuted: boolean;
4135
+ success: boolean;
4136
+ action?: undefined;
4137
+ slug?: undefined;
4138
+ categoryId?: undefined;
4139
+ created?: undefined;
4140
+ linkedProducts?: undefined;
4141
+ } | {
4142
+ action: string;
4143
+ mutationExecuted: boolean;
4144
+ slug: string;
4145
+ success: boolean;
4146
+ message?: undefined;
4147
+ categoryId?: undefined;
4148
+ created?: undefined;
4149
+ linkedProducts?: undefined;
4150
+ } | {
4151
+ categoryId: string;
4152
+ created: boolean;
4153
+ linkedProducts: number;
4154
+ mutationExecuted: boolean;
4155
+ slug: string;
4156
+ success: boolean;
4157
+ message?: undefined;
4158
+ action?: undefined;
4159
+ }>;
4160
+ upload_media: import('ai').Tool<{
4161
+ url: string;
4162
+ altText?: string | undefined;
4163
+ }, {
4164
+ mediaId: string;
4165
+ mutationExecuted: boolean;
4166
+ success: boolean;
4167
+ }>;
3543
4168
  create_custom_block: import('ai').Tool<{
3544
4169
  prompt: string;
3545
4170
  context?: string | undefined;