@blokkli/editor 2.0.0-alpha.60 → 2.0.0-alpha.61

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 (129) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/modules/agent/index.mjs +2 -5
  4. package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
  5. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
  6. package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
  7. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
  8. package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
  9. package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
  10. package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
  11. package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
  12. package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
  13. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
  14. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
  15. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
  16. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
  17. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
  18. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
  19. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
  20. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
  21. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
  22. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
  23. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
  24. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
  25. package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
  26. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
  27. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
  28. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +10 -1
  29. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +4 -4
  30. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
  31. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
  32. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
  33. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
  34. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
  35. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
  36. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
  37. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
  38. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
  39. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
  40. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
  41. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
  42. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
  43. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
  44. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
  45. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +2 -2
  46. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
  47. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
  48. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
  49. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
  50. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
  51. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +7 -6
  52. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
  53. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
  54. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
  55. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
  56. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +6 -0
  57. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +2 -2
  58. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
  59. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
  60. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
  61. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
  62. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
  63. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
  64. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
  65. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
  66. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +14 -0
  67. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +2 -2
  68. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
  69. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
  70. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
  71. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
  72. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
  73. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
  74. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
  75. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
  76. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
  77. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
  78. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
  79. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
  80. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +13 -5
  81. package/dist/modules/agent/runtime/app/tools/schemas.js +17 -10
  82. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
  83. package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
  84. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
  85. package/dist/modules/agent/runtime/app/tools/search_media/index.js +2 -2
  86. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
  87. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
  88. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
  89. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
  90. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
  91. package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
  92. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
  93. package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
  94. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
  95. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
  96. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
  97. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
  98. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
  99. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
  100. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
  101. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
  102. package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
  103. package/dist/modules/agent/runtime/app/types/index.js +4 -3
  104. package/dist/modules/agent/runtime/server/agent.js +1 -1
  105. package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
  106. package/dist/modules/agent/runtime/server/classes/Session/index.js +6 -5
  107. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
  108. package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
  109. package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
  110. package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
  111. package/dist/modules/agent/runtime/shared/types.js +6 -1
  112. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
  113. package/dist/runtime/editor/components/Actions/Title/index.vue +7 -6
  114. package/dist/runtime/editor/components/DiffApproval/index.vue +2 -2
  115. package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
  116. package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
  117. package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
  118. package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
  119. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  120. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  121. package/dist/runtime/editor/css/output.css +1 -1
  122. package/dist/runtime/editor/features/changelog/changelog.json +9 -1
  123. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  124. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  125. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  126. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  127. package/dist/runtime/editor/translations/de.json +2 -0
  128. package/dist/runtime/editor/translations/gsw_CH.json +9 -0
  129. package/package.json +3 -2
@@ -2,15 +2,16 @@ import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { readBlockContentFields } from "../helpers.js";
4
4
  import { stringArrayParam, tolerantSingularKeys } from "../schemas.js";
5
- import { booleanParam } from "#blokkli/agent/shared/toolParams";
6
- const paramsSchema = tolerantSingularKeys(
5
+ import { booleanParamWithDefault } from "../../../shared/toolParams.js";
6
+ export const paramsSchema = tolerantSingularKeys(
7
7
  z.object({
8
8
  uuids: stringArrayParam(
9
9
  "Array of paragraph UUIDs. To get page-level fields, pass the page UUID in this array."
10
10
  ),
11
- includeNested: booleanParam(
12
- "Recursively include content fields from all nested child paragraphs (default: true). Set to false to only get direct fields."
13
- ).optional().default(true)
11
+ includeNested: booleanParamWithDefault(
12
+ "Recursively include content fields from all nested child paragraphs (default: true). Set to false to only get direct fields.",
13
+ true
14
+ )
14
15
  }),
15
16
  { uuid: "uuids" }
16
17
  );
@@ -48,7 +49,7 @@ const fieldSchema = z.discriminatedUnion("type", [
48
49
  ).describe("Entity types and bundles this field accepts")
49
50
  })
50
51
  ]);
51
- const resultSchema = z.record(
52
+ export const resultSchema = z.record(
52
53
  z.string().describe("Paragraph UUID"),
53
54
  z.record(z.string().describe("Field name"), fieldSchema)
54
55
  );
@@ -1,2 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ before: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
4
+ after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5
+ }, z.core.$strip>;
6
+ export declare const resultSchema: z.ZodObject<{
7
+ currentIndex: z.ZodNumber;
8
+ totalCount: z.ZodNumber;
9
+ canUndo: z.ZodBoolean;
10
+ canRedo: z.ZodBoolean;
11
+ currentMutation: z.ZodNullable<z.ZodObject<{
12
+ index: z.ZodNumber;
13
+ label: z.ZodString;
14
+ pluginId: z.ZodOptional<z.ZodString>;
15
+ affectedParagraphUuid: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ mutationsBefore: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
+ index: z.ZodNumber;
19
+ label: z.ZodString;
20
+ }, z.core.$strip>>>;
21
+ mutationsAfter: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ index: z.ZodNumber;
23
+ label: z.ZodString;
24
+ }, z.core.$strip>>>;
25
+ }, z.core.$strip>;
1
26
  declare const _default: any;
2
27
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({
3
+ export const paramsSchema = z.object({
4
4
  before: z.coerce.number().optional().describe("How many mutations before current to include"),
5
5
  after: z.coerce.number().optional().describe("How many mutations after current to include (redo-able)")
6
6
  });
@@ -14,7 +14,7 @@ const currentMutationSchema = z.object({
14
14
  pluginId: z.string().optional().describe("Internal plugin ID"),
15
15
  affectedParagraphUuid: z.string().optional().describe("UUID of the paragraph that was affected")
16
16
  });
17
- const resultSchema = z.object({
17
+ export const resultSchema = z.object({
18
18
  currentIndex: z.number().describe("Current position in history (-1 = pristine state)"),
19
19
  totalCount: z.number().describe("Total mutations in history"),
20
20
  canUndo: z.boolean().describe("Whether undo is possible"),
@@ -1,2 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuid: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodObject<{
6
+ totalParagraphs: z.ZodNumber;
7
+ structure: z.ZodString;
8
+ }, z.core.$strip>;
1
9
  declare const _default: any;
2
10
  export default _default;
@@ -5,12 +5,12 @@ import {
5
5
  buildBlock,
6
6
  countBlocks
7
7
  } from "#blokkli/agent/app/helpers/pageStructure";
8
- const paramsSchema = z.object({
8
+ export const paramsSchema = z.object({
9
9
  uuid: z.string().optional().describe(
10
10
  "UUID of a specific paragraph. When provided, returns only that paragraph and its subtree. Omit to get the full page structure."
11
11
  )
12
12
  });
13
- const resultSchema = z.object({
13
+ export const resultSchema = z.object({
14
14
  totalParagraphs: z.number().describe(
15
15
  "Total number of paragraphs in scope (full page or subtree when uuid is given)"
16
16
  ),
@@ -1,2 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
3
+ export declare const resultSchema: z.ZodObject<{
4
+ text: z.ZodString;
5
+ truncated: z.ZodOptional<z.ZodBoolean>;
6
+ }, z.core.$strip>;
1
7
  declare const _default: any;
2
8
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({});
4
- const resultSchema = z.object({
3
+ export const paramsSchema = z.object({});
4
+ export const resultSchema = z.object({
5
5
  text: z.string().describe(
6
6
  "The page rendered as Markdown \u2014 exactly what the user sees, in reading order"
7
7
  ),
@@ -1,2 +1,83 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
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>>>;
9
+ }, z.core.$strip>;
10
+ export declare const resultSchema: z.ZodObject<{
11
+ uuid: z.ZodString;
12
+ bundle: z.ZodString;
13
+ label: z.ZodString;
14
+ fragmentName: z.ZodOptional<z.ZodString>;
15
+ nestingLevel: z.ZodNumber;
16
+ parent: z.ZodNullable<z.ZodObject<{
17
+ type: z.ZodString;
18
+ uuid: z.ZodString;
19
+ field: z.ZodString;
20
+ }, z.core.$strip>>;
21
+ parentChain: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ uuid: z.ZodString;
23
+ bundle: z.ZodString;
24
+ label: z.ZodString;
25
+ field: z.ZodString;
26
+ }, z.core.$strip>>>;
27
+ siblings: z.ZodOptional<z.ZodObject<{
28
+ total: z.ZodNumber;
29
+ position: z.ZodNumber;
30
+ prev: z.ZodNullable<z.ZodObject<{
31
+ uuid: z.ZodString;
32
+ bundle: z.ZodString;
33
+ }, z.core.$strip>>;
34
+ next: z.ZodNullable<z.ZodObject<{
35
+ uuid: z.ZodString;
36
+ bundle: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>>;
39
+ childFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
40
+ name: z.ZodString;
41
+ label: z.ZodString;
42
+ count: z.ZodNumber;
43
+ cardinality: z.ZodNumber;
44
+ bundles: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strip>>>;
46
+ contentFields: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ field: z.ZodString;
48
+ type: z.ZodLiteral<"plain">;
49
+ currentValue: z.ZodString;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ field: z.ZodString;
52
+ type: z.ZodLiteral<"markup">;
53
+ currentValue: z.ZodString;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ field: z.ZodString;
56
+ label: z.ZodString;
57
+ type: z.ZodLiteral<"reference">;
58
+ allowed: z.ZodArray<z.ZodObject<{
59
+ type: z.ZodString;
60
+ bundles: z.ZodArray<z.ZodString>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>, z.ZodObject<{
63
+ field: z.ZodString;
64
+ label: z.ZodString;
65
+ type: z.ZodLiteral<"link">;
66
+ allowed: z.ZodArray<z.ZodObject<{
67
+ type: z.ZodString;
68
+ bundles: z.ZodArray<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>], "type">>>;
71
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
72
+ type: z.ZodString;
73
+ label: z.ZodString;
74
+ description: z.ZodOptional<z.ZodString>;
75
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
76
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
77
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
78
+ step: z.ZodOptional<z.ZodNumber>;
79
+ currentValue: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>;
80
+ }, z.core.$strip>>>;
81
+ }, z.core.$strip>;
1
82
  declare const _default: any;
2
83
  export default _default;
@@ -1,24 +1,32 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { parentSchema, blockOptionsMapSchema } from "../schemas.js";
4
- import { booleanParam } from "#blokkli/agent/shared/toolParams";
4
+ import { booleanParamWithDefault } from "../../../shared/toolParams.js";
5
5
  import {
6
6
  buildBlockOptionsMap,
7
7
  getResolvedOptions,
8
8
  readBlockContentFields
9
9
  } from "../helpers.js";
10
10
  import { fragmentBlockBundle } from "#blokkli-build/config";
11
- const paramsSchema = z.object({
11
+ export const paramsSchema = z.object({
12
12
  uuid: z.string().describe("The paragraph UUID"),
13
- includeParentChain: booleanParam(
14
- "Include ancestor parent paragraphs up to the page"
15
- ).optional().default(true),
16
- includeSiblings: booleanParam("Include sibling paragraphs in the same field").optional().default(false),
17
- includeChildren: booleanParam("Include child fields summary").optional().default(true),
18
- includeContentFields: booleanParam(
19
- "Include content fields (text, media, links) with values"
20
- ).optional().default(true),
21
- includeOptions: booleanParam("Include paragraph options").optional().default(true)
13
+ includeParentChain: booleanParamWithDefault(
14
+ "Include ancestor parent paragraphs up to the page",
15
+ true
16
+ ),
17
+ includeSiblings: booleanParamWithDefault(
18
+ "Include sibling paragraphs in the same field",
19
+ false
20
+ ),
21
+ includeChildren: booleanParamWithDefault(
22
+ "Include child fields summary",
23
+ true
24
+ ),
25
+ includeContentFields: booleanParamWithDefault(
26
+ "Include content fields (text, media, links) with values",
27
+ true
28
+ ),
29
+ includeOptions: booleanParamWithDefault("Include paragraph options", true)
22
30
  });
23
31
  const parentChainItemSchema = z.object({
24
32
  uuid: z.string().describe("The parent paragraph UUID"),
@@ -79,7 +87,7 @@ const contentFieldSchema = z.discriminatedUnion("type", [
79
87
  ).describe("Entity types and bundles this field accepts")
80
88
  })
81
89
  ]);
82
- const resultSchema = z.object({
90
+ export const resultSchema = z.object({
83
91
  uuid: z.string().describe("The paragraph UUID"),
84
92
  bundle: z.string().describe("The paragraph type"),
85
93
  label: z.string().describe("Human-readable paragraph label"),
@@ -1,2 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuids: z.ZodArray<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
6
+ type: z.ZodString;
7
+ label: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
10
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
11
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
12
+ step: z.ZodOptional<z.ZodNumber>;
13
+ currentValue: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>;
14
+ }, z.core.$strip>>>;
1
15
  declare const _default: any;
2
16
  export default _default;
@@ -2,10 +2,10 @@ import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { blockOptionsMapSchema } from "../schemas.js";
4
4
  import { buildBlockOptionsMap, getResolvedOptions } from "../helpers.js";
5
- const paramsSchema = z.object({
5
+ export const paramsSchema = z.object({
6
6
  uuids: z.array(z.string()).describe("The paragraph UUIDs to get options for")
7
7
  });
8
- const resultSchema = z.record(
8
+ export const resultSchema = z.record(
9
9
  z.string().describe("Paragraph UUID"),
10
10
  blockOptionsMapSchema.describe("Options for this paragraph")
11
11
  );
@@ -1,2 +1,40 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ maxNestingLevel: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
4
+ includeDimensions: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
5
+ }, z.core.$strip>;
6
+ type BlockDimensions = {
7
+ x: number;
8
+ y: number;
9
+ width: number;
10
+ height: number;
11
+ };
12
+ type NestedBlock = {
13
+ uuid: string;
14
+ bundle: string;
15
+ label: string;
16
+ dimensions?: BlockDimensions;
17
+ children?: Record<string, NestedBlock[]>;
18
+ };
19
+ export declare const resultSchema: z.ZodObject<{
20
+ paragraphs: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ bundle: z.ZodString;
23
+ label: z.ZodString;
24
+ dimensions: z.ZodOptional<z.ZodObject<{
25
+ x: z.ZodNumber;
26
+ y: z.ZodNumber;
27
+ width: z.ZodNumber;
28
+ height: z.ZodNumber;
29
+ }, z.core.$strip>>;
30
+ visibilityPercent: z.ZodNumber;
31
+ parent: z.ZodObject<{
32
+ type: z.ZodString;
33
+ uuid: z.ZodString;
34
+ field: z.ZodString;
35
+ }, z.core.$strip>;
36
+ children: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<NestedBlock, unknown, z.core.$ZodTypeInternals<NestedBlock, unknown>>>>>;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>;
1
39
  declare const _default: any;
2
40
  export default _default;
@@ -1,13 +1,14 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- import { booleanParam } from "#blokkli/agent/shared/toolParams";
4
- const paramsSchema = z.object({
3
+ import { booleanParamWithDefault } from "../../../shared/toolParams.js";
4
+ export const paramsSchema = z.object({
5
5
  maxNestingLevel: z.coerce.number().optional().describe(
6
6
  "Maximum nesting depth to include (0 = only root paragraphs, 1 = root + direct children, etc.). Omit for unlimited depth."
7
7
  ),
8
- includeDimensions: booleanParam(
9
- "Include x, y, width, height for each paragraph (default: false)"
10
- ).optional().default(false)
8
+ includeDimensions: booleanParamWithDefault(
9
+ "Include x, y, width, height for each paragraph (default: false)",
10
+ false
11
+ )
11
12
  });
12
13
  const dimensionsSchema = z.object({
13
14
  x: z.number().describe("X position in artboard coordinates"),
@@ -35,7 +36,7 @@ const rootBlockSchema = z.object({
35
36
  }).describe("Parent field information"),
36
37
  children: z.record(z.string(), z.array(nestedBlockSchema)).optional().describe("Child paragraphs organized by field name")
37
38
  });
38
- const resultSchema = z.object({
39
+ export const resultSchema = z.object({
39
40
  paragraphs: z.array(rootBlockSchema).describe("Root-level paragraphs currently visible in the viewport")
40
41
  });
41
42
  function getDimensions(app, uuid) {
@@ -1,2 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
6
+ fieldValue: z.ZodOptional<z.ZodString>;
7
+ issues: z.ZodArray<z.ZodObject<{
8
+ text: z.ZodString;
9
+ impact: z.ZodOptional<z.ZodString>;
10
+ score: z.ZodOptional<z.ZodNumber>;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>>>;
1
13
  declare const _default: any;
2
14
  export default _default;
@@ -10,12 +10,12 @@ const fieldResultSchema = z.object({
10
10
  fieldValue: z.string().optional(),
11
11
  issues: z.array(issueSchema)
12
12
  });
13
- const paramsSchema = z.object({
13
+ export const paramsSchema = z.object({
14
14
  uuids: z.array(z.string()).optional().describe(
15
15
  "Optional list of paragraph UUIDs to return results for. If omitted, returns results for all paragraphs."
16
16
  )
17
17
  });
18
- const resultSchema = z.record(
18
+ export const resultSchema = z.record(
19
19
  z.string(),
20
20
  z.record(z.string(), fieldResultSchema)
21
21
  );
@@ -1,2 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuids: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodObject<{
6
+ entities: z.ZodArray<z.ZodObject<{
7
+ entityUuid: z.ZodString;
8
+ entityType: z.ZodString;
9
+ entityBundle: z.ZodString;
10
+ label: z.ZodString;
11
+ editUrl: z.ZodString;
12
+ referencedBy: z.ZodArray<z.ZodString>;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>;
1
15
  declare const _default: any;
2
16
  export default _default;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { stringArrayParam } from "../schemas.js";
4
- const paramsSchema = z.object({
4
+ export const paramsSchema = z.object({
5
5
  uuids: stringArrayParam(
6
6
  "Paragraph UUIDs to resolve references for. Returns the entities (media, nodes, taxonomy terms, ...) currently referenced by these paragraphs via any of their reference fields."
7
7
  )
8
8
  });
9
- const resultSchema = z.object({
9
+ export const resultSchema = z.object({
10
10
  entities: z.array(
11
11
  z.object({
12
12
  entityUuid: z.string().describe(
@@ -1,2 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{}, z.core.$strip>;
3
+ export declare const resultSchema: z.ZodObject<{
4
+ paragraphs: z.ZodArray<z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ bundle: z.ZodString;
7
+ label: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ }, z.core.$strip>;
1
10
  declare const _default: any;
2
11
  export default _default;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({});
3
+ export const paramsSchema = z.object({});
4
4
  const paragraphSchema = z.object({
5
5
  uuid: z.string().describe("The paragraph UUID"),
6
6
  bundle: z.string().describe("The paragraph type"),
7
7
  label: z.string().describe("Human-readable paragraph label")
8
8
  });
9
- const resultSchema = z.object({
9
+ export const resultSchema = z.object({
10
10
  paragraphs: z.array(paragraphSchema).describe("Currently selected paragraphs")
11
11
  });
12
12
  export default defineBlokkliAgentTool({
@@ -1,2 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ index: z.ZodCoercedNumber<unknown>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
6
+ type: z.ZodEnum<{
7
+ rewrite: "rewrite";
8
+ delete: "delete";
9
+ add: "add";
10
+ move: "move";
11
+ options: "options";
12
+ }>;
13
+ label: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ error: z.ZodString;
16
+ }, z.core.$strip>]>;
1
17
  declare const _default: any;
2
18
  export default _default;
@@ -1,13 +1,14 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { mutationResultSchema } from "../schemas.js";
4
- const paramsSchema = z.object({
4
+ export const paramsSchema = z.object({
5
5
  // Coerce so a numeric string (e.g. "5") is accepted — the LLM often sends the
6
6
  // index as a string. A non-numeric string is still rejected.
7
7
  index: z.coerce.number().describe(
8
8
  "History index to navigate to (-1 = pristine state, 0+ = mutation index)"
9
9
  )
10
10
  });
11
+ export const resultSchema = mutationResultSchema;
11
12
  export default defineBlokkliAgentTool({
12
13
  name: "go_to_history_index",
13
14
  description: `Navigate to a specific point in mutation history (undo/redo). -1 = pristine state, 0 = first mutation, etc.`,
@@ -21,7 +22,7 @@ export default defineBlokkliAgentTool({
21
22
  });
22
23
  },
23
24
  paramsSchema,
24
- resultSchema: mutationResultSchema,
25
+ resultSchema,
25
26
  requiredAdapterMethods: ["setHistoryIndex"],
26
27
  execute(ctx, params) {
27
28
  const { $t, state } = ctx.app;
@@ -1,2 +1,24 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuids: z.ZodArray<z.ZodString>;
4
+ parent: z.ZodObject<{
5
+ type: z.ZodString;
6
+ uuid: z.ZodString;
7
+ field: z.ZodString;
8
+ }, z.core.$strip>;
9
+ position: z.ZodDefault<z.ZodOptional<z.ZodString>>;
10
+ }, z.core.$strip>;
11
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
12
+ type: z.ZodEnum<{
13
+ rewrite: "rewrite";
14
+ delete: "delete";
15
+ add: "add";
16
+ move: "move";
17
+ options: "options";
18
+ }>;
19
+ label: z.ZodString;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ error: z.ZodString;
22
+ }, z.core.$strip>]>;
1
23
  declare const _default: any;
2
24
  export default _default;
@@ -8,11 +8,12 @@ import {
8
8
  validateFieldCardinality
9
9
  } from "../../helpers/validation.js";
10
10
  import { getFieldKey } from "#blokkli/helpers";
11
- const paramsSchema = z.object({
11
+ export const paramsSchema = z.object({
12
12
  uuids: z.array(z.string()).describe("The UUIDs of the paragraphs to move"),
13
13
  parent: parentSchema.describe("The target parent entity"),
14
14
  position: positionSchema
15
15
  });
16
+ export const resultSchema = mutationResultSchema;
16
17
  export default defineBlokkliAgentTool({
17
18
  name: "move_paragraphs",
18
19
  description: "Move one or more paragraphs to a different parent field. All paragraphs are moved to the same location and they KEEP their UUIDs!!",
@@ -24,7 +25,7 @@ export default defineBlokkliAgentTool({
24
25
  return $t("aiAgentMoveBlocksRunning", "Moving blocks", { more: true });
25
26
  },
26
27
  paramsSchema,
27
- resultSchema: mutationResultSchema,
28
+ resultSchema,
28
29
  requiredAdapterMethods: ["moveMultipleBlocks"],
29
30
  execute(ctx, params) {
30
31
  const { blocks, types } = ctx.app;
@@ -1,2 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ parent: z.ZodObject<{
4
+ type: z.ZodString;
5
+ uuid: z.ZodString;
6
+ field: z.ZodString;
7
+ }, z.core.$strip>;
8
+ uuids: z.ZodArray<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
11
+ type: z.ZodEnum<{
12
+ rewrite: "rewrite";
13
+ delete: "delete";
14
+ add: "add";
15
+ move: "move";
16
+ options: "options";
17
+ }>;
18
+ label: z.ZodString;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ error: z.ZodString;
21
+ }, z.core.$strip>]>;
1
22
  declare const _default: any;
2
23
  export default _default;
@@ -6,12 +6,13 @@ import {
6
6
  requireBundlePermission,
7
7
  requireNoRestrictedAncestor
8
8
  } from "../../helpers/validation.js";
9
- const paramsSchema = z.object({
9
+ export const paramsSchema = z.object({
10
10
  parent: parentSchema.describe("The parent field containing the paragraphs"),
11
11
  uuids: z.array(z.string()).min(2).describe(
12
12
  "The UUIDs of the paragraphs in the desired order. Must include ALL paragraphs currently in the field."
13
13
  )
14
14
  });
15
+ export const resultSchema = mutationResultSchema;
15
16
  export default defineBlokkliAgentTool({
16
17
  name: "rearrange_paragraphs",
17
18
  description: "Rearrange paragraphs within a single field by specifying the desired order. You must provide ALL paragraph UUIDs that are currently in the field \u2014 use get_child_paragraphs to get them. This only reorders, it does not add or remove paragraphs.",
@@ -25,7 +26,7 @@ export default defineBlokkliAgentTool({
25
26
  });
26
27
  },
27
28
  paramsSchema,
28
- resultSchema: mutationResultSchema,
29
+ resultSchema,
29
30
  requiredAdapterMethods: ["rearrangeBlocks"],
30
31
  execute(ctx, params) {
31
32
  const { blocks, types, state, $t } = ctx.app;
@@ -1,2 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuid: z.ZodString;
4
+ field: z.ZodString;
5
+ itemId: z.ZodString;
6
+ itemEntityType: z.ZodString;
7
+ itemEntityBundle: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
10
+ type: z.ZodEnum<{
11
+ rewrite: "rewrite";
12
+ delete: "delete";
13
+ add: "add";
14
+ move: "move";
15
+ options: "options";
16
+ }>;
17
+ label: z.ZodString;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ error: z.ZodString;
20
+ }, z.core.$strip>]>;
1
21
  declare const _default: any;
2
22
  export default _default;
@@ -5,13 +5,14 @@ import {
5
5
  requireBundlePermission,
6
6
  requireNoRestrictedAncestor
7
7
  } from "../../helpers/validation.js";
8
- const paramsSchema = z.object({
8
+ export const paramsSchema = z.object({
9
9
  uuid: z.string().describe("The paragraph UUID containing the content reference field"),
10
10
  field: z.string().describe("The content field name (reference type)"),
11
11
  itemId: z.string().describe("Content item ID from search_content_* results"),
12
12
  itemEntityType: z.string().describe("Entity type of the content item"),
13
13
  itemEntityBundle: z.string().describe("Entity bundle of the content item")
14
14
  });
15
+ export const resultSchema = mutationResultSchema;
15
16
  export default defineBlokkliAgentTool({
16
17
  name: "replace_content_search_item",
17
18
  description: "Replace a content reference on an existing paragraph field. Use get_content_fields first to see available reference fields, then search_content_* to find content items.",
@@ -27,7 +28,7 @@ export default defineBlokkliAgentTool({
27
28
  },
28
29
  lazy: true,
29
30
  paramsSchema,
30
- resultSchema: mutationResultSchema,
31
+ resultSchema,
31
32
  requiredAdapterMethods: ["replaceContentSearchItem"],
32
33
  execute(ctx, params) {
33
34
  const { blocks, types, $t } = ctx.app;