@bendyline/docblocks 2.0.0 → 2.1.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.
Files changed (278) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-2D7Y4IR3.js → chunk-4437YWLE.js} +123 -67
  3. package/dist/{chunk-5MYAICRE.js → chunk-45T5AFCN.js} +44 -57
  4. package/dist/{chunk-PGR7LK6D.js → chunk-6L3JRDE7.js} +14 -6
  5. package/dist/{chunk-RVQHY3XU.js → chunk-6XHOOBYF.js} +0 -1
  6. package/dist/chunk-73OOROXH.js +8 -0
  7. package/dist/{chunk-SI2LU2RP.js → chunk-AYWKIZLD.js} +1 -1
  8. package/dist/{chunk-GCPBEMMH.js → chunk-BVY7GGNV.js} +10 -21
  9. package/dist/{chunk-AEHCVWU5.js → chunk-DZB666V7.js} +0 -1
  10. package/dist/{chunk-75UUF6C4.js → chunk-HI7QEWL6.js} +18 -10
  11. package/dist/chunk-KQ6756AJ.js +28 -0
  12. package/dist/chunk-LMMOFRGQ.js +148 -0
  13. package/dist/{chunk-FNW556FN.js → chunk-M2PUNKHS.js} +0 -1
  14. package/dist/chunk-M5ZNQGR5.js +19 -0
  15. package/dist/chunk-M62ZGJ5I.js +51 -0
  16. package/dist/chunk-OQCPBOQA.js +168 -0
  17. package/dist/{chunk-EGNDADXB.js → chunk-QI6YKTQV.js} +2 -3
  18. package/dist/chunk-SJBB5OD7.js +227 -0
  19. package/dist/{chunk-EZKJZUNJ.js → chunk-XAMILHQP.js} +0 -1
  20. package/dist/{chunk-J32GU3F3.js → chunk-YM7O3PWO.js} +249 -222
  21. package/dist/{chunk-RQJRQF46.js → chunk-ZO7G53QP.js} +41 -49
  22. package/dist/document/index.d.ts +358 -6
  23. package/dist/document/index.js +24 -4
  24. package/dist/filesystem/electron.d.ts +73 -4
  25. package/dist/filesystem/electron.js +16 -4
  26. package/dist/filesystem/index.d.ts +228 -22
  27. package/dist/filesystem/index.js +133 -20
  28. package/dist/filesystem/indexeddb.d.ts +284 -5
  29. package/dist/filesystem/indexeddb.js +22 -5
  30. package/dist/filesystem/memory.d.ts +152 -4
  31. package/dist/filesystem/memory.js +12 -4
  32. package/dist/filesystem/native.d.ts +136 -4
  33. package/dist/filesystem/native.js +27 -4
  34. package/dist/host/index.d.ts +32 -9
  35. package/dist/host/index.js +26 -30
  36. package/dist/index.d.ts +14 -10
  37. package/dist/index.js +204 -10
  38. package/dist/mcp/index.d.ts +33 -4
  39. package/dist/mcp/index.js +31 -4
  40. package/dist/mcp/zod.d.ts +645 -643
  41. package/dist/mcp/zod.js +700 -885
  42. package/dist/share/index.d.ts +43 -0
  43. package/dist/share/index.js +12 -0
  44. package/dist/{types-CsX6EN2t.d.ts → types-BEg5SQ1_.d.ts} +1 -1
  45. package/dist/{types-eOlt9J7n.d.ts → types-CueK0tvU.d.ts} +34 -11
  46. package/dist/vscode/index.d.ts +225 -3
  47. package/dist/vscode/index.js +389 -3
  48. package/dist/workspace/index.d.ts +141 -4
  49. package/dist/workspace/index.js +28 -3
  50. package/package.json +10 -5
  51. package/dist/chunk-2D7Y4IR3.js.map +0 -1
  52. package/dist/chunk-5MYAICRE.js.map +0 -1
  53. package/dist/chunk-75UUF6C4.js.map +0 -1
  54. package/dist/chunk-AEHCVWU5.js.map +0 -1
  55. package/dist/chunk-AYZ4HN5M.js +0 -20
  56. package/dist/chunk-AYZ4HN5M.js.map +0 -1
  57. package/dist/chunk-EGNDADXB.js.map +0 -1
  58. package/dist/chunk-EZKJZUNJ.js.map +0 -1
  59. package/dist/chunk-FNW556FN.js.map +0 -1
  60. package/dist/chunk-GCPBEMMH.js.map +0 -1
  61. package/dist/chunk-J32GU3F3.js.map +0 -1
  62. package/dist/chunk-PGR7LK6D.js.map +0 -1
  63. package/dist/chunk-RQJRQF46.js.map +0 -1
  64. package/dist/chunk-RVQHY3XU.js.map +0 -1
  65. package/dist/chunk-SI2LU2RP.js.map +0 -1
  66. package/dist/chunk-W5UUUII5.js +0 -142
  67. package/dist/chunk-W5UUUII5.js.map +0 -1
  68. package/dist/document/document-session.d.ts +0 -127
  69. package/dist/document/document-session.d.ts.map +0 -1
  70. package/dist/document/document-session.js +0 -749
  71. package/dist/document/document-session.js.map +0 -1
  72. package/dist/document/filesystem-target.d.ts +0 -17
  73. package/dist/document/filesystem-target.d.ts.map +0 -1
  74. package/dist/document/filesystem-target.js +0 -70
  75. package/dist/document/filesystem-target.js.map +0 -1
  76. package/dist/document/index.d.ts.map +0 -1
  77. package/dist/document/index.js.map +0 -1
  78. package/dist/document/recovery-journal.d.ts +0 -125
  79. package/dist/document/recovery-journal.d.ts.map +0 -1
  80. package/dist/document/recovery-journal.js +0 -385
  81. package/dist/document/recovery-journal.js.map +0 -1
  82. package/dist/document/types.d.ts +0 -89
  83. package/dist/document/types.d.ts.map +0 -1
  84. package/dist/document/types.js +0 -9
  85. package/dist/document/types.js.map +0 -1
  86. package/dist/filesystem/commit-lock.d.ts +0 -3
  87. package/dist/filesystem/commit-lock.d.ts.map +0 -1
  88. package/dist/filesystem/commit-lock.js +0 -20
  89. package/dist/filesystem/commit-lock.js.map +0 -1
  90. package/dist/filesystem/dbk-workspace.d.ts +0 -34
  91. package/dist/filesystem/dbk-workspace.d.ts.map +0 -1
  92. package/dist/filesystem/dbk-workspace.js +0 -85
  93. package/dist/filesystem/dbk-workspace.js.map +0 -1
  94. package/dist/filesystem/electron-provider-v2.d.ts +0 -36
  95. package/dist/filesystem/electron-provider-v2.d.ts.map +0 -1
  96. package/dist/filesystem/electron-provider-v2.js +0 -503
  97. package/dist/filesystem/electron-provider-v2.js.map +0 -1
  98. package/dist/filesystem/electron-provider.d.ts +0 -35
  99. package/dist/filesystem/electron-provider.d.ts.map +0 -1
  100. package/dist/filesystem/electron-provider.js +0 -69
  101. package/dist/filesystem/electron-provider.js.map +0 -1
  102. package/dist/filesystem/electron.d.ts.map +0 -1
  103. package/dist/filesystem/electron.js.map +0 -1
  104. package/dist/filesystem/file-media-provider.d.ts +0 -23
  105. package/dist/filesystem/file-media-provider.d.ts.map +0 -1
  106. package/dist/filesystem/file-media-provider.js +0 -85
  107. package/dist/filesystem/file-media-provider.js.map +0 -1
  108. package/dist/filesystem/filesystem-content-container.d.ts +0 -24
  109. package/dist/filesystem/filesystem-content-container.d.ts.map +0 -1
  110. package/dist/filesystem/filesystem-content-container.js +0 -153
  111. package/dist/filesystem/filesystem-content-container.js.map +0 -1
  112. package/dist/filesystem/fs-error.d.ts +0 -46
  113. package/dist/filesystem/fs-error.d.ts.map +0 -1
  114. package/dist/filesystem/fs-error.js +0 -170
  115. package/dist/filesystem/fs-error.js.map +0 -1
  116. package/dist/filesystem/index.d.ts.map +0 -1
  117. package/dist/filesystem/index.js.map +0 -1
  118. package/dist/filesystem/indexeddb-content-container.d.ts +0 -22
  119. package/dist/filesystem/indexeddb-content-container.d.ts.map +0 -1
  120. package/dist/filesystem/indexeddb-content-container.js +0 -100
  121. package/dist/filesystem/indexeddb-content-container.js.map +0 -1
  122. package/dist/filesystem/indexeddb-provider-v2.d.ts +0 -96
  123. package/dist/filesystem/indexeddb-provider-v2.d.ts.map +0 -1
  124. package/dist/filesystem/indexeddb-provider-v2.js +0 -1241
  125. package/dist/filesystem/indexeddb-provider-v2.js.map +0 -1
  126. package/dist/filesystem/indexeddb-provider.d.ts +0 -39
  127. package/dist/filesystem/indexeddb-provider.d.ts.map +0 -1
  128. package/dist/filesystem/indexeddb-provider.js +0 -145
  129. package/dist/filesystem/indexeddb-provider.js.map +0 -1
  130. package/dist/filesystem/indexeddb-store.d.ts +0 -34
  131. package/dist/filesystem/indexeddb-store.d.ts.map +0 -1
  132. package/dist/filesystem/indexeddb-store.js +0 -165
  133. package/dist/filesystem/indexeddb-store.js.map +0 -1
  134. package/dist/filesystem/indexeddb.d.ts.map +0 -1
  135. package/dist/filesystem/indexeddb.js.map +0 -1
  136. package/dist/filesystem/legacy-v2-adapter.d.ts +0 -62
  137. package/dist/filesystem/legacy-v2-adapter.d.ts.map +0 -1
  138. package/dist/filesystem/legacy-v2-adapter.js +0 -499
  139. package/dist/filesystem/legacy-v2-adapter.js.map +0 -1
  140. package/dist/filesystem/memory-provider-v2.d.ts +0 -92
  141. package/dist/filesystem/memory-provider-v2.d.ts.map +0 -1
  142. package/dist/filesystem/memory-provider-v2.js +0 -615
  143. package/dist/filesystem/memory-provider-v2.js.map +0 -1
  144. package/dist/filesystem/memory-provider.d.ts +0 -54
  145. package/dist/filesystem/memory-provider.d.ts.map +0 -1
  146. package/dist/filesystem/memory-provider.js +0 -132
  147. package/dist/filesystem/memory-provider.js.map +0 -1
  148. package/dist/filesystem/memory.d.ts.map +0 -1
  149. package/dist/filesystem/memory.js.map +0 -1
  150. package/dist/filesystem/move-entry.d.ts +0 -9
  151. package/dist/filesystem/move-entry.d.ts.map +0 -1
  152. package/dist/filesystem/move-entry.js +0 -103
  153. package/dist/filesystem/move-entry.js.map +0 -1
  154. package/dist/filesystem/move-error.d.ts +0 -53
  155. package/dist/filesystem/move-error.d.ts.map +0 -1
  156. package/dist/filesystem/move-error.js +0 -99
  157. package/dist/filesystem/move-error.js.map +0 -1
  158. package/dist/filesystem/native-provider-v2.d.ts +0 -75
  159. package/dist/filesystem/native-provider-v2.d.ts.map +0 -1
  160. package/dist/filesystem/native-provider-v2.js +0 -849
  161. package/dist/filesystem/native-provider-v2.js.map +0 -1
  162. package/dist/filesystem/native-provider.d.ts +0 -53
  163. package/dist/filesystem/native-provider.d.ts.map +0 -1
  164. package/dist/filesystem/native-provider.js +0 -471
  165. package/dist/filesystem/native-provider.js.map +0 -1
  166. package/dist/filesystem/native.d.ts.map +0 -1
  167. package/dist/filesystem/native.js.map +0 -1
  168. package/dist/filesystem/types.d.ts +0 -83
  169. package/dist/filesystem/types.d.ts.map +0 -1
  170. package/dist/filesystem/types.js +0 -16
  171. package/dist/filesystem/types.js.map +0 -1
  172. package/dist/filesystem/v2.d.ts +0 -172
  173. package/dist/filesystem/v2.d.ts.map +0 -1
  174. package/dist/filesystem/v2.js +0 -16
  175. package/dist/filesystem/v2.js.map +0 -1
  176. package/dist/filesystem/workspace-path.d.ts +0 -21
  177. package/dist/filesystem/workspace-path.d.ts.map +0 -1
  178. package/dist/filesystem/workspace-path.js +0 -80
  179. package/dist/filesystem/workspace-path.js.map +0 -1
  180. package/dist/host/filesystem-v2.d.ts +0 -45
  181. package/dist/host/filesystem-v2.d.ts.map +0 -1
  182. package/dist/host/filesystem-v2.js +0 -13
  183. package/dist/host/filesystem-v2.js.map +0 -1
  184. package/dist/host/git.d.ts +0 -200
  185. package/dist/host/git.d.ts.map +0 -1
  186. package/dist/host/git.js +0 -15
  187. package/dist/host/git.js.map +0 -1
  188. package/dist/host/index.d.ts.map +0 -1
  189. package/dist/host/index.js.map +0 -1
  190. package/dist/host/types.d.ts +0 -232
  191. package/dist/host/types.d.ts.map +0 -1
  192. package/dist/host/types.js +0 -10
  193. package/dist/host/types.js.map +0 -1
  194. package/dist/host/wire-policy.d.ts +0 -22
  195. package/dist/host/wire-policy.d.ts.map +0 -1
  196. package/dist/host/wire-policy.js +0 -92
  197. package/dist/host/wire-policy.js.map +0 -1
  198. package/dist/index.d.ts.map +0 -1
  199. package/dist/index.js.map +0 -1
  200. package/dist/mcp/index.d.ts.map +0 -1
  201. package/dist/mcp/index.js.map +0 -1
  202. package/dist/mcp/types.d.ts +0 -466
  203. package/dist/mcp/types.d.ts.map +0 -1
  204. package/dist/mcp/types.js +0 -25
  205. package/dist/mcp/types.js.map +0 -1
  206. package/dist/mcp/wire.d.ts +0 -29
  207. package/dist/mcp/wire.d.ts.map +0 -1
  208. package/dist/mcp/wire.js +0 -1046
  209. package/dist/mcp/wire.js.map +0 -1
  210. package/dist/mcp/zod.d.ts.map +0 -1
  211. package/dist/mcp/zod.js.map +0 -1
  212. package/dist/vscode/index.d.ts.map +0 -1
  213. package/dist/vscode/index.js.map +0 -1
  214. package/dist/vscode/messages.d.ts +0 -204
  215. package/dist/vscode/messages.d.ts.map +0 -1
  216. package/dist/vscode/messages.js +0 -494
  217. package/dist/vscode/messages.js.map +0 -1
  218. package/dist/workspace/index.d.ts.map +0 -1
  219. package/dist/workspace/index.js.map +0 -1
  220. package/dist/workspace/reconcile-electron.d.ts +0 -19
  221. package/dist/workspace/reconcile-electron.d.ts.map +0 -1
  222. package/dist/workspace/reconcile-electron.js +0 -42
  223. package/dist/workspace/reconcile-electron.js.map +0 -1
  224. package/dist/workspace/types.d.ts +0 -69
  225. package/dist/workspace/types.d.ts.map +0 -1
  226. package/dist/workspace/types.js +0 -2
  227. package/dist/workspace/types.js.map +0 -1
  228. package/dist/workspace/workspace-manager.d.ts +0 -47
  229. package/dist/workspace/workspace-manager.d.ts.map +0 -1
  230. package/dist/workspace/workspace-manager.js +0 -126
  231. package/dist/workspace/workspace-manager.js.map +0 -1
  232. package/src/document/document-session.ts +0 -834
  233. package/src/document/filesystem-target.ts +0 -109
  234. package/src/document/index.ts +0 -41
  235. package/src/document/recovery-journal.ts +0 -536
  236. package/src/document/types.ts +0 -116
  237. package/src/filesystem/commit-lock.ts +0 -29
  238. package/src/filesystem/dbk-workspace.ts +0 -135
  239. package/src/filesystem/electron-provider-v2.ts +0 -630
  240. package/src/filesystem/electron-provider.ts +0 -99
  241. package/src/filesystem/electron.ts +0 -3
  242. package/src/filesystem/file-media-provider.ts +0 -103
  243. package/src/filesystem/filesystem-content-container.ts +0 -164
  244. package/src/filesystem/fs-error.ts +0 -234
  245. package/src/filesystem/index.ts +0 -143
  246. package/src/filesystem/indexeddb-content-container.ts +0 -112
  247. package/src/filesystem/indexeddb-provider-v2.ts +0 -1740
  248. package/src/filesystem/indexeddb-provider.ts +0 -171
  249. package/src/filesystem/indexeddb-store.ts +0 -207
  250. package/src/filesystem/indexeddb.ts +0 -12
  251. package/src/filesystem/legacy-v2-adapter.ts +0 -779
  252. package/src/filesystem/memory-provider-v2.ts +0 -896
  253. package/src/filesystem/memory-provider.ts +0 -180
  254. package/src/filesystem/memory.ts +0 -15
  255. package/src/filesystem/move-entry.ts +0 -142
  256. package/src/filesystem/move-error.ts +0 -159
  257. package/src/filesystem/native-provider-v2.ts +0 -1165
  258. package/src/filesystem/native-provider.ts +0 -537
  259. package/src/filesystem/native.ts +0 -16
  260. package/src/filesystem/types.ts +0 -114
  261. package/src/filesystem/v2.ts +0 -231
  262. package/src/filesystem/workspace-path.ts +0 -92
  263. package/src/host/filesystem-v2.ts +0 -104
  264. package/src/host/git.ts +0 -246
  265. package/src/host/index.ts +0 -93
  266. package/src/host/types.ts +0 -274
  267. package/src/host/wire-policy.ts +0 -103
  268. package/src/index.ts +0 -10
  269. package/src/mcp/index.ts +0 -3
  270. package/src/mcp/types.ts +0 -594
  271. package/src/mcp/wire.ts +0 -1280
  272. package/src/mcp/zod.ts +0 -1000
  273. package/src/vscode/index.ts +0 -2
  274. package/src/vscode/messages.ts +0 -704
  275. package/src/workspace/index.ts +0 -17
  276. package/src/workspace/reconcile-electron.ts +0 -65
  277. package/src/workspace/types.ts +0 -67
  278. package/src/workspace/workspace-manager.ts +0 -151
package/dist/mcp/zod.js CHANGED
@@ -1,908 +1,723 @@
1
- import { z } from 'zod';
2
- import { z as z4 } from 'zod/v4';
3
- import { MCP_WIRE_LIMITS, parseArtifactRef, parseComparisonResult, parseConversionResult, parseInspectionResult, parsePreviewResult, parseValidationResult, } from './wire.js';
4
- /** Canonical Zod projection of the exact MCP wire contract for protocol SDKs. */
5
- export const MAX_MARKDOWN_CHARACTERS = 20 * 1024 * 1024;
6
- export const MAX_PATH_CHARACTERS = 4096;
7
- const MAX_ID_CHARACTERS = 256;
8
- const IDENTIFIER_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/u;
9
- const FORMAT_PATTERN = /^[a-z0-9][a-z0-9.+_-]*$/u;
10
- const INPUT_FORMAT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9.+_-]*$/u;
11
- const MIME_TYPE_PATTERN = /^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/iu;
12
- const ARTIFACT_URI_PATTERN = /^docblocks:\/\/artifacts\/[A-Za-z0-9][A-Za-z0-9._:-]*$/u;
13
- const ISO_TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u;
14
- /* eslint-disable no-control-regex -- Wire contracts must publish explicit control-byte exclusions. */
15
- const WIRE_STRING_PATTERN = new RegExp('^[^\\u0000\\u007f]*$', 'u');
16
- const WORKSPACE_PATH_PATTERN = new RegExp('^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)(?:\\.{1,2})(?:/|$))(?!.*//)(?!.*[\\\\\\u0000-\\u001f\\u007f])(?!.*/$).+$', 'u');
17
- const SAFE_FILENAME_PATTERN = new RegExp('^(?!\\.{1,2}$)[^/\\\\\\u0000\\u007f]+$', 'u');
18
- /* eslint-enable no-control-regex */
19
- const boundedString = z
20
- .string()
21
- .max(MCP_WIRE_LIMITS.messageCharacters)
22
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
23
- const boundedNonEmptyString = z
24
- .string()
25
- .min(1)
26
- .max(MCP_WIRE_LIMITS.messageCharacters)
27
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
28
- const labelSchema = z
29
- .string()
30
- .max(MCP_WIRE_LIMITS.labelCharacters)
31
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
32
- const nonEmptyLabelSchema = labelSchema.min(1);
33
- const excerptSchema = z
34
- .string()
35
- .max(MCP_WIRE_LIMITS.excerptCharacters)
36
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
37
- const uriTextSchema = z
38
- .string()
39
- .min(1)
40
- .max(MCP_WIRE_LIMITS.uriCharacters)
41
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
42
- const nonNegativeSafeIntegerSchema = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
43
- const idSchema = z.string().min(1).max(MAX_ID_CHARACTERS).regex(IDENTIFIER_PATTERN);
44
- export const formatSchema = z
45
- .string()
46
- .min(1)
47
- .max(MCP_WIRE_LIMITS.formatCharacters)
48
- .regex(FORMAT_PATTERN);
49
- /** Case-insensitive format input which handlers normalize before publishing it on the wire. */
50
- export const formatInputSchema = z
51
- .string()
52
- .min(1)
53
- .max(MCP_WIRE_LIMITS.formatCharacters)
54
- .regex(INPUT_FORMAT_PATTERN);
55
- const mimeTypeSchema = z
56
- .string()
57
- .min(3)
58
- .max(MCP_WIRE_LIMITS.mimeTypeCharacters)
59
- .regex(MIME_TYPE_PATTERN);
60
- const isoTimestampSchema = z
61
- .string()
62
- .regex(ISO_TIMESTAMP_PATTERN)
63
- .refine((value) => {
64
- const timestamp = Date.parse(value);
65
- return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
66
- }, 'Expected a canonical UTC timestamp with millisecond precision');
67
- const engineNameSchema = z
68
- .string()
69
- .min(1)
70
- .max(MAX_ID_CHARACTERS)
71
- .regex(/^(?:[A-Za-z0-9][A-Za-z0-9._:-]*|@[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*)$/u);
72
- const workspacePathSchema = z
73
- .string()
74
- .min(1)
75
- .max(MAX_PATH_CHARACTERS)
76
- .regex(WORKSPACE_PATH_PATTERN, 'Expected a canonical root-relative forward-slash path')
77
- .refine((value) => !value.includes('\\') &&
78
- !value.startsWith('/') &&
79
- !/^[a-zA-Z]:/u.test(value) &&
80
- !value.split('/').some((segment) => !segment || segment === '.' || segment === '..') &&
81
- ![...value].some((character) => {
82
- const codePoint = character.codePointAt(0) ?? 0;
83
- return codePoint <= 0x1f || codePoint === 0x7f;
84
- }), 'Expected a canonical root-relative forward-slash path');
85
- export const artifactUriSchema = z
86
- .string()
87
- .max('docblocks://artifacts/'.length + MAX_ID_CHARACTERS)
88
- .regex(ARTIFACT_URI_PATTERN);
89
- const assetSourceSchema = z.discriminatedUnion('kind', [
90
- z.object({ kind: z.literal('file'), rootId: idSchema, path: workspacePathSchema }).strict(),
91
- z.object({ kind: z.literal('artifact'), uri: artifactUriSchema }).strict(),
1
+ import {
2
+ MCP_WIRE_LIMITS,
3
+ parseArtifactRef,
4
+ parseComparisonResult,
5
+ parseConversionResult,
6
+ parseInspectionResult,
7
+ parsePreviewResult,
8
+ parseValidationResult
9
+ } from "../chunk-HI7QEWL6.js";
10
+ import "../chunk-AYWKIZLD.js";
11
+
12
+ // src/mcp/zod.ts
13
+ import { z } from "zod";
14
+ import { z as z4 } from "zod/v4";
15
+ var MAX_MARKDOWN_CHARACTERS = 20 * 1024 * 1024;
16
+ var MAX_PATH_CHARACTERS = 4096;
17
+ var MAX_ID_CHARACTERS = 256;
18
+ var IDENTIFIER_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/u;
19
+ var FORMAT_PATTERN = /^[a-z0-9][a-z0-9.+_-]*$/u;
20
+ var INPUT_FORMAT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9.+_-]*$/u;
21
+ var MIME_TYPE_PATTERN = /^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/iu;
22
+ var ARTIFACT_URI_PATTERN = /^docblocks:\/\/artifacts\/[A-Za-z0-9][A-Za-z0-9._:-]*$/u;
23
+ var ISO_TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u;
24
+ var WIRE_STRING_PATTERN = new RegExp("^[^\\u0000\\u007f]*$", "u");
25
+ var WORKSPACE_PATH_PATTERN = new RegExp(
26
+ "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)(?:\\.{1,2})(?:/|$))(?!.*//)(?!.*[\\\\\\u0000-\\u001f\\u007f])(?!.*/$).+$",
27
+ "u"
28
+ );
29
+ var SAFE_FILENAME_PATTERN = new RegExp("^(?!\\.{1,2}$)[^/\\\\\\u0000\\u007f]+$", "u");
30
+ var boundedString = z.string().max(MCP_WIRE_LIMITS.messageCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
31
+ var boundedNonEmptyString = z.string().min(1).max(MCP_WIRE_LIMITS.messageCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
32
+ var labelSchema = z.string().max(MCP_WIRE_LIMITS.labelCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
33
+ var nonEmptyLabelSchema = labelSchema.min(1);
34
+ var excerptSchema = z.string().max(MCP_WIRE_LIMITS.excerptCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
35
+ var uriTextSchema = z.string().min(1).max(MCP_WIRE_LIMITS.uriCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
36
+ var nonNegativeSafeIntegerSchema = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
37
+ var idSchema = z.string().min(1).max(MAX_ID_CHARACTERS).regex(IDENTIFIER_PATTERN);
38
+ var formatSchema = z.string().min(1).max(MCP_WIRE_LIMITS.formatCharacters).regex(FORMAT_PATTERN);
39
+ var formatInputSchema = z.string().min(1).max(MCP_WIRE_LIMITS.formatCharacters).regex(INPUT_FORMAT_PATTERN);
40
+ var mimeTypeSchema = z.string().min(3).max(MCP_WIRE_LIMITS.mimeTypeCharacters).regex(MIME_TYPE_PATTERN);
41
+ var isoTimestampSchema = z.string().regex(ISO_TIMESTAMP_PATTERN).refine((value) => {
42
+ const timestamp = Date.parse(value);
43
+ return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
44
+ }, "Expected a canonical UTC timestamp with millisecond precision");
45
+ var engineNameSchema = z.string().min(1).max(MAX_ID_CHARACTERS).regex(
46
+ /^(?:[A-Za-z0-9][A-Za-z0-9._:-]*|@[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*)$/u
47
+ );
48
+ var workspacePathSchema = z.string().min(1).max(MAX_PATH_CHARACTERS).regex(WORKSPACE_PATH_PATTERN, "Expected a canonical root-relative forward-slash path").refine(
49
+ (value) => !value.includes("\\") && !value.startsWith("/") && !/^[a-zA-Z]:/u.test(value) && !value.split("/").some((segment) => !segment || segment === "." || segment === "..") && ![...value].some((character) => {
50
+ const codePoint = character.codePointAt(0) ?? 0;
51
+ return codePoint <= 31 || codePoint === 127;
52
+ }),
53
+ "Expected a canonical root-relative forward-slash path"
54
+ );
55
+ var artifactUriSchema = z.string().max("docblocks://artifacts/".length + MAX_ID_CHARACTERS).regex(ARTIFACT_URI_PATTERN);
56
+ var assetSourceSchema = z.discriminatedUnion("kind", [
57
+ z.object({ kind: z.literal("file"), rootId: idSchema, path: workspacePathSchema }).strict(),
58
+ z.object({ kind: z.literal("artifact"), uri: artifactUriSchema }).strict()
92
59
  ]);
93
- export const bundleAssetSchema = z
94
- .object({
60
+ var bundleAssetSchema = z.object({
61
+ path: workspacePathSchema,
62
+ source: assetSourceSchema,
63
+ mimeType: mimeTypeSchema.nullable(),
64
+ altText: labelSchema.nullable(),
65
+ credit: labelSchema.nullable(),
66
+ license: labelSchema.nullable()
67
+ }).strict();
68
+ var bundleDocumentSourceSchema = z.object({
69
+ kind: z.literal("bundle"),
70
+ markdown: z.string().max(MAX_MARKDOWN_CHARACTERS).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire"),
71
+ assets: z.array(bundleAssetSchema).max(MCP_WIRE_LIMITS.bundleAssets),
72
+ name: labelSchema.nullable().optional().default(null)
73
+ }).strict();
74
+ var documentSourceSchema = z.discriminatedUnion("kind", [
75
+ z.object({
76
+ kind: z.literal("markdown"),
77
+ markdown: z.string().max(MAX_MARKDOWN_CHARACTERS).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire"),
78
+ name: labelSchema.nullable().optional().default(null)
79
+ }).strict(),
80
+ z.object({
81
+ kind: z.literal("file"),
82
+ rootId: idSchema,
95
83
  path: workspacePathSchema,
96
- source: assetSourceSchema,
97
- mimeType: mimeTypeSchema.nullable(),
98
- altText: labelSchema.nullable(),
99
- credit: labelSchema.nullable(),
100
- license: labelSchema.nullable(),
101
- })
102
- .strict();
103
- export const bundleDocumentSourceSchema = z
104
- .object({
105
- kind: z.literal('bundle'),
106
- markdown: z
107
- .string()
108
- .max(MAX_MARKDOWN_CHARACTERS)
109
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire'),
110
- assets: z.array(bundleAssetSchema).max(MCP_WIRE_LIMITS.bundleAssets),
111
- name: labelSchema.nullable(),
112
- })
113
- .strict();
114
- export const documentSourceSchema = z.discriminatedUnion('kind', [
115
- z
116
- .object({
117
- kind: z.literal('markdown'),
118
- markdown: z
119
- .string()
120
- .max(MAX_MARKDOWN_CHARACTERS)
121
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire'),
122
- name: labelSchema.nullable(),
123
- })
124
- .strict(),
125
- z
126
- .object({
127
- kind: z.literal('file'),
128
- rootId: idSchema,
129
- path: workspacePathSchema,
130
- format: formatSchema.nullable(),
131
- })
132
- .strict(),
133
- z.object({ kind: z.literal('artifact'), uri: artifactUriSchema }).strict(),
134
- bundleDocumentSourceSchema,
84
+ format: formatSchema.nullable().optional().default(null)
85
+ }).strict(),
86
+ z.object({ kind: z.literal("artifact"), uri: artifactUriSchema }).strict(),
87
+ bundleDocumentSourceSchema
135
88
  ]);
136
- const appliedOptionSchema = z
137
- .object({
138
- name: idSchema,
139
- value: z.union([boundedString, z.number().finite(), z.boolean(), z.null()]),
140
- })
141
- .strict();
142
- const engineVersionSchema = z
143
- .object({ name: engineNameSchema, version: boundedNonEmptyString })
144
- .strict();
145
- export const artifactRefSchema = z
146
- .object({
147
- id: idSchema,
148
- uri: artifactUriSchema,
149
- format: formatSchema,
150
- mimeType: mimeTypeSchema,
151
- size: z.number().int().nonnegative().max(MCP_WIRE_LIMITS.artifactBytes),
152
- sha256: z.string().regex(/^[a-f0-9]{64}$/u),
153
- sourceFormat: formatSchema.nullable(),
154
- sourceSha256: z
155
- .string()
156
- .regex(/^[a-f0-9]{64}$/u)
157
- .nullable(),
158
- suggestedFilename: z
159
- .string()
160
- .min(1)
161
- .max(MCP_WIRE_LIMITS.labelCharacters)
162
- .regex(SAFE_FILENAME_PATTERN),
163
- appliedOptions: z.array(appliedOptionSchema).max(MCP_WIRE_LIMITS.arrayEntries),
164
- engineVersions: z.array(engineVersionSchema).max(MCP_WIRE_LIMITS.arrayEntries),
165
- createdAt: isoTimestampSchema,
166
- expiresAt: isoTimestampSchema.nullable(),
167
- })
168
- .strict()
169
- .superRefine((value, context) => addExactWireIssue(parseArtifactRef(value), context));
170
- const diagnosticLocationSchema = z.discriminatedUnion('kind', [
171
- z
172
- .object({
173
- kind: z.literal('source'),
174
- line: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
175
- column: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
176
- })
177
- .strict(),
178
- z.object({ kind: z.literal('block'), blockId: idSchema, nodeType: idSchema }).strict(),
179
- z.object({ kind: z.literal('asset'), path: workspacePathSchema }).strict(),
180
- z
181
- .object({
182
- kind: z.literal('item'),
183
- itemKind: z.enum(['page', 'slide', 'sheet', 'frame']),
184
- index: nonNegativeSafeIntegerSchema,
185
- })
186
- .strict(),
89
+ var appliedOptionSchema = z.object({
90
+ name: idSchema,
91
+ value: z.union([boundedString, z.number().finite(), z.boolean(), z.null()])
92
+ }).strict();
93
+ var engineVersionSchema = z.object({ name: engineNameSchema, version: boundedNonEmptyString }).strict();
94
+ var artifactRefSchema = z.object({
95
+ id: idSchema,
96
+ uri: artifactUriSchema,
97
+ format: formatSchema,
98
+ mimeType: mimeTypeSchema,
99
+ size: z.number().int().nonnegative().max(MCP_WIRE_LIMITS.artifactBytes),
100
+ sha256: z.string().regex(/^[a-f0-9]{64}$/u),
101
+ sourceFormat: formatSchema.nullable(),
102
+ sourceSha256: z.string().regex(/^[a-f0-9]{64}$/u).nullable(),
103
+ suggestedFilename: z.string().min(1).max(MCP_WIRE_LIMITS.labelCharacters).regex(SAFE_FILENAME_PATTERN),
104
+ appliedOptions: z.array(appliedOptionSchema).max(MCP_WIRE_LIMITS.arrayEntries),
105
+ engineVersions: z.array(engineVersionSchema).max(MCP_WIRE_LIMITS.arrayEntries),
106
+ createdAt: isoTimestampSchema,
107
+ expiresAt: isoTimestampSchema.nullable()
108
+ }).strict().superRefine((value, context) => addExactWireIssue(parseArtifactRef(value), context));
109
+ var diagnosticLocationSchema = z.discriminatedUnion("kind", [
110
+ z.object({
111
+ kind: z.literal("source"),
112
+ line: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
113
+ column: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER)
114
+ }).strict(),
115
+ z.object({ kind: z.literal("block"), blockId: idSchema, nodeType: idSchema }).strict(),
116
+ z.object({ kind: z.literal("asset"), path: workspacePathSchema }).strict(),
117
+ z.object({
118
+ kind: z.literal("item"),
119
+ itemKind: z.enum(["page", "slide", "sheet", "frame"]),
120
+ index: nonNegativeSafeIntegerSchema
121
+ }).strict()
187
122
  ]);
188
- export const diagnosticSchema = z
189
- .object({
190
- code: idSchema,
191
- severity: z.enum(['info', 'warning', 'error']),
192
- stage: z.enum([
193
- 'resolve',
194
- 'import',
195
- 'parse',
196
- 'inspect',
197
- 'validate',
198
- 'transform',
199
- 'convert',
200
- 'render',
201
- 'export',
202
- 'materialize',
203
- 'compare',
204
- ]),
205
- format: formatSchema.nullable(),
206
- count: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
207
- message: boundedString,
208
- remediation: boundedString.nullable(),
209
- retryable: z.boolean(),
210
- location: diagnosticLocationSchema.nullable(),
211
- })
212
- .strict();
213
- export const mcpErrorDetailSchema = z
214
- .object({
215
- code: idSchema,
216
- message: boundedNonEmptyString,
217
- stage: z
218
- .enum([
219
- 'resolve',
220
- 'import',
221
- 'parse',
222
- 'inspect',
223
- 'validate',
224
- 'transform',
225
- 'convert',
226
- 'render',
227
- 'export',
228
- 'materialize',
229
- 'compare',
230
- ])
231
- .nullable(),
232
- format: formatSchema.nullable(),
233
- hint: boundedString.nullable(),
234
- retryable: z.boolean(),
235
- operationLoad: z
236
- .object({
237
- active: z.number().int().nonnegative().max(32),
238
- capacity: z.number().int().positive().max(32),
239
- })
240
- .strict()
241
- .nullable(),
242
- })
243
- .strict()
244
- .superRefine((value, context) => {
245
- if (value.operationLoad && value.operationLoad.active > value.operationLoad.capacity) {
246
- context.addIssue({
247
- code: z.ZodIssueCode.custom,
248
- path: ['operationLoad', 'active'],
249
- message: 'Active operation count cannot exceed capacity',
250
- });
251
- }
123
+ var diagnosticSchema = z.object({
124
+ code: idSchema,
125
+ severity: z.enum(["info", "warning", "error"]),
126
+ stage: z.enum([
127
+ "resolve",
128
+ "import",
129
+ "parse",
130
+ "inspect",
131
+ "validate",
132
+ "transform",
133
+ "convert",
134
+ "render",
135
+ "export",
136
+ "materialize",
137
+ "compare"
138
+ ]),
139
+ format: formatSchema.nullable(),
140
+ count: z.number().int().min(1).max(Number.MAX_SAFE_INTEGER),
141
+ message: boundedString,
142
+ remediation: boundedString.nullable(),
143
+ retryable: z.boolean(),
144
+ location: diagnosticLocationSchema.nullable()
145
+ }).strict();
146
+ var mcpErrorDetailSchema = z.object({
147
+ code: idSchema,
148
+ message: boundedNonEmptyString,
149
+ stage: z.enum([
150
+ "resolve",
151
+ "import",
152
+ "parse",
153
+ "inspect",
154
+ "validate",
155
+ "transform",
156
+ "convert",
157
+ "render",
158
+ "export",
159
+ "materialize",
160
+ "compare"
161
+ ]).nullable(),
162
+ format: formatSchema.nullable(),
163
+ hint: boundedString.nullable(),
164
+ retryable: z.boolean(),
165
+ operationLoad: z.object({
166
+ active: z.number().int().nonnegative().max(32),
167
+ capacity: z.number().int().positive().max(32)
168
+ }).strict().nullable()
169
+ }).strict().superRefine((value, context) => {
170
+ if (value.operationLoad && value.operationLoad.active > value.operationLoad.capacity) {
171
+ context.addIssue({
172
+ code: z.ZodIssueCode.custom,
173
+ path: ["operationLoad", "active"],
174
+ message: "Active operation count cannot exceed capacity"
175
+ });
176
+ }
252
177
  });
253
- export const mcpErrorResultSchema = z
254
- .object({
178
+ var mcpErrorResultSchema = z.object({
179
+ version: z.literal(1),
180
+ kind: z.literal("error"),
181
+ result: z.null(),
182
+ error: mcpErrorDetailSchema
183
+ }).strict();
184
+ function toolOutputSchema(success) {
185
+ const successEnvelope = z.object({
255
186
  version: z.literal(1),
256
- kind: z.literal('error'),
187
+ kind: z.literal("success"),
188
+ result: success,
189
+ error: z.null()
190
+ }).strict();
191
+ const errorEnvelope = z.object({
192
+ version: z.literal(1),
193
+ kind: z.literal("error"),
257
194
  result: z.null(),
258
- error: mcpErrorDetailSchema,
259
- })
260
- .strict();
261
- /**
262
- * Root-object output schema compatible with MCP SDK 1.29's object normalizer.
263
- *
264
- * The SDK must see an object at the root, while clients must see the two exact
265
- * wire branches rather than independently-nullable fields. A Zod 4 object lets
266
- * us publish the branch schemas through standard JSON Schema `oneOf` metadata;
267
- * runtime validation still delegates to the original Zod 3 schemas so custom
268
- * exact-wire refinements remain authoritative.
269
- */
270
- export function toolOutputSchema(success) {
271
- const successEnvelope = z
272
- .object({
273
- version: z.literal(1),
274
- kind: z.literal('success'),
275
- result: success,
276
- error: z.null(),
277
- })
278
- .strict();
279
- const errorEnvelope = z
280
- .object({
281
- version: z.literal(1),
282
- kind: z.literal('error'),
283
- result: z.null(),
284
- error: mcpErrorDetailSchema,
285
- })
286
- .strict();
287
- const publishedSuccess = z4
288
- .object({
289
- version: z4.literal(1),
290
- kind: z4.literal('success'),
291
- result: projectZod3Schema(success),
292
- error: z4.null(),
293
- })
294
- .strict();
295
- const publishedError = z4
296
- .object({
297
- version: z4.literal(1),
298
- kind: z4.literal('error'),
299
- result: z4.null(),
300
- error: projectZod3Schema(mcpErrorDetailSchema),
301
- })
302
- .strict();
303
- const oneOf = [
304
- jsonSchemaWithoutDialect(publishedSuccess),
305
- jsonSchemaWithoutDialect(publishedError),
306
- ];
307
- return z4
308
- .object({
309
- version: z4.literal(1),
310
- kind: z4.enum(['success', 'error']),
311
- result: z4.unknown(),
312
- error: z4.unknown(),
313
- })
314
- .strict()
315
- .superRefine((value, context) => {
316
- const branch = value.kind === 'success' ? successEnvelope : errorEnvelope;
317
- const parsed = branch.safeParse(value);
318
- if (parsed.success)
319
- return;
320
- for (const issue of parsed.error.issues) {
321
- context.addIssue({
322
- code: 'custom',
323
- path: issue.path,
324
- message: issue.message,
325
- });
326
- }
327
- })
328
- .meta({ oneOf });
195
+ error: mcpErrorDetailSchema
196
+ }).strict();
197
+ const publishedSuccess = z4.object({
198
+ version: z4.literal(1),
199
+ kind: z4.literal("success"),
200
+ result: projectZod3Schema(success),
201
+ error: z4.null()
202
+ }).strict();
203
+ const publishedError = z4.object({
204
+ version: z4.literal(1),
205
+ kind: z4.literal("error"),
206
+ result: z4.null(),
207
+ error: projectZod3Schema(mcpErrorDetailSchema)
208
+ }).strict();
209
+ const oneOf = [
210
+ jsonSchemaWithoutDialect(publishedSuccess),
211
+ jsonSchemaWithoutDialect(publishedError)
212
+ ];
213
+ return z4.object({
214
+ version: z4.literal(1),
215
+ kind: z4.enum(["success", "error"]),
216
+ result: z4.unknown(),
217
+ error: z4.unknown()
218
+ }).strict().superRefine((value, context) => {
219
+ const branch = value.kind === "success" ? successEnvelope : errorEnvelope;
220
+ const parsed = branch.safeParse(value);
221
+ if (parsed.success) return;
222
+ for (const issue of parsed.error.issues) {
223
+ context.addIssue({
224
+ code: "custom",
225
+ path: issue.path,
226
+ message: issue.message
227
+ });
228
+ }
229
+ }).meta({ oneOf });
329
230
  }
330
- const assetSummarySchema = z
331
- .object({
332
- path: workspacePathSchema,
333
- mimeType: mimeTypeSchema,
334
- size: z.number().int().nonnegative().max(MCP_WIRE_LIMITS.artifactBytes),
335
- sha256: z
336
- .string()
337
- .regex(/^[a-f0-9]{64}$/u)
338
- .nullable(),
339
- altText: labelSchema.nullable(),
340
- credit: labelSchema.nullable(),
341
- license: labelSchema.nullable(),
342
- })
343
- .strict();
344
- export const conversionResultSchema = z
345
- .object({
346
- version: z.literal(1),
347
- kind: z.literal('conversion'),
348
- sourceFormat: formatSchema,
349
- targetFormat: formatSchema,
350
- artifact: artifactRefSchema,
351
- fidelity: z.enum(['semantic', 'editable-native', 'rendered-fidelity', 'hybrid']),
352
- appliedThemeId: idSchema.nullable(),
353
- appliedTransformId: idSchema.nullable(),
354
- sourceAssets: z.array(assetSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
355
- sourceAssetCount: z.number().int().min(0).max(MCP_WIRE_LIMITS.arrayEntries),
356
- diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries),
357
- })
358
- .strict()
359
- .superRefine((value, context) => addExactWireIssue(parseConversionResult(value), context));
360
- const metadataSchema = z
361
- .object({
362
- title: labelSchema.nullable(),
363
- author: labelSchema.nullable(),
364
- description: boundedString.nullable(),
365
- })
366
- .strict();
367
- const statisticsSchema = z
368
- .object({
369
- blockCount: nonNegativeSafeIntegerSchema,
370
- wordCount: nonNegativeSafeIntegerSchema,
371
- characterCount: nonNegativeSafeIntegerSchema,
372
- tableCount: nonNegativeSafeIntegerSchema,
373
- linkCount: nonNegativeSafeIntegerSchema,
374
- assetCount: nonNegativeSafeIntegerSchema,
375
- pageCount: nonNegativeSafeIntegerSchema.nullable(),
376
- slideCount: nonNegativeSafeIntegerSchema.nullable(),
377
- sheetCount: nonNegativeSafeIntegerSchema.nullable(),
378
- })
379
- .strict();
380
- const outlineEntrySchema = z
381
- .object({
382
- id: idSchema,
383
- title: nonEmptyLabelSchema,
384
- level: z.number().int().min(1).max(6),
385
- blockIndex: nonNegativeSafeIntegerSchema,
386
- })
387
- .strict();
388
- const blockSummarySchema = z
389
- .object({
390
- id: idSchema,
391
- type: idSchema,
392
- text: excerptSchema,
393
- wordCount: nonNegativeSafeIntegerSchema,
394
- templateId: idSchema.nullable(),
395
- sourceRange: z
396
- .object({ start: nonNegativeSafeIntegerSchema, end: nonNegativeSafeIntegerSchema })
397
- .strict()
398
- .nullable(),
399
- })
400
- .strict();
401
- const tableSummarySchema = z
402
- .object({
403
- index: nonNegativeSafeIntegerSchema,
404
- rowCount: nonNegativeSafeIntegerSchema,
405
- columnCount: nonNegativeSafeIntegerSchema,
406
- headers: z.array(labelSchema).max(MCP_WIRE_LIMITS.arrayEntries),
407
- })
408
- .strict();
409
- const linkSummarySchema = z
410
- .object({
411
- index: nonNegativeSafeIntegerSchema,
412
- text: labelSchema,
413
- target: uriTextSchema,
414
- })
415
- .strict();
416
- const documentItemSummarySchema = z
417
- .object({
418
- kind: z.enum(['page', 'slide', 'sheet', 'frame']),
419
- index: nonNegativeSafeIntegerSchema,
420
- label: labelSchema.nullable(),
421
- blockIds: z.array(idSchema).max(MCP_WIRE_LIMITS.arrayEntries),
422
- })
423
- .strict();
424
- const themeSummarySchema = z
425
- .object({
426
- id: idSchema,
427
- name: nonEmptyLabelSchema,
428
- source: z.enum(['built-in', 'document', 'inferred']),
429
- layouts: z.array(nonEmptyLabelSchema).max(MCP_WIRE_LIMITS.arrayEntries),
430
- })
431
- .strict();
432
- export const inspectionResultSchema = z
433
- .object({
434
- version: z.literal(1),
435
- kind: z.literal('inspection'),
436
- sourceFormat: formatSchema,
437
- metadata: metadataSchema,
438
- statistics: statisticsSchema,
439
- outline: z.array(outlineEntrySchema).max(MCP_WIRE_LIMITS.arrayEntries),
440
- blocks: z.array(blockSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
441
- blockOffset: z.number().int().min(0).max(MCP_WIRE_LIMITS.arrayEntries),
442
- nextCursor: z
443
- .string()
444
- .max(MCP_WIRE_LIMITS.identifierCharacters)
445
- .regex(WIRE_STRING_PATTERN)
446
- .nullable(),
447
- tables: z.array(tableSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
448
- links: z.array(linkSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
449
- items: z.array(documentItemSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
450
- assets: z.array(assetSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
451
- theme: themeSummarySchema.nullable(),
452
- truncated: z.boolean(),
453
- detailsTruncated: z.boolean(),
454
- diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries),
455
- })
456
- .strict()
457
- .superRefine((value, context) => addExactWireIssue(parseInspectionResult(value), context));
458
- export const validationResultSchema = z
459
- .object({
460
- version: z.literal(1),
461
- kind: z.literal('validation'),
462
- sourceFormat: formatSchema,
463
- targetFormat: formatSchema.nullable(),
464
- valid: z.boolean(),
465
- summary: z
466
- .object({
467
- errorCount: nonNegativeSafeIntegerSchema,
468
- warningCount: nonNegativeSafeIntegerSchema,
469
- infoCount: nonNegativeSafeIntegerSchema,
470
- })
471
- .strict(),
472
- diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries),
473
- })
474
- .strict()
475
- .superRefine((value, context) => addExactWireIssue(parseValidationResult(value), context));
476
- const previewItemSchema = z
477
- .object({
478
- kind: z.enum(['page', 'slide', 'sheet', 'frame']),
479
- index: nonNegativeSafeIntegerSchema,
480
- label: labelSchema.nullable(),
481
- artifact: artifactRefSchema,
482
- width: z.number().int().min(1).max(MCP_WIRE_LIMITS.imageDimension),
483
- height: z.number().int().min(1).max(MCP_WIRE_LIMITS.imageDimension),
484
- })
485
- .strict();
486
- export const previewResultSchema = z
487
- .object({
488
- version: z.literal(1),
489
- kind: z.literal('preview'),
490
- sourceFormat: formatSchema,
491
- previewBasis: z.enum(['source-render', 'reconstructed-import', 'native-extracted']),
492
- totalItems: nonNegativeSafeIntegerSchema,
493
- items: z.array(previewItemSchema).max(MCP_WIRE_LIMITS.previewItems),
494
- truncated: z.boolean(),
495
- diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries),
496
- })
497
- .strict()
498
- .superRefine((value, context) => addExactWireIssue(parsePreviewResult(value), context));
499
- const comparisonChangeSchema = z
500
- .object({
501
- category: z.enum([
502
- 'text',
503
- 'structure',
504
- 'table',
505
- 'media',
506
- 'theme',
507
- 'layout',
508
- 'metadata',
509
- 'timing',
510
- 'accessibility',
511
- ]),
512
- status: z.enum(['retained', 'changed', 'degraded', 'omitted', 'added']),
513
- path: z.string().max(MCP_WIRE_LIMITS.pathCharacters).regex(WIRE_STRING_PATTERN).nullable(),
514
- message: boundedNonEmptyString,
515
- })
516
- .strict();
517
- const comparisonMetricSchema = z
518
- .object({
519
- name: idSchema,
520
- leftValue: z.number().finite(),
521
- rightValue: z.number().finite(),
522
- similarity: z.number().min(0).max(1),
523
- })
524
- .strict();
525
- export const comparisonResultSchema = z
526
- .object({
527
- version: z.literal(1),
528
- kind: z.literal('comparison'),
529
- leftFormat: formatSchema,
530
- rightFormat: formatSchema,
531
- equivalent: z.boolean(),
532
- score: z.number().min(0).max(1),
533
- changes: z.array(comparisonChangeSchema).max(MCP_WIRE_LIMITS.arrayEntries),
534
- metrics: z.array(comparisonMetricSchema).max(MCP_WIRE_LIMITS.arrayEntries),
535
- diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries),
536
- })
537
- .strict()
538
- .superRefine((value, context) => addExactWireIssue(parseComparisonResult(value), context));
539
- const boundedPathTextSchema = z
540
- .string()
541
- .min(1)
542
- .max(MCP_WIRE_LIMITS.pathCharacters)
543
- .regex(WIRE_STRING_PATTERN, 'NUL and DEL are not permitted on the MCP wire');
544
- const sha256Schema = z.string().regex(/^[a-f0-9]{64}$/u);
545
- export const convertDocumentResultSchema = z
546
- .object({ results: z.array(conversionResultSchema).min(1).max(12) })
547
- .strict();
548
- export const rootGrantSummarySchema = z
549
- .object({
550
- id: idSchema,
551
- label: nonEmptyLabelSchema,
552
- read: z.boolean(),
553
- write: z.boolean(),
554
- })
555
- .strict();
556
- export const listRootsResultSchema = z
557
- .object({ roots: z.array(rootGrantSummarySchema).max(64) })
558
- .strict();
559
- export const saveArtifactResultSchema = z
560
- .object({
561
- artifact: artifactRefSchema,
562
- destination: z.object({ rootId: idSchema, path: workspacePathSchema }).strict(),
563
- sha256: sha256Schema,
564
- })
565
- .strict();
566
- export const formatDirectionCapabilitySchema = z.discriminatedUnion('supported', [
567
- z
568
- .object({
569
- supported: z.literal(true),
570
- tool: z.enum(['inspect_document', 'convert_document']),
571
- })
572
- .strict(),
573
- z.object({ supported: z.literal(false), excludedReason: boundedString }).strict(),
231
+ var assetSummarySchema = z.object({
232
+ path: workspacePathSchema,
233
+ mimeType: mimeTypeSchema,
234
+ size: z.number().int().nonnegative().max(MCP_WIRE_LIMITS.artifactBytes),
235
+ sha256: z.string().regex(/^[a-f0-9]{64}$/u).nullable(),
236
+ altText: labelSchema.nullable(),
237
+ credit: labelSchema.nullable(),
238
+ license: labelSchema.nullable()
239
+ }).strict();
240
+ var conversionResultSchema = z.object({
241
+ version: z.literal(1),
242
+ kind: z.literal("conversion"),
243
+ sourceFormat: formatSchema,
244
+ targetFormat: formatSchema,
245
+ artifact: artifactRefSchema,
246
+ fidelity: z.enum(["semantic", "editable-native", "rendered-fidelity", "hybrid"]),
247
+ appliedThemeId: idSchema.nullable(),
248
+ appliedTransformId: idSchema.nullable(),
249
+ sourceAssets: z.array(assetSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
250
+ sourceAssetCount: z.number().int().min(0).max(MCP_WIRE_LIMITS.arrayEntries),
251
+ diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
252
+ }).strict().superRefine((value, context) => addExactWireIssue(parseConversionResult(value), context));
253
+ var metadataSchema = z.object({
254
+ title: labelSchema.nullable(),
255
+ author: labelSchema.nullable(),
256
+ description: boundedString.nullable()
257
+ }).strict();
258
+ var statisticsSchema = z.object({
259
+ blockCount: nonNegativeSafeIntegerSchema,
260
+ wordCount: nonNegativeSafeIntegerSchema,
261
+ characterCount: nonNegativeSafeIntegerSchema,
262
+ tableCount: nonNegativeSafeIntegerSchema,
263
+ linkCount: nonNegativeSafeIntegerSchema,
264
+ assetCount: nonNegativeSafeIntegerSchema,
265
+ pageCount: nonNegativeSafeIntegerSchema.nullable(),
266
+ slideCount: nonNegativeSafeIntegerSchema.nullable(),
267
+ sheetCount: nonNegativeSafeIntegerSchema.nullable()
268
+ }).strict();
269
+ var outlineEntrySchema = z.object({
270
+ id: idSchema,
271
+ title: nonEmptyLabelSchema,
272
+ level: z.number().int().min(1).max(6),
273
+ blockIndex: nonNegativeSafeIntegerSchema
274
+ }).strict();
275
+ var blockSummarySchema = z.object({
276
+ id: idSchema,
277
+ type: idSchema,
278
+ text: excerptSchema,
279
+ wordCount: nonNegativeSafeIntegerSchema,
280
+ templateId: idSchema.nullable(),
281
+ sourceRange: z.object({ start: nonNegativeSafeIntegerSchema, end: nonNegativeSafeIntegerSchema }).strict().nullable()
282
+ }).strict();
283
+ var tableSummarySchema = z.object({
284
+ index: nonNegativeSafeIntegerSchema,
285
+ rowCount: nonNegativeSafeIntegerSchema,
286
+ columnCount: nonNegativeSafeIntegerSchema,
287
+ headers: z.array(labelSchema).max(MCP_WIRE_LIMITS.arrayEntries)
288
+ }).strict();
289
+ var linkSummarySchema = z.object({
290
+ index: nonNegativeSafeIntegerSchema,
291
+ text: labelSchema,
292
+ target: uriTextSchema
293
+ }).strict();
294
+ var documentItemSummarySchema = z.object({
295
+ kind: z.enum(["page", "slide", "sheet", "frame"]),
296
+ index: nonNegativeSafeIntegerSchema,
297
+ label: labelSchema.nullable(),
298
+ blockIds: z.array(idSchema).max(MCP_WIRE_LIMITS.arrayEntries)
299
+ }).strict();
300
+ var themeSummarySchema = z.object({
301
+ id: idSchema,
302
+ name: nonEmptyLabelSchema,
303
+ source: z.enum(["built-in", "document", "inferred"]),
304
+ layouts: z.array(nonEmptyLabelSchema).max(MCP_WIRE_LIMITS.arrayEntries)
305
+ }).strict();
306
+ var inspectionResultSchema = z.object({
307
+ version: z.literal(1),
308
+ kind: z.literal("inspection"),
309
+ sourceFormat: formatSchema,
310
+ metadata: metadataSchema,
311
+ statistics: statisticsSchema,
312
+ outline: z.array(outlineEntrySchema).max(MCP_WIRE_LIMITS.arrayEntries),
313
+ blocks: z.array(blockSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
314
+ blockOffset: z.number().int().min(0).max(MCP_WIRE_LIMITS.arrayEntries),
315
+ nextCursor: z.string().max(MCP_WIRE_LIMITS.identifierCharacters).regex(WIRE_STRING_PATTERN).nullable(),
316
+ tables: z.array(tableSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
317
+ links: z.array(linkSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
318
+ items: z.array(documentItemSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
319
+ assets: z.array(assetSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
320
+ theme: themeSummarySchema.nullable(),
321
+ truncated: z.boolean(),
322
+ detailsTruncated: z.boolean(),
323
+ diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
324
+ }).strict().superRefine((value, context) => addExactWireIssue(parseInspectionResult(value), context));
325
+ var validationResultSchema = z.object({
326
+ version: z.literal(1),
327
+ kind: z.literal("validation"),
328
+ sourceFormat: formatSchema,
329
+ targetFormat: formatSchema.nullable(),
330
+ valid: z.boolean(),
331
+ summary: z.object({
332
+ errorCount: nonNegativeSafeIntegerSchema,
333
+ warningCount: nonNegativeSafeIntegerSchema,
334
+ infoCount: nonNegativeSafeIntegerSchema
335
+ }).strict(),
336
+ diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
337
+ }).strict().superRefine((value, context) => addExactWireIssue(parseValidationResult(value), context));
338
+ var previewItemSchema = z.object({
339
+ kind: z.enum(["page", "slide", "sheet", "frame"]),
340
+ index: nonNegativeSafeIntegerSchema,
341
+ label: labelSchema.nullable(),
342
+ artifact: artifactRefSchema,
343
+ width: z.number().int().min(1).max(MCP_WIRE_LIMITS.imageDimension),
344
+ height: z.number().int().min(1).max(MCP_WIRE_LIMITS.imageDimension)
345
+ }).strict();
346
+ var previewResultSchema = z.object({
347
+ version: z.literal(1),
348
+ kind: z.literal("preview"),
349
+ sourceFormat: formatSchema,
350
+ previewBasis: z.enum(["source-render", "reconstructed-import", "native-extracted"]),
351
+ totalItems: nonNegativeSafeIntegerSchema,
352
+ items: z.array(previewItemSchema).max(MCP_WIRE_LIMITS.previewItems),
353
+ truncated: z.boolean(),
354
+ diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
355
+ }).strict().superRefine((value, context) => addExactWireIssue(parsePreviewResult(value), context));
356
+ var comparisonChangeSchema = z.object({
357
+ category: z.enum([
358
+ "text",
359
+ "structure",
360
+ "table",
361
+ "media",
362
+ "theme",
363
+ "layout",
364
+ "metadata",
365
+ "timing",
366
+ "accessibility"
367
+ ]),
368
+ status: z.enum(["retained", "changed", "degraded", "omitted", "added"]),
369
+ path: z.string().max(MCP_WIRE_LIMITS.pathCharacters).regex(WIRE_STRING_PATTERN).nullable(),
370
+ message: boundedNonEmptyString
371
+ }).strict();
372
+ var comparisonMetricSchema = z.object({
373
+ name: idSchema,
374
+ leftValue: z.number().finite(),
375
+ rightValue: z.number().finite(),
376
+ similarity: z.number().min(0).max(1)
377
+ }).strict();
378
+ var comparisonResultSchema = z.object({
379
+ version: z.literal(1),
380
+ kind: z.literal("comparison"),
381
+ leftFormat: formatSchema,
382
+ rightFormat: formatSchema,
383
+ equivalent: z.boolean(),
384
+ score: z.number().min(0).max(1),
385
+ changes: z.array(comparisonChangeSchema).max(MCP_WIRE_LIMITS.arrayEntries),
386
+ metrics: z.array(comparisonMetricSchema).max(MCP_WIRE_LIMITS.arrayEntries),
387
+ diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
388
+ }).strict().superRefine((value, context) => addExactWireIssue(parseComparisonResult(value), context));
389
+ var boundedPathTextSchema = z.string().min(1).max(MCP_WIRE_LIMITS.pathCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
390
+ var sha256Schema = z.string().regex(/^[a-f0-9]{64}$/u);
391
+ var convertDocumentResultSchema = z.object({ results: z.array(conversionResultSchema).min(1).max(12) }).strict();
392
+ var rootGrantSummarySchema = z.object({
393
+ id: idSchema,
394
+ label: nonEmptyLabelSchema,
395
+ read: z.boolean(),
396
+ write: z.boolean()
397
+ }).strict();
398
+ var listRootsResultSchema = z.object({ roots: z.array(rootGrantSummarySchema).max(64) }).strict();
399
+ var saveArtifactResultSchema = z.object({
400
+ artifact: artifactRefSchema,
401
+ destination: z.object({ rootId: idSchema, path: workspacePathSchema }).strict(),
402
+ sha256: sha256Schema
403
+ }).strict();
404
+ var formatDirectionCapabilitySchema = z.discriminatedUnion("supported", [
405
+ z.object({
406
+ supported: z.literal(true),
407
+ tool: z.enum(["inspect_document", "convert_document"])
408
+ }).strict(),
409
+ z.object({ supported: z.literal(false), excludedReason: boundedString }).strict()
574
410
  ]);
575
- export const formatCapabilitySummarySchema = z
576
- .object({
577
- id: formatSchema,
578
- label: nonEmptyLabelSchema,
579
- mimeType: mimeTypeSchema,
580
- extensions: z.array(nonEmptyLabelSchema).max(64),
581
- import: formatDirectionCapabilitySchema,
582
- export: formatDirectionCapabilitySchema,
583
- })
584
- .strict();
585
- export const listFormatsResultSchema = z
586
- .object({ formats: z.array(formatCapabilitySummarySchema).max(64) })
587
- .strict();
588
- export const themeCatalogEntrySchema = z
589
- .object({
590
- id: idSchema,
591
- name: nonEmptyLabelSchema,
592
- description: boundedString.optional(),
593
- })
594
- .strict();
595
- export const listThemesResultSchema = z
596
- .object({ themes: z.array(themeCatalogEntrySchema).max(MCP_WIRE_LIMITS.arrayEntries) })
597
- .strict();
598
- export const transformStyleSummarySchema = z
599
- .object({ id: idSchema, name: nonEmptyLabelSchema, description: boundedString })
600
- .strict();
601
- export const listTransformStylesResultSchema = z
602
- .object({
603
- styles: z.array(transformStyleSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
604
- })
605
- .strict();
606
- export const templateSummarySchema = z
607
- .object({ id: idSchema, label: nonEmptyLabelSchema, description: boundedString })
608
- .strict();
609
- export const listTemplatesResultSchema = z
610
- .object({ templates: z.array(templateSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries) })
611
- .strict();
612
- export const templateInputSummarySchema = z
613
- .object({
614
- key: idSchema,
615
- description: boundedString,
616
- type: nonEmptyLabelSchema,
617
- required: z.boolean(),
618
- values: z.array(labelSchema).max(MCP_WIRE_LIMITS.arrayEntries),
619
- valueHint: labelSchema.nullable(),
620
- })
621
- .strict();
622
- export const describeTemplateResultSchema = z
623
- .object({
624
- template: templateSummarySchema
625
- .extend({ inputs: z.array(templateInputSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries) })
626
- .strict(),
627
- annotationExample: boundedString,
628
- })
629
- .strict();
630
- export const templateContentProfileSchema = z
631
- .object({
632
- hasImage: z.boolean(),
633
- imageCount: nonNegativeSafeIntegerSchema,
634
- hasVideo: z.boolean(),
635
- hasBlockquote: z.boolean(),
636
- hasList: z.boolean(),
637
- hasTable: z.boolean(),
638
- hasDate: z.boolean(),
639
- hasNumberHighlight: z.boolean(),
640
- wordCount: nonNegativeSafeIntegerSchema,
641
- hasAsciiDiagram: z.boolean(),
642
- hasTimeline: z.boolean(),
643
- hasTree: z.boolean(),
644
- })
645
- .strict();
646
- export const templateRecommendationSchema = z
647
- .object({
648
- blockId: idSchema,
649
- title: labelSchema.nullable(),
650
- profile: templateContentProfileSchema,
651
- recommendedTemplateIds: z.array(idSchema).max(256),
652
- })
653
- .strict();
654
- export const recommendTemplatesResultSchema = z
655
- .object({
656
- recommendations: z.array(templateRecommendationSchema).max(100),
657
- totalBlocks: nonNegativeSafeIntegerSchema,
658
- truncated: z.boolean(),
659
- })
660
- .strict();
661
- export const themeDescriptionSchema = z
662
- .object({
663
- id: idSchema,
664
- name: nonEmptyLabelSchema,
665
- description: boundedString,
666
- colors: z
667
- .object({
668
- primary: nonEmptyLabelSchema,
669
- secondary: nonEmptyLabelSchema,
670
- background: nonEmptyLabelSchema,
671
- text: nonEmptyLabelSchema,
672
- highlight: nonEmptyLabelSchema,
673
- })
674
- .strict(),
675
- bodyFont: boundedString,
676
- titleFont: boundedString,
677
- })
678
- .strict();
679
- export const describeThemeResultSchema = z
680
- .object({ theme: themeDescriptionSchema, source: z.enum(['built-in', 'document']) })
681
- .strict();
682
- export const inferredLayoutSummarySchema = z
683
- .object({ id: nonEmptyLabelSchema, name: nonEmptyLabelSchema, description: boundedString })
684
- .strict();
685
- export const inferThemeResultSchema = z
686
- .object({
687
- sourceFormat: formatSchema,
688
- sourceSha256: sha256Schema,
689
- theme: themeDescriptionSchema,
690
- layouts: z.array(inferredLayoutSummarySchema).max(1000),
691
- warnings: z.array(boundedString).max(MCP_WIRE_LIMITS.arrayEntries),
692
- })
693
- .strict();
694
- export const pptxLayoutSummarySchema = z
695
- .object({
696
- layoutPath: boundedPathTextSchema,
697
- name: nonEmptyLabelSchema,
698
- masterName: labelSchema.nullable(),
699
- type: labelSchema.nullable(),
700
- slideCount: nonNegativeSafeIntegerSchema,
701
- verdict: z.enum(['builtin', 'custom', 'plain', 'skip']),
702
- templateId: labelSchema.nullable(),
703
- notes: z.array(boundedString).max(1000),
704
- })
705
- .strict();
706
- export const inspectPptxLayoutsResultSchema = z
707
- .object({
708
- slideSize: z
709
- .object({ cx: nonNegativeSafeIntegerSchema, cy: nonNegativeSafeIntegerSchema })
710
- .strict(),
711
- layouts: z.array(pptxLayoutSummarySchema).max(2048),
712
- })
713
- .strict();
714
- export const applyInferredThemeResultSchema = z
715
- .object({
716
- result: conversionResultSchema,
717
- theme: themeDescriptionSchema,
718
- layoutIds: z.array(labelSchema).max(1000),
719
- warnings: z.array(boundedString).max(MCP_WIRE_LIMITS.arrayEntries),
720
- })
721
- .strict();
722
- /** Core-owned success payload schemas for every advertised canonical MCP tool. */
723
- export const DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS = Object.freeze({
724
- list_roots: listRootsResultSchema,
725
- get_conversion_report: conversionResultSchema,
726
- convert_document: convertDocumentResultSchema,
727
- create_document_bundle: conversionResultSchema,
728
- save_artifact: saveArtifactResultSchema,
729
- inspect_document: inspectionResultSchema,
730
- validate_document: validationResultSchema,
731
- preview_document: previewResultSchema,
732
- compare_documents: comparisonResultSchema,
733
- list_templates: listTemplatesResultSchema,
734
- describe_template: describeTemplateResultSchema,
735
- recommend_templates: recommendTemplatesResultSchema,
736
- describe_theme: describeThemeResultSchema,
737
- infer_theme_from_file: inferThemeResultSchema,
738
- inspect_pptx_layouts: inspectPptxLayoutsResultSchema,
739
- apply_inferred_theme: applyInferredThemeResultSchema,
740
- list_formats: listFormatsResultSchema,
741
- list_themes: listThemesResultSchema,
742
- list_transform_styles: listTransformStylesResultSchema,
411
+ var formatCapabilitySummarySchema = z.object({
412
+ id: formatSchema,
413
+ label: nonEmptyLabelSchema,
414
+ mimeType: mimeTypeSchema,
415
+ extensions: z.array(nonEmptyLabelSchema).max(64),
416
+ import: formatDirectionCapabilitySchema,
417
+ export: formatDirectionCapabilitySchema
418
+ }).strict();
419
+ var listFormatsResultSchema = z.object({ formats: z.array(formatCapabilitySummarySchema).max(64) }).strict();
420
+ var themeCatalogEntrySchema = z.object({
421
+ id: idSchema,
422
+ name: nonEmptyLabelSchema,
423
+ description: boundedString.optional()
424
+ }).strict();
425
+ var listThemesResultSchema = z.object({ themes: z.array(themeCatalogEntrySchema).max(MCP_WIRE_LIMITS.arrayEntries) }).strict();
426
+ var transformStyleSummarySchema = z.object({ id: idSchema, name: nonEmptyLabelSchema, description: boundedString }).strict();
427
+ var listTransformStylesResultSchema = z.object({
428
+ styles: z.array(transformStyleSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries)
429
+ }).strict();
430
+ var templateSummarySchema = z.object({ id: idSchema, label: nonEmptyLabelSchema, description: boundedString }).strict();
431
+ var listTemplatesResultSchema = z.object({ templates: z.array(templateSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries) }).strict();
432
+ var templateInputSummarySchema = z.object({
433
+ key: idSchema,
434
+ description: boundedString,
435
+ type: nonEmptyLabelSchema,
436
+ required: z.boolean(),
437
+ values: z.array(labelSchema).max(MCP_WIRE_LIMITS.arrayEntries),
438
+ valueHint: labelSchema.nullable()
439
+ }).strict();
440
+ var describeTemplateResultSchema = z.object({
441
+ template: templateSummarySchema.extend({ inputs: z.array(templateInputSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries) }).strict(),
442
+ annotationExample: boundedString
443
+ }).strict();
444
+ var templateContentProfileSchema = z.object({
445
+ hasImage: z.boolean(),
446
+ imageCount: nonNegativeSafeIntegerSchema,
447
+ hasVideo: z.boolean(),
448
+ hasBlockquote: z.boolean(),
449
+ hasList: z.boolean(),
450
+ hasTable: z.boolean(),
451
+ hasDate: z.boolean(),
452
+ hasNumberHighlight: z.boolean(),
453
+ wordCount: nonNegativeSafeIntegerSchema,
454
+ hasAsciiDiagram: z.boolean(),
455
+ hasTimeline: z.boolean(),
456
+ hasTree: z.boolean()
457
+ }).strict();
458
+ var templateRecommendationSchema = z.object({
459
+ blockId: idSchema,
460
+ title: labelSchema.nullable(),
461
+ profile: templateContentProfileSchema,
462
+ recommendedTemplateIds: z.array(idSchema).max(256)
463
+ }).strict();
464
+ var recommendTemplatesResultSchema = z.object({
465
+ recommendations: z.array(templateRecommendationSchema).max(100),
466
+ totalBlocks: nonNegativeSafeIntegerSchema,
467
+ truncated: z.boolean()
468
+ }).strict();
469
+ var themeDescriptionSchema = z.object({
470
+ id: idSchema,
471
+ name: nonEmptyLabelSchema,
472
+ description: boundedString,
473
+ colors: z.object({
474
+ primary: nonEmptyLabelSchema,
475
+ secondary: nonEmptyLabelSchema,
476
+ background: nonEmptyLabelSchema,
477
+ text: nonEmptyLabelSchema,
478
+ highlight: nonEmptyLabelSchema
479
+ }).strict(),
480
+ bodyFont: boundedString,
481
+ titleFont: boundedString
482
+ }).strict();
483
+ var describeThemeResultSchema = z.object({ theme: themeDescriptionSchema, source: z.enum(["built-in", "document"]) }).strict();
484
+ var inferredLayoutSummarySchema = z.object({ id: nonEmptyLabelSchema, name: nonEmptyLabelSchema, description: boundedString }).strict();
485
+ var inferThemeResultSchema = z.object({
486
+ sourceFormat: formatSchema,
487
+ sourceSha256: sha256Schema,
488
+ theme: themeDescriptionSchema,
489
+ layouts: z.array(inferredLayoutSummarySchema).max(1e3),
490
+ warnings: z.array(boundedString).max(MCP_WIRE_LIMITS.arrayEntries)
491
+ }).strict();
492
+ var pptxLayoutSummarySchema = z.object({
493
+ layoutPath: boundedPathTextSchema,
494
+ name: nonEmptyLabelSchema,
495
+ masterName: labelSchema.nullable(),
496
+ type: labelSchema.nullable(),
497
+ slideCount: nonNegativeSafeIntegerSchema,
498
+ verdict: z.enum(["builtin", "custom", "plain", "skip"]),
499
+ templateId: labelSchema.nullable(),
500
+ notes: z.array(boundedString).max(1e3)
501
+ }).strict();
502
+ var inspectPptxLayoutsResultSchema = z.object({
503
+ slideSize: z.object({ cx: nonNegativeSafeIntegerSchema, cy: nonNegativeSafeIntegerSchema }).strict(),
504
+ layouts: z.array(pptxLayoutSummarySchema).max(2048)
505
+ }).strict();
506
+ var applyInferredThemeResultSchema = z.object({
507
+ result: conversionResultSchema,
508
+ theme: themeDescriptionSchema,
509
+ layoutIds: z.array(labelSchema).max(1e3),
510
+ warnings: z.array(boundedString).max(MCP_WIRE_LIMITS.arrayEntries)
511
+ }).strict();
512
+ var DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS = Object.freeze({
513
+ list_roots: listRootsResultSchema,
514
+ get_conversion_report: conversionResultSchema,
515
+ convert_document: convertDocumentResultSchema,
516
+ create_document_bundle: conversionResultSchema,
517
+ save_artifact: saveArtifactResultSchema,
518
+ inspect_document: inspectionResultSchema,
519
+ validate_document: validationResultSchema,
520
+ preview_document: previewResultSchema,
521
+ compare_documents: comparisonResultSchema,
522
+ list_templates: listTemplatesResultSchema,
523
+ describe_template: describeTemplateResultSchema,
524
+ recommend_templates: recommendTemplatesResultSchema,
525
+ describe_theme: describeThemeResultSchema,
526
+ infer_theme_from_file: inferThemeResultSchema,
527
+ inspect_pptx_layouts: inspectPptxLayoutsResultSchema,
528
+ apply_inferred_theme: applyInferredThemeResultSchema,
529
+ list_formats: listFormatsResultSchema,
530
+ list_themes: listThemesResultSchema,
531
+ list_transform_styles: listTransformStylesResultSchema
743
532
  });
744
- export const DOCBLOCKS_MCP_TOOL_OUTPUT_SCHEMAS = Object.freeze({
745
- list_roots: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_roots),
746
- get_conversion_report: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.get_conversion_report),
747
- convert_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.convert_document),
748
- create_document_bundle: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.create_document_bundle),
749
- save_artifact: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.save_artifact),
750
- inspect_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.inspect_document),
751
- validate_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.validate_document),
752
- preview_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.preview_document),
753
- compare_documents: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.compare_documents),
754
- list_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_templates),
755
- describe_template: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.describe_template),
756
- recommend_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.recommend_templates),
757
- describe_theme: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.describe_theme),
758
- infer_theme_from_file: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.infer_theme_from_file),
759
- inspect_pptx_layouts: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.inspect_pptx_layouts),
760
- apply_inferred_theme: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.apply_inferred_theme),
761
- list_formats: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_formats),
762
- list_themes: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_themes),
763
- list_transform_styles: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_transform_styles),
533
+ var DOCBLOCKS_MCP_TOOL_OUTPUT_SCHEMAS = Object.freeze({
534
+ list_roots: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_roots),
535
+ get_conversion_report: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.get_conversion_report),
536
+ convert_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.convert_document),
537
+ create_document_bundle: toolOutputSchema(
538
+ DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.create_document_bundle
539
+ ),
540
+ save_artifact: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.save_artifact),
541
+ inspect_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.inspect_document),
542
+ validate_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.validate_document),
543
+ preview_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.preview_document),
544
+ compare_documents: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.compare_documents),
545
+ list_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_templates),
546
+ describe_template: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.describe_template),
547
+ recommend_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.recommend_templates),
548
+ describe_theme: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.describe_theme),
549
+ infer_theme_from_file: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.infer_theme_from_file),
550
+ inspect_pptx_layouts: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.inspect_pptx_layouts),
551
+ apply_inferred_theme: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.apply_inferred_theme),
552
+ list_formats: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_formats),
553
+ list_themes: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_themes),
554
+ list_transform_styles: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_transform_styles)
764
555
  });
765
- export const materializationOptionsSchema = z.discriminatedUnion('ifExists', [
766
- z
767
- .object({
768
- rootId: idSchema,
769
- path: workspacePathSchema,
770
- ifExists: z.literal('error'),
771
- expectedSha256: z.null(),
772
- })
773
- .strict(),
774
- z
775
- .object({
776
- rootId: idSchema,
777
- path: workspacePathSchema,
778
- ifExists: z.literal('replace'),
779
- expectedSha256: z.string().regex(/^[a-f0-9]{64}$/u),
780
- })
781
- .strict(),
556
+ var materializationOptionsSchema = z.discriminatedUnion("ifExists", [
557
+ z.object({
558
+ rootId: idSchema,
559
+ path: workspacePathSchema,
560
+ ifExists: z.literal("error"),
561
+ expectedSha256: z.null().optional().default(null)
562
+ }).strict(),
563
+ z.object({
564
+ rootId: idSchema,
565
+ path: workspacePathSchema,
566
+ ifExists: z.literal("replace"),
567
+ expectedSha256: z.string().regex(/^[a-f0-9]{64}$/u)
568
+ }).strict()
782
569
  ]);
783
570
  function addExactWireIssue(parsed, context) {
784
- if (parsed !== null)
785
- return;
786
- context.addIssue({
787
- code: z.ZodIssueCode.custom,
788
- message: 'Value does not satisfy the exact DocBlocks MCP wire invariants',
789
- });
571
+ if (parsed !== null) return;
572
+ context.addIssue({
573
+ code: z.ZodIssueCode.custom,
574
+ message: "Value does not satisfy the exact DocBlocks MCP wire invariants"
575
+ });
790
576
  }
791
- /** Project the Zod 3 subset used by tool outputs into Zod 4 for SDK JSON Schema publication. */
792
577
  function projectZod3Schema(schema) {
793
- if (schema instanceof z.ZodEffects)
794
- return projectZod3Schema(schema.innerType());
795
- if (schema instanceof z.ZodOptional)
796
- return projectZod3Schema(schema.unwrap()).optional();
797
- if (schema instanceof z.ZodNullable)
798
- return projectZod3Schema(schema.unwrap()).nullable();
799
- if (schema instanceof z.ZodString) {
800
- let projected = z4.string();
801
- for (const check of schema._def.checks) {
802
- switch (check.kind) {
803
- case 'min':
804
- projected = projected.min(check.value);
805
- break;
806
- case 'max':
807
- projected = projected.max(check.value);
808
- break;
809
- case 'length':
810
- projected = projected.length(check.value);
811
- break;
812
- case 'regex':
813
- projected = projected.regex(check.regex);
814
- break;
815
- default:
816
- throw new Error(`Unsupported Zod string check in MCP output schema: ${check.kind}`);
817
- }
818
- }
819
- return projected;
820
- }
821
- if (schema instanceof z.ZodNumber) {
822
- let projected = z4.number();
823
- for (const check of schema._def.checks) {
824
- switch (check.kind) {
825
- case 'min':
826
- projected = check.inclusive ? projected.min(check.value) : projected.gt(check.value);
827
- break;
828
- case 'max':
829
- projected = check.inclusive ? projected.max(check.value) : projected.lt(check.value);
830
- break;
831
- case 'int':
832
- projected = projected.int();
833
- break;
834
- case 'multipleOf':
835
- projected = projected.multipleOf(check.value);
836
- break;
837
- case 'finite':
838
- // Zod 4 numbers reject infinities by default.
839
- break;
840
- }
841
- }
842
- return projected;
843
- }
844
- if (schema instanceof z.ZodBoolean)
845
- return z4.boolean();
846
- if (schema instanceof z.ZodNull)
847
- return z4.null();
848
- if (schema instanceof z.ZodAny)
849
- return z4.any();
850
- if (schema instanceof z.ZodUnknown)
851
- return z4.unknown();
852
- if (schema instanceof z.ZodNever)
853
- return z4.never();
854
- if (schema instanceof z.ZodLiteral) {
855
- const value = schema.value;
856
- if (typeof value === 'string' ||
857
- typeof value === 'number' ||
858
- typeof value === 'boolean' ||
859
- typeof value === 'bigint' ||
860
- value === null) {
861
- return z4.literal(value);
862
- }
863
- throw new Error('Unsupported Zod literal in MCP output schema');
864
- }
865
- if (schema instanceof z.ZodEnum) {
866
- const [first, ...rest] = schema.options;
867
- if (first === undefined)
868
- throw new Error('Empty Zod enum in MCP output schema');
869
- return z4.enum([first, ...rest]);
870
- }
871
- if (schema instanceof z.ZodArray) {
872
- let projected = z4.array(projectZod3Schema(schema.element));
873
- if (schema._def.minLength)
874
- projected = projected.min(schema._def.minLength.value);
875
- if (schema._def.maxLength)
876
- projected = projected.max(schema._def.maxLength.value);
877
- if (schema._def.exactLength)
878
- projected = projected.length(schema._def.exactLength.value);
879
- return projected;
880
- }
881
- if (schema instanceof z.ZodObject) {
882
- const sourceShape = schema.shape;
883
- const shape = Object.fromEntries(Object.entries(sourceShape).map(([key, value]) => [key, projectZod3Schema(value)]));
884
- if (schema._def.unknownKeys === 'passthrough')
885
- return z4.looseObject(shape);
886
- return z4.object(shape);
578
+ if (schema instanceof z.ZodEffects) return projectZod3Schema(schema.innerType());
579
+ if (schema instanceof z.ZodOptional) return projectZod3Schema(schema.unwrap()).optional();
580
+ if (schema instanceof z.ZodNullable) return projectZod3Schema(schema.unwrap()).nullable();
581
+ if (schema instanceof z.ZodString) {
582
+ let projected = z4.string();
583
+ for (const check of schema._def.checks) {
584
+ switch (check.kind) {
585
+ case "min":
586
+ projected = projected.min(check.value);
587
+ break;
588
+ case "max":
589
+ projected = projected.max(check.value);
590
+ break;
591
+ case "length":
592
+ projected = projected.length(check.value);
593
+ break;
594
+ case "regex":
595
+ projected = projected.regex(check.regex);
596
+ break;
597
+ default:
598
+ throw new Error(`Unsupported Zod string check in MCP output schema: ${check.kind}`);
599
+ }
887
600
  }
888
- if (schema instanceof z.ZodDiscriminatedUnion) {
889
- const options = schema.options;
890
- return projectUnion(options.map((option) => projectZod3Schema(option)));
601
+ return projected;
602
+ }
603
+ if (schema instanceof z.ZodNumber) {
604
+ let projected = z4.number();
605
+ for (const check of schema._def.checks) {
606
+ switch (check.kind) {
607
+ case "min":
608
+ projected = check.inclusive ? projected.min(check.value) : projected.gt(check.value);
609
+ break;
610
+ case "max":
611
+ projected = check.inclusive ? projected.max(check.value) : projected.lt(check.value);
612
+ break;
613
+ case "int":
614
+ projected = projected.int();
615
+ break;
616
+ case "multipleOf":
617
+ projected = projected.multipleOf(check.value);
618
+ break;
619
+ case "finite":
620
+ break;
621
+ }
891
622
  }
892
- if (schema instanceof z.ZodUnion) {
893
- const options = schema.options;
894
- return projectUnion(options.map((option) => projectZod3Schema(option)));
623
+ return projected;
624
+ }
625
+ if (schema instanceof z.ZodBoolean) return z4.boolean();
626
+ if (schema instanceof z.ZodNull) return z4.null();
627
+ if (schema instanceof z.ZodAny) return z4.any();
628
+ if (schema instanceof z.ZodUnknown) return z4.unknown();
629
+ if (schema instanceof z.ZodNever) return z4.never();
630
+ if (schema instanceof z.ZodLiteral) {
631
+ const value = schema.value;
632
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "bigint" || value === null) {
633
+ return z4.literal(value);
895
634
  }
896
- throw new Error(`Unsupported Zod type in MCP output schema: ${schema._def.typeName}`);
635
+ throw new Error("Unsupported Zod literal in MCP output schema");
636
+ }
637
+ if (schema instanceof z.ZodEnum) {
638
+ const [first, ...rest] = schema.options;
639
+ if (first === void 0) throw new Error("Empty Zod enum in MCP output schema");
640
+ return z4.enum([first, ...rest]);
641
+ }
642
+ if (schema instanceof z.ZodArray) {
643
+ let projected = z4.array(projectZod3Schema(schema.element));
644
+ if (schema._def.minLength) projected = projected.min(schema._def.minLength.value);
645
+ if (schema._def.maxLength) projected = projected.max(schema._def.maxLength.value);
646
+ if (schema._def.exactLength) projected = projected.length(schema._def.exactLength.value);
647
+ return projected;
648
+ }
649
+ if (schema instanceof z.ZodObject) {
650
+ const sourceShape = schema.shape;
651
+ const shape = Object.fromEntries(
652
+ Object.entries(sourceShape).map(([key, value]) => [key, projectZod3Schema(value)])
653
+ );
654
+ if (schema._def.unknownKeys === "passthrough") return z4.looseObject(shape);
655
+ return z4.object(shape);
656
+ }
657
+ if (schema instanceof z.ZodDiscriminatedUnion) {
658
+ const options = schema.options;
659
+ return projectUnion(options.map((option) => projectZod3Schema(option)));
660
+ }
661
+ if (schema instanceof z.ZodUnion) {
662
+ const options = schema.options;
663
+ return projectUnion(options.map((option) => projectZod3Schema(option)));
664
+ }
665
+ throw new Error(`Unsupported Zod type in MCP output schema: ${schema._def.typeName}`);
897
666
  }
898
667
  function projectUnion(options) {
899
- const [first, second, ...rest] = options;
900
- if (!first || !second)
901
- throw new Error('MCP output unions require at least two alternatives');
902
- return z4.union([first, second, ...rest]);
668
+ const [first, second, ...rest] = options;
669
+ if (!first || !second) throw new Error("MCP output unions require at least two alternatives");
670
+ return z4.union([first, second, ...rest]);
903
671
  }
904
672
  function jsonSchemaWithoutDialect(schema) {
905
- const { $schema: _dialect, ...jsonSchema } = z4.toJSONSchema(schema, { target: 'draft-7' });
906
- return jsonSchema;
673
+ const { $schema: _dialect, ...jsonSchema } = z4.toJSONSchema(schema, { target: "draft-7" });
674
+ return jsonSchema;
907
675
  }
908
- //# sourceMappingURL=zod.js.map
676
+ export {
677
+ DOCBLOCKS_MCP_TOOL_OUTPUT_SCHEMAS,
678
+ DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS,
679
+ MAX_MARKDOWN_CHARACTERS,
680
+ MAX_PATH_CHARACTERS,
681
+ applyInferredThemeResultSchema,
682
+ artifactRefSchema,
683
+ artifactUriSchema,
684
+ bundleAssetSchema,
685
+ bundleDocumentSourceSchema,
686
+ comparisonResultSchema,
687
+ conversionResultSchema,
688
+ convertDocumentResultSchema,
689
+ describeTemplateResultSchema,
690
+ describeThemeResultSchema,
691
+ diagnosticSchema,
692
+ documentSourceSchema,
693
+ formatCapabilitySummarySchema,
694
+ formatDirectionCapabilitySchema,
695
+ formatInputSchema,
696
+ formatSchema,
697
+ inferThemeResultSchema,
698
+ inferredLayoutSummarySchema,
699
+ inspectPptxLayoutsResultSchema,
700
+ inspectionResultSchema,
701
+ listFormatsResultSchema,
702
+ listRootsResultSchema,
703
+ listTemplatesResultSchema,
704
+ listThemesResultSchema,
705
+ listTransformStylesResultSchema,
706
+ materializationOptionsSchema,
707
+ mcpErrorDetailSchema,
708
+ mcpErrorResultSchema,
709
+ pptxLayoutSummarySchema,
710
+ previewResultSchema,
711
+ recommendTemplatesResultSchema,
712
+ rootGrantSummarySchema,
713
+ saveArtifactResultSchema,
714
+ templateContentProfileSchema,
715
+ templateInputSummarySchema,
716
+ templateRecommendationSchema,
717
+ templateSummarySchema,
718
+ themeCatalogEntrySchema,
719
+ themeDescriptionSchema,
720
+ toolOutputSchema,
721
+ transformStyleSummarySchema,
722
+ validationResultSchema
723
+ };