@blokkli/editor 2.0.0-alpha.63 → 2.0.0-alpha.65

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.
Files changed (225) hide show
  1. package/dist/global/types/blockOptions.d.ts +32 -27
  2. package/dist/module.d.mts +2 -2
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +154 -5
  5. package/dist/modules/agent/index.d.mts +1 -1
  6. package/dist/modules/agent/index.mjs +2 -1
  7. package/dist/modules/agent/runtime/app/components/Attachment/PreviewCsv/index.vue +1 -1
  8. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts +1 -1
  9. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts +1 -1
  10. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +1 -1
  11. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +1 -1
  12. package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +1 -1
  13. package/dist/modules/agent/runtime/app/features/agent/index.vue +1 -1
  14. package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +12 -0
  15. package/dist/modules/agent/runtime/app/helpers/mutationResult.js +34 -0
  16. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +13 -7
  17. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +1 -1
  18. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +1 -1
  19. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +1 -1
  20. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +16 -5
  21. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +43 -15
  22. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +1 -1
  23. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +1 -1
  24. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +1 -1
  25. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +1 -1
  26. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +1 -1
  27. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +1 -1
  28. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +1 -1
  29. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +1 -1
  30. package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.js +1 -3
  31. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -2
  32. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +6 -2
  33. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +3 -3
  34. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +5 -5
  35. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +1 -1
  36. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +1 -1
  37. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +1 -1
  38. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +1 -1
  39. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +1 -1
  40. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +1 -1
  41. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +1 -1
  42. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +2 -2
  43. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +1 -1
  44. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +1 -1
  45. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +3 -3
  46. package/dist/modules/agent/runtime/server/classes/FieldStreamParser/index.js +10 -15
  47. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.d.ts +1 -3
  48. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +3 -1
  49. package/dist/modules/agent/runtime/shared/toolParams.d.ts +3 -3
  50. package/dist/modules/agent/runtime/shared/types.d.ts +3 -3
  51. package/dist/modules/charts/index.d.mts +14 -1
  52. package/dist/modules/charts/index.mjs +37 -2
  53. package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue +1 -1
  54. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue +19 -9
  55. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue +1 -1
  56. package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +16 -8
  57. package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue +23 -7
  58. package/dist/modules/charts/runtime/features/charts/Editor/index.vue +5 -6
  59. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
  60. package/dist/modules/drupal/index.d.mts +1 -1
  61. package/dist/modules/drupal/runtime/adapter/index.js +3 -0
  62. package/dist/modules/iframes/index.d.mts +1 -1
  63. package/dist/modules/index.d.mts +1 -1
  64. package/dist/modules/readability/index.d.mts +1 -1
  65. package/dist/modules/readability/index.mjs +2 -1
  66. package/dist/modules/table-of-contents/index.d.mts +1 -1
  67. package/dist/runtime/components/Blocks/NotImplemented/index.vue +1 -1
  68. package/dist/runtime/editor/components/Actions/Title/index.vue +1 -1
  69. package/dist/runtime/editor/components/Actions/index.vue +1 -1
  70. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +1 -0
  71. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +2 -2
  72. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +1 -0
  73. package/dist/runtime/editor/components/Avatar/index.vue +1 -1
  74. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +1 -1
  75. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +1 -1
  76. package/dist/runtime/editor/components/BlockProxy/index.vue +1 -1
  77. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +1 -1
  78. package/dist/runtime/editor/components/BundleSelector/index.vue +1 -1
  79. package/dist/runtime/editor/components/ColorDropdown/index.vue +1 -1
  80. package/dist/runtime/editor/components/Dialog/index.vue +1 -1
  81. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +1 -1
  82. package/dist/runtime/editor/components/DiffApproval/types.js +1 -3
  83. package/dist/runtime/editor/components/DiffViewer/State.vue +1 -1
  84. package/dist/runtime/editor/components/DraggableList.vue +1 -1
  85. package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +1 -0
  86. package/dist/runtime/editor/components/Dropdown/index.vue +2 -2
  87. package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +1 -0
  88. package/dist/runtime/editor/components/DropdownItem/index.vue +1 -1
  89. package/dist/runtime/editor/components/EditIndicator.vue +1 -1
  90. package/dist/runtime/editor/components/EditProvider.vue +2 -2
  91. package/dist/runtime/editor/components/FileDropHandler/index.vue +1 -1
  92. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  93. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  94. package/dist/runtime/editor/components/Form/RadioTabs/index.vue +1 -1
  95. package/dist/runtime/editor/components/Form/Search/index.d.vue.ts +1 -0
  96. package/dist/runtime/editor/components/Form/Search/index.vue +2 -2
  97. package/dist/runtime/editor/components/Form/Search/index.vue.d.ts +1 -0
  98. package/dist/runtime/editor/components/FormOverlay/index.vue +1 -1
  99. package/dist/runtime/editor/components/Icon/index.vue +1 -1
  100. package/dist/runtime/editor/components/Indicators/index.vue +31 -100
  101. package/dist/runtime/editor/components/Konami/Game/index.vue +1 -1
  102. package/dist/runtime/editor/components/Messages/index.vue +1 -1
  103. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +1 -0
  104. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +2 -1
  105. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
  106. package/dist/runtime/editor/components/Overlay/index.vue +1 -1
  107. package/dist/runtime/editor/components/Pagination/index.vue +1 -1
  108. package/dist/runtime/editor/components/Panel/Section/index.vue +1 -1
  109. package/dist/runtime/editor/components/Panel/Tabs/index.d.vue.ts +1 -1
  110. package/dist/runtime/editor/components/Panel/Tabs/index.vue.d.ts +1 -1
  111. package/dist/runtime/editor/components/PluginConfigForm/index.vue +1 -1
  112. package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +1 -1
  113. package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +1 -1
  114. package/dist/runtime/editor/components/Popup/index.vue +1 -1
  115. package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
  116. package/dist/runtime/editor/components/RelativeTime/index.vue +7 -13
  117. package/dist/runtime/editor/components/Resizable/index.vue +1 -1
  118. package/dist/runtime/editor/components/RichText/Editor/index.vue +1 -1
  119. package/dist/runtime/editor/components/ScaleToFit/index.vue +1 -1
  120. package/dist/runtime/editor/components/SearchOverlay/index.vue +1 -1
  121. package/dist/runtime/editor/components/SidebarFloater/index.vue +1 -1
  122. package/dist/runtime/editor/components/StatusIcon/index.vue +1 -1
  123. package/dist/runtime/editor/components/StatusIndicator/index.vue +1 -1
  124. package/dist/runtime/editor/components/SystemRequirements/index.vue +1 -1
  125. package/dist/runtime/editor/components/Tabs/index.d.vue.ts +1 -1
  126. package/dist/runtime/editor/components/Tabs/index.vue.d.ts +1 -1
  127. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +2 -1
  128. package/dist/runtime/editor/components/Toolbar/index.vue +1 -1
  129. package/dist/runtime/editor/components/Transition/Collapse/index.vue +1 -1
  130. package/dist/runtime/editor/components/Transition/List/index.vue +1 -1
  131. package/dist/runtime/editor/composables/defineViewOption.js +5 -1
  132. package/dist/runtime/editor/composables/useStickyToolbar.js +1 -4
  133. package/dist/runtime/editor/css/output.css +1 -1
  134. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  135. package/dist/runtime/editor/features/add-list/index.vue +1 -1
  136. package/dist/runtime/editor/features/analyze/index.vue +1 -1
  137. package/dist/runtime/editor/features/anchors/Overlay/index.vue +11 -5
  138. package/dist/runtime/editor/features/anchors/index.vue +2 -1
  139. package/dist/runtime/editor/features/artboard/Overview/index.vue +1 -1
  140. package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
  141. package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +1 -1
  142. package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
  143. package/dist/runtime/editor/features/block-transfer/index.vue +1 -1
  144. package/dist/runtime/editor/features/breadcrumbs/index.vue +1 -1
  145. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  146. package/dist/runtime/editor/features/clipboard/DropElement/index.vue +1 -1
  147. package/dist/runtime/editor/features/comments/AddForm/index.vue +1 -1
  148. package/dist/runtime/editor/features/comments/Thread/index.vue +1 -1
  149. package/dist/runtime/editor/features/complex-options/index.vue +1 -0
  150. package/dist/runtime/editor/features/debug/Main.vue +1 -1
  151. package/dist/runtime/editor/features/dev-mode/index.vue +1 -1
  152. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -1
  153. package/dist/runtime/editor/features/dragging-overlay/index.vue +1 -1
  154. package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +1 -1
  155. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +1 -1
  156. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.d.vue.ts +1 -5
  157. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue.d.ts +1 -5
  158. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +1 -1
  159. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +1 -1
  160. package/dist/runtime/editor/features/editable-mask/index.vue +1 -1
  161. package/dist/runtime/editor/features/entity-title/index.vue +17 -7
  162. package/dist/runtime/editor/features/help/Dialog/index.vue +1 -1
  163. package/dist/runtime/editor/features/help/Shortcuts/index.vue +1 -1
  164. package/dist/runtime/editor/features/history/List/index.vue +1 -1
  165. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +1 -1
  166. package/dist/runtime/editor/features/library/index.vue +1 -0
  167. package/dist/runtime/editor/features/media-library/index.vue +1 -1
  168. package/dist/runtime/editor/features/options/Form/Item.vue +5 -12
  169. package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +5 -4
  170. package/dist/runtime/editor/features/options/Form/Radios/index.vue +8 -5
  171. package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +5 -4
  172. package/dist/runtime/editor/features/options/Form/Text/index.d.vue.ts +4 -0
  173. package/dist/runtime/editor/features/options/Form/Text/index.vue +11 -3
  174. package/dist/runtime/editor/features/options/Form/Text/index.vue.d.ts +4 -0
  175. package/dist/runtime/editor/features/options/index.vue +1 -1
  176. package/dist/runtime/editor/features/publish/Dialog/Item.vue +4 -7
  177. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +1 -1
  178. package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +1 -0
  179. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +1 -1
  180. package/dist/runtime/editor/features/search/index.vue +1 -1
  181. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -1
  182. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +1 -1
  183. package/dist/runtime/editor/features/settings/index.vue +1 -1
  184. package/dist/runtime/editor/features/structure/List/Item/index.vue +1 -1
  185. package/dist/runtime/editor/features/structure/index.vue +1 -1
  186. package/dist/runtime/editor/features/templates/DialogManageTemplates/Item.vue +1 -0
  187. package/dist/runtime/editor/features/templates/DialogManageTemplates/index.vue +1 -1
  188. package/dist/runtime/editor/features/theme/index.vue +1 -1
  189. package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +1 -1
  190. package/dist/runtime/editor/features/tour/Overlay/index.vue +1 -1
  191. package/dist/runtime/editor/features/transform/Dialog/index.vue +1 -1
  192. package/dist/runtime/editor/features/translations/SelectionTable/index.vue +1 -1
  193. package/dist/runtime/editor/features/workspace/index.vue +1 -1
  194. package/dist/runtime/editor/helpers/diff/index.d.ts +11 -0
  195. package/dist/runtime/editor/helpers/diff/index.js +13 -7
  196. package/dist/runtime/editor/helpers/options/index.d.ts +2 -0
  197. package/dist/runtime/editor/helpers/options/index.js +21 -0
  198. package/dist/runtime/editor/plugins/BlockIndicator/index.d.vue.ts +24 -1
  199. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +17 -7
  200. package/dist/runtime/editor/plugins/BlockIndicator/index.vue.d.ts +24 -1
  201. package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +2 -1
  202. package/dist/runtime/editor/plugins/ItemAction/index.vue +1 -1
  203. package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +2 -1
  204. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  205. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  206. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  207. package/dist/runtime/editor/plugins/Sidebar/index.vue +1 -1
  208. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  209. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +1 -1
  210. package/dist/runtime/editor/providers/animation.d.ts +2 -0
  211. package/dist/runtime/editor/providers/definition.d.ts +4 -3
  212. package/dist/runtime/editor/providers/definition.js +10 -2
  213. package/dist/runtime/editor/providers/plugin.d.ts +1 -0
  214. package/dist/runtime/editor/providers/state.d.ts +25 -1
  215. package/dist/runtime/editor/providers/state.js +17 -0
  216. package/dist/runtime/editor/translations/de.json +2 -0
  217. package/dist/runtime/editor/translations/fr.json +2 -0
  218. package/dist/runtime/editor/translations/gsw_CH.json +2 -0
  219. package/dist/runtime/editor/translations/it.json +2 -0
  220. package/dist/runtime/editor/types/state.d.ts +7 -0
  221. package/dist/runtime/editor/types/ui.d.ts +1 -0
  222. package/dist/shared/{editor.Gu7mgJ5Q.mjs → editor.BGemL1Oh.mjs} +146 -146
  223. package/dist/shared/{editor.D28NbXr3.d.mts → editor.S5sA3rij.d.mts} +452 -406
  224. package/dist/types.d.mts +1 -1
  225. package/package.json +74 -82
@@ -12,11 +12,11 @@ export declare const paramsSchema: z.ZodObject<{
12
12
  }, z.core.$strip>;
13
13
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
14
14
  type: z.ZodEnum<{
15
+ options: "options";
15
16
  rewrite: "rewrite";
16
17
  delete: "delete";
17
18
  add: "add";
18
19
  move: "move";
19
- options: "options";
20
20
  }>;
21
21
  label: z.ZodString;
22
22
  }, z.core.$strip>, z.ZodObject<{
@@ -1,11 +1,22 @@
1
1
  import { z } from 'zod';
2
2
  type OptionValue = string | boolean | number | string[];
3
+ /**
4
+ * The accepted input shapes for a single content-field value, mirroring
5
+ * `contentFieldValueSchema`. Normalized to `CanonicalFieldValue` before use.
6
+ */
7
+ type ContentFieldInput = string | {
8
+ uri: string;
9
+ title?: string;
10
+ } | {
11
+ entityType: string;
12
+ entityId: string;
13
+ } | {
14
+ target_id: string;
15
+ target_type?: string;
16
+ };
3
17
  type BlockInput = {
4
18
  bundle: string;
5
- contentFields?: Record<string, string | {
6
- entityType: string;
7
- entityId: string;
8
- }>;
19
+ contentFields?: Record<string, ContentFieldInput>;
9
20
  options?: Record<string, OptionValue>;
10
21
  children?: Record<string, BlockInput[]>;
11
22
  };
@@ -20,11 +31,11 @@ export declare const paramsSchema: z.ZodObject<{
20
31
  }, z.core.$strip>;
21
32
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
22
33
  type: z.ZodEnum<{
34
+ options: "options";
23
35
  rewrite: "rewrite";
24
36
  delete: "delete";
25
37
  add: "add";
26
38
  move: "move";
27
- options: "options";
28
39
  }>;
29
40
  label: z.ZodString;
30
41
  }, z.core.$strip>, z.ZodObject<{
@@ -17,23 +17,48 @@ import { validateFieldCardinality } from "../../helpers/validation.js";
17
17
  import { getFieldKey } from "#blokkli/helpers";
18
18
  import { optionValueToStorable } from "#blokkli/editor/helpers/options";
19
19
  import { countNewParagraphs } from "#blokkli/agent/app/helpers/mutationResult";
20
- const contentFieldValueSchema = z.union([
21
- z.string().describe(
22
- "Text value for plain/markup content fields, or a URL string (starting with http) for link content fields"
23
- ),
24
- z.object({
25
- entityType: z.string().describe('Entity type (e.g., "media", "node")'),
26
- entityId: z.string().describe("Entity ID")
27
- }).describe(
28
- "Entity reference for reference content fields (media, content references)"
29
- )
30
- ]);
20
+ const contentFieldValueSchema = z.union(
21
+ [
22
+ z.string().describe(
23
+ "Text for plain/markup fields, or a URL/link URI (https://\u2026, mailto:, tel:, internal:/path, entity:type/id) for link fields."
24
+ ),
25
+ z.object({
26
+ uri: z.string().describe("The link target: an absolute URL or a backend link URI."),
27
+ title: z.string().optional().describe(
28
+ "Optional link text. Accepted, but the URI is what gets stored \u2014 some backends do not persist the title yet."
29
+ )
30
+ }).describe("Link field value with an optional title."),
31
+ z.object({
32
+ entityType: z.string().describe('Entity type (e.g. "media", "node").'),
33
+ entityId: z.string().describe("Entity ID.")
34
+ }).describe(
35
+ "Entity reference for reference fields (media, content references), from search_media / search_content results."
36
+ ),
37
+ z.object({
38
+ target_id: z.string().describe("The referenced entity ID."),
39
+ target_type: z.string().optional().describe("The referenced entity type, if known.")
40
+ }).describe(
41
+ "Entity reference in the backend-native { target_id } shape (equivalent to { entityType, entityId })."
42
+ )
43
+ ],
44
+ {
45
+ error: "Content field value must be one of: a text/URL string; a link object { uri, title? }; or an entity reference { entityType, entityId } or { target_id, target_type? }."
46
+ }
47
+ );
31
48
  const contentFieldsSchema = z.record(
32
49
  z.string().describe("The content field name"),
33
50
  contentFieldValueSchema
34
51
  ).optional().describe(
35
52
  "Content field values to set on the new paragraph, keyed by field name. Use this to set text content and media/entity references in one step."
36
53
  );
54
+ function normalizeContentFieldValue(value) {
55
+ if (typeof value === "string") return value;
56
+ if ("uri" in value) return value.uri;
57
+ if ("target_id" in value) {
58
+ return { entityType: value.target_type ?? "", entityId: value.target_id };
59
+ }
60
+ return { entityType: value.entityType, entityId: value.entityId };
61
+ }
37
62
  const blockSchema = z.object({
38
63
  bundle: z.string().describe("The paragraph bundle to add"),
39
64
  contentFields: contentFieldsSchema,
@@ -54,7 +79,10 @@ export const paramsSchema = z.object({
54
79
  });
55
80
  function validateContentFields(ctx, block, path) {
56
81
  if (!block.contentFields) return void 0;
57
- for (const [fieldName, fieldValue] of Object.entries(block.contentFields)) {
82
+ for (const [fieldName, rawFieldValue] of Object.entries(
83
+ block.contentFields
84
+ )) {
85
+ const fieldValue = normalizeContentFieldValue(rawFieldValue);
58
86
  const editableConfig = ctx.app.types.editableFieldConfig.forName(
59
87
  ctx.itemEntityType,
60
88
  block.bundle,
@@ -76,7 +104,7 @@ function validateContentFields(ctx, block, path) {
76
104
  }
77
105
  if (droppableConfig) {
78
106
  if (typeof fieldValue === "string" && droppableConfig.type !== "link") {
79
- return `${path}: Field "${fieldName}" is a reference field and expects { entityType, entityId }, got a string.`;
107
+ return `${path}: Field "${fieldName}" is a reference field and expects { entityType, entityId } (or { target_id }), got a string.`;
80
108
  }
81
109
  }
82
110
  }
@@ -161,7 +189,7 @@ function buildEventBlocks(ctx, blocks, parentBundle) {
161
189
  const blockUuid = generateUUID();
162
190
  const values = block.contentFields ? Object.entries(block.contentFields).map(([fieldName, fieldValue]) => ({
163
191
  fieldName,
164
- fieldValue
192
+ fieldValue: normalizeContentFieldValue(fieldValue)
165
193
  })) : void 0;
166
194
  let options;
167
195
  if (block.options) {
@@ -229,7 +257,7 @@ function collectAllUuids(blocks) {
229
257
  export const resultSchema = mutationResultSchema;
230
258
  export default defineBlokkliAgentTool({
231
259
  name: "add_paragraphs",
232
- description: "Add one or more new paragraphs to the page. Supports nested structures via the `children` property \u2014 define entire paragraph trees in a single call. IMPORTANT: Always provide content field values (text, media/entity references) directly via contentFields, instead of adding empty paragraphs! For reference content fields (media), set the value to { entityType, entityId } from search_media results. NOTE: You can ONLY provide content fields, NOT paragraph fields! For nested paragraphs, use the `children` property keyed by paragraph field name. You can also set paragraph options inline via the `options` property (key-value pairs). The success result mirrors the input shape: each top-level entry in `newParagraphs` includes its own `children` keyed by paragraph field, so the structure round-trips and a nested child does NOT appear as a sibling \u2014 treat the tree as the source of truth instead of guessing from order.",
260
+ description: "Add one or more new paragraphs to the page. Supports nested structures via the `children` property \u2014 define entire paragraph trees in a single call. IMPORTANT: Always provide content field values (text, media/entity references) directly via contentFields, instead of adding empty paragraphs! For reference content fields (media), set the value to { entityType, entityId } from search_media results. For link fields, set a URL string or { uri, title }. NOTE: You can ONLY provide content fields, NOT paragraph fields! For nested paragraphs, use the `children` property keyed by paragraph field name. You can also set paragraph options inline via the `options` property (key-value pairs). The success result mirrors the input shape: each top-level entry in `newParagraphs` includes its own `children` keyed by paragraph field, so the structure round-trips and a nested child does NOT appear as a sibling \u2014 treat the tree as the source of truth instead of guessing from order.",
233
261
  category: "mutation",
234
262
  lazy: false,
235
263
  prunedSummary: (r) => r.success ? `added ${countNewParagraphs(r.newParagraphs ?? [])} paragraphs` : "rejected",
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
12
12
  type: z.ZodEnum<{
13
+ options: "options";
13
14
  rewrite: "rewrite";
14
15
  delete: "delete";
15
16
  add: "add";
16
17
  move: "move";
17
- options: "options";
18
18
  }>;
19
19
  label: z.ZodString;
20
20
  }, z.core.$strip>, z.ZodObject<{
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
12
12
  type: z.ZodEnum<{
13
+ options: "options";
13
14
  rewrite: "rewrite";
14
15
  delete: "delete";
15
16
  add: "add";
16
17
  move: "move";
17
- options: "options";
18
18
  }>;
19
19
  label: z.ZodString;
20
20
  }, z.core.$strip>, z.ZodObject<{
@@ -115,7 +115,7 @@ function cancel() {
115
115
  }
116
116
  </script>
117
117
 
118
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
118
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
119
119
  :is(.bk-agent-tool-question-list .bk-radio,.bk-agent-tool-question-list .bk-checkbox) input + span {
120
120
  font-size: var(--text-sm, 14px);
121
121
  line-height: var(--bk-tw-leading, var(--text-sm--line-height, calc(1.25 / 0.875)));
@@ -5,7 +5,7 @@ export declare const paramsSchema: z.ZodObject<{
5
5
  value: z.ZodString;
6
6
  label: z.ZodString;
7
7
  }, z.core.$strip>>;
8
- multiSelect: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
8
+ multiSelect: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
9
9
  paragraphUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
10
  }, z.core.$strip>;
11
11
  export declare const resultSchema: z.ZodObject<{
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { fieldDiffResultSchema } from '../schemas.js';
3
3
  import { type SkippedField } from '../fieldDiffApproval.js';
4
4
  export declare const paramsSchema: z.ZodObject<{
5
- uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
5
+ uuids: z.ZodPreprocess<z.ZodArray<z.ZodString>>;
6
6
  }, z.core.$strip>;
7
7
  export type AutoTranslateParams = z.infer<typeof paramsSchema>;
8
8
  export type AutoTranslateResult = z.infer<typeof fieldDiffResultSchema>;
@@ -4,11 +4,11 @@ export declare const paramsSchema: z.ZodObject<{
4
4
  }, z.core.$strip>;
5
5
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
6
6
  type: z.ZodEnum<{
7
+ options: "options";
7
8
  rewrite: "rewrite";
8
9
  delete: "delete";
9
10
  add: "add";
10
11
  move: "move";
11
- options: "options";
12
12
  }>;
13
13
  label: z.ZodString;
14
14
  }, z.core.$strip>, z.ZodObject<{
@@ -4,11 +4,11 @@ export declare const paramsSchema: z.ZodObject<{
4
4
  }, z.core.$strip>;
5
5
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
6
6
  type: z.ZodEnum<{
7
+ options: "options";
7
8
  rewrite: "rewrite";
8
9
  delete: "delete";
9
10
  add: "add";
10
11
  move: "move";
11
- options: "options";
12
12
  }>;
13
13
  label: z.ZodString;
14
14
  }, z.core.$strip>, z.ZodObject<{
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
12
12
  type: z.ZodEnum<{
13
+ options: "options";
13
14
  rewrite: "rewrite";
14
15
  delete: "delete";
15
16
  add: "add";
16
17
  move: "move";
17
- options: "options";
18
18
  }>;
19
19
  label: z.ZodString;
20
20
  }, z.core.$strip>, z.ZodObject<{
@@ -18,9 +18,7 @@ export function decideFieldUpdates(items, selected, reasons) {
18
18
  let totalCount = 0;
19
19
  for (const item of items) {
20
20
  if (item.segments) {
21
- const atoms = flattenSegments(item.segments).filter(
22
- (s) => s.status !== "matched" || s.beforeHtml !== s.afterHtml
23
- );
21
+ const atoms = flattenSegments(item.segments).filter((s) => s.changed);
24
22
  totalCount += atoms.length;
25
23
  const acceptedById = {};
26
24
  const rejectedSegments = [];
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  export declare const paramsSchema: z.ZodObject<{
3
3
  bundle: z.ZodOptional<z.ZodString>;
4
4
  bundles: z.ZodOptional<z.ZodArray<z.ZodString>>;
5
- hasChildren: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
6
- isRootLevel: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
5
+ hasChildren: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
6
+ isRootLevel: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
7
7
  nestingLevel: z.ZodOptional<z.ZodNumber>;
8
8
  parentBundle: z.ZodOptional<z.ZodString>;
9
9
  inField: z.ZodOptional<z.ZodString>;
@@ -124,11 +124,15 @@ export default defineBlokkliAgentTool({
124
124
  );
125
125
  const entry = {
126
126
  type: opt.option.type,
127
- label: opt.option.label,
127
+ label: ctx.app.definitions.resolveDefinitionString(
128
+ opt.option.label
129
+ ),
128
130
  currentValue: resolvedValue ?? ""
129
131
  };
130
132
  if (opt.option.description) {
131
- entry.description = opt.option.description;
133
+ entry.description = ctx.app.definitions.resolveDefinitionString(
134
+ opt.option.description
135
+ );
132
136
  }
133
137
  const labels = extractOptionLabels(opt.option);
134
138
  if (labels) {
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const paramsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
3
- uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
4
- includeNested: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
2
+ export declare const paramsSchema: z.ZodPreprocess<z.ZodObject<{
3
+ uuids: z.ZodPreprocess<z.ZodArray<z.ZodString>>;
4
+ includeNested: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
5
5
  }, z.core.$strip>>;
6
6
  export declare const resultSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
7
7
  type: z.ZodLiteral<"plain">;
@@ -1,11 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  export declare const paramsSchema: z.ZodObject<{
3
3
  uuid: z.ZodString;
4
- includeParentChain: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
5
- includeSiblings: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
6
- includeChildren: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
7
- includeContentFields: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
8
- includeOptions: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
4
+ includeParentChain: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
5
+ includeSiblings: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
6
+ includeChildren: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
7
+ includeContentFields: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
8
+ includeOptions: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
9
9
  }, z.core.$strip>;
10
10
  export declare const resultSchema: z.ZodObject<{
11
11
  uuid: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const paramsSchema: z.ZodObject<{
3
3
  maxNestingLevel: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
4
- includeDimensions: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
4
+ includeDimensions: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
5
5
  }, z.core.$strip>;
6
6
  type BlockDimensions = {
7
7
  x: number;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const paramsSchema: z.ZodObject<{
3
- uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
3
+ uuids: z.ZodPreprocess<z.ZodArray<z.ZodString>>;
4
4
  }, z.core.$strip>;
5
5
  export declare const resultSchema: z.ZodObject<{
6
6
  entities: z.ZodArray<z.ZodObject<{
@@ -4,11 +4,11 @@ export declare const paramsSchema: z.ZodObject<{
4
4
  }, z.core.$strip>;
5
5
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
6
6
  type: z.ZodEnum<{
7
+ options: "options";
7
8
  rewrite: "rewrite";
8
9
  delete: "delete";
9
10
  add: "add";
10
11
  move: "move";
11
- options: "options";
12
12
  }>;
13
13
  label: z.ZodString;
14
14
  }, z.core.$strip>, z.ZodObject<{
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
12
12
  type: z.ZodEnum<{
13
+ options: "options";
13
14
  rewrite: "rewrite";
14
15
  delete: "delete";
15
16
  add: "add";
16
17
  move: "move";
17
- options: "options";
18
18
  }>;
19
19
  label: z.ZodString;
20
20
  }, z.core.$strip>, z.ZodObject<{
@@ -9,11 +9,11 @@ export declare const paramsSchema: z.ZodObject<{
9
9
  }, z.core.$strip>;
10
10
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
11
11
  type: z.ZodEnum<{
12
+ options: "options";
12
13
  rewrite: "rewrite";
13
14
  delete: "delete";
14
15
  add: "add";
15
16
  move: "move";
16
- options: "options";
17
17
  }>;
18
18
  label: z.ZodString;
19
19
  }, z.core.$strip>, z.ZodObject<{
@@ -8,11 +8,11 @@ export declare const paramsSchema: z.ZodObject<{
8
8
  }, z.core.$strip>;
9
9
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
10
10
  type: z.ZodEnum<{
11
+ options: "options";
11
12
  rewrite: "rewrite";
12
13
  delete: "delete";
13
14
  add: "add";
14
15
  move: "move";
15
- options: "options";
16
16
  }>;
17
17
  label: z.ZodString;
18
18
  }, z.core.$strip>, z.ZodObject<{
@@ -7,11 +7,11 @@ export declare const paramsSchema: z.ZodObject<{
7
7
  }, z.core.$strip>;
8
8
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
9
9
  type: z.ZodEnum<{
10
+ options: "options";
10
11
  rewrite: "rewrite";
11
12
  delete: "delete";
12
13
  add: "add";
13
14
  move: "move";
14
- options: "options";
15
15
  }>;
16
16
  label: z.ZodString;
17
17
  }, z.core.$strip>, z.ZodObject<{
@@ -59,7 +59,7 @@ export declare const mutationResultSchema: z.ZodUnion<readonly [z.ZodObject<{
59
59
  * still advertises an array, so the model is guided toward the array form while
60
60
  * a single string is accepted as a fallback.
61
61
  */
62
- export declare function stringArrayParam(description: string): z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
62
+ export declare function stringArrayParam(description: string): z.ZodPreprocess<z.ZodArray<z.ZodString>>;
63
63
  /**
64
64
  * Wraps an object params schema to tolerate a singular key when the schema
65
65
  * actually expects its plural form (e.g. `uuid` → `uuids`). LLMs — especially
@@ -71,7 +71,7 @@ export declare function stringArrayParam(description: string): z.ZodPipe<z.ZodTr
71
71
  * `z.preprocess`), so the model is still guided to the plural form; the
72
72
  * singular form is silently accepted as a fallback.
73
73
  */
74
- export declare function tolerantSingularKeys<T extends z.ZodType>(schema: T, aliases: Record<string, string>): z.ZodPipe<z.ZodTransform<unknown, unknown>, T>;
74
+ export declare function tolerantSingularKeys<T extends z.ZodType>(schema: T, aliases: Record<string, string>): z.ZodPreprocess<T>;
75
75
  /**
76
76
  * Shared schema for option values (used by add_blocks and set_block_options).
77
77
  */
@@ -7,11 +7,11 @@ export declare const paramsSchema: z.ZodObject<{
7
7
  }, z.core.$strip>;
8
8
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
9
9
  type: z.ZodEnum<{
10
+ options: "options";
10
11
  rewrite: "rewrite";
11
12
  delete: "delete";
12
13
  add: "add";
13
14
  move: "move";
14
- options: "options";
15
15
  }>;
16
16
  label: z.ZodString;
17
17
  }, z.core.$strip>, z.ZodObject<{
@@ -5,11 +5,11 @@ export declare const paramsSchema: z.ZodObject<{
5
5
  }, z.core.$strip>;
6
6
  export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
7
7
  type: z.ZodEnum<{
8
+ options: "options";
8
9
  rewrite: "rewrite";
9
10
  delete: "delete";
10
11
  add: "add";
11
12
  move: "move";
12
- options: "options";
13
13
  }>;
14
14
  label: z.ZodString;
15
15
  }, z.core.$strip>, z.ZodObject<{
@@ -6,7 +6,7 @@ declare const operationSchema: z.ZodObject<{
6
6
  fieldName: z.ZodString;
7
7
  search: z.ZodString;
8
8
  replace: z.ZodString;
9
- selector: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
9
+ selector: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
10
10
  }, z.core.$strip>;
11
11
  declare const updateSchema: z.ZodObject<{
12
12
  uuid: z.ZodString;
@@ -24,9 +24,9 @@ export declare const paramsSchema: z.ZodObject<{
24
24
  fieldName: z.ZodString;
25
25
  search: z.ZodString;
26
26
  replace: z.ZodString;
27
- selector: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
27
+ selector: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
28
28
  }, z.core.$strip>>>;
29
- requireApproval: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
29
+ requireApproval: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
30
30
  }, z.core.$strip>;
31
31
  export type BatchRewriteParams = z.infer<typeof paramsSchema>;
32
32
  export type BatchRewriteResult = z.infer<typeof fieldDiffResultSchema>;
@@ -24,34 +24,29 @@ export class FieldStreamParser {
24
24
  }
25
25
  this.stripLeadingNewline = false;
26
26
  }
27
- let changed = true;
28
- while (changed) {
29
- changed = false;
27
+ while (true) {
30
28
  const markerPos = this.buffer.indexOf(MARKER_PREFIX);
31
29
  if (markerPos === -1) {
32
- changed = this.emitBufferedContent(events, this.buffer.length);
30
+ this.emitBufferedContent(events, this.buffer.length);
33
31
  break;
34
32
  }
35
33
  if (markerPos > 0) {
36
34
  const before = this.buffer.slice(0, markerPos);
37
35
  this.buffer = this.buffer.slice(markerPos);
38
36
  this.appendContent(before, events);
39
- changed = true;
40
37
  continue;
41
38
  }
42
39
  const matched = this.tryMatchMarker(events);
43
40
  if (matched) {
44
- changed = true;
45
- } else {
46
- if (this.buffer.length >= MAX_MARKER_LENGTH) {
47
- const chunk = this.buffer.slice(0, 3);
48
- this.buffer = this.buffer.slice(3);
49
- this.appendContent(chunk, events);
50
- changed = true;
51
- } else {
52
- break;
53
- }
41
+ continue;
42
+ }
43
+ if (this.buffer.length >= MAX_MARKER_LENGTH) {
44
+ const chunk = this.buffer.slice(0, 3);
45
+ this.buffer = this.buffer.slice(3);
46
+ this.appendContent(chunk, events);
47
+ continue;
54
48
  }
49
+ break;
55
50
  }
56
51
  return events;
57
52
  }
@@ -1,7 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  declare const _default: import("..").ServerSideTool<z.ZodObject<{
3
- tools: z.ZodArray<z.ZodEnum<{
4
- [x: string]: string;
5
- }>>;
3
+ tools: z.ZodArray<z.ZodString>;
6
4
  }, z.core.$strip>>;
7
5
  export default _default;
@@ -5,7 +5,9 @@ export default defineServerSideTool({
5
5
  description: 'Load additional tools by name before using them. You must call this before using any tool listed under "Additional Tools" in the system prompt.',
6
6
  inputSchema(ctx) {
7
7
  return z.object({
8
- tools: z.array(z.enum(ctx.lazyToolNames)).describe("Tool names to activate")
8
+ tools: z.array(z.string()).describe(
9
+ ctx.lazyToolNames.length ? `Tool names to activate. Loadable tools: ${ctx.lazyToolNames.join(", ")}.` : "Tool names to activate."
10
+ )
9
11
  });
10
12
  },
11
13
  isAvailable(ctx) {
@@ -19,21 +19,21 @@ import { z } from 'zod';
19
19
  * or `.default()` on the result would degrade to `any` in the published `.d.ts`
20
20
  * — use {@link optionalBooleanParam} / {@link booleanParamWithDefault} instead.
21
21
  */
22
- export declare function booleanParam(description: string): z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>;
22
+ export declare function booleanParam(description: string): z.ZodPreprocess<z.ZodBoolean>;
23
23
  /**
24
24
  * Optional variant of {@link booleanParam}. Use instead of
25
25
  * `booleanParam(...).optional()` so isolated-declaration emit can preserve the
26
26
  * type — chained Zod method calls aren't resolvable by mkdist's per-file
27
27
  * declaration emit and collapse to `any` in the published `.d.ts`.
28
28
  */
29
- export declare function optionalBooleanParam(description: string): z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
29
+ export declare function optionalBooleanParam(description: string): z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
30
30
  /**
31
31
  * Optional boolean with a default. Use instead of
32
32
  * `booleanParam(...).optional().default(value)` so isolated-declaration emit
33
33
  * can preserve the type. The default value applies when the param is omitted
34
34
  * or `undefined` at parse time.
35
35
  */
36
- export declare function booleanParamWithDefault(description: string, defaultValue: boolean): z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
36
+ export declare function booleanParamWithDefault(description: string, defaultValue: boolean): z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
37
37
  /**
38
38
  * Coerce double-serialized array/object params back to their real values.
39
39
  *
@@ -207,7 +207,6 @@ export type PageContext = {
207
207
  * Both Anthropic and OpenAI SDKs map to these via HTTP status codes.
208
208
  */
209
209
  export declare const agentErrorTypeSchema: z.ZodEnum<{
210
- unknown: "unknown";
211
210
  authentication: "authentication";
212
211
  rate_limit: "rate_limit";
213
212
  overloaded: "overloaded";
@@ -215,6 +214,7 @@ export declare const agentErrorTypeSchema: z.ZodEnum<{
215
214
  bad_request: "bad_request";
216
215
  connection: "connection";
217
216
  unauthorized: "unauthorized";
217
+ unknown: "unknown";
218
218
  }>;
219
219
  export type AgentErrorType = z.infer<typeof agentErrorTypeSchema>;
220
220
  /**
@@ -355,8 +355,8 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
355
355
  name: z.ZodString;
356
356
  label: z.ZodString;
357
357
  type: z.ZodEnum<{
358
- link: "link";
359
358
  reference: "reference";
359
+ link: "link";
360
360
  }>;
361
361
  allowed: z.ZodArray<z.ZodObject<{
362
362
  type: z.ZodString;
@@ -395,8 +395,8 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
395
395
  name: z.ZodString;
396
396
  label: z.ZodString;
397
397
  type: z.ZodEnum<{
398
- link: "link";
399
398
  reference: "reference";
399
+ link: "link";
400
400
  }>;
401
401
  allowed: z.ZodArray<z.ZodObject<{
402
402
  type: z.ZodString;