@uipath/delegate-sdk 1.203.0 → 1.203.2

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 (405) hide show
  1. package/README.md +41 -3
  2. package/dist/index.mjs +2 -2
  3. package/dist/skills/business-analysis/SKILL.md +722 -0
  4. package/dist/skills/business-analysis/as-is-capture.md +440 -0
  5. package/dist/skills/business-analysis/assets/progress.yaml +19 -0
  6. package/dist/skills/business-analysis/assets/task-list.md +34 -0
  7. package/dist/skills/business-analysis/automation-hub-publishing.md +47 -0
  8. package/dist/skills/business-analysis/bpmn-to-be-design.md +274 -0
  9. package/dist/skills/business-analysis/case-to-be-design.md +223 -0
  10. package/dist/skills/business-analysis/diagram-authoring.md +215 -0
  11. package/dist/skills/business-analysis/industry-gaps.md +134 -0
  12. package/dist/skills/business-analysis/interview-spine.md +297 -0
  13. package/dist/skills/business-analysis/locales/de.json +54 -0
  14. package/dist/skills/business-analysis/locales/en.json +54 -0
  15. package/dist/skills/business-analysis/locales/es-MX.json +54 -0
  16. package/dist/skills/business-analysis/locales/es.json +54 -0
  17. package/dist/skills/business-analysis/locales/fr.json +54 -0
  18. package/dist/skills/business-analysis/locales/ja.json +54 -0
  19. package/dist/skills/business-analysis/locales/ko.json +54 -0
  20. package/dist/skills/business-analysis/locales/pt-BR.json +54 -0
  21. package/dist/skills/business-analysis/locales/pt.json +54 -0
  22. package/dist/skills/business-analysis/locales/ro.json +54 -0
  23. package/dist/skills/business-analysis/locales/tr.json +54 -0
  24. package/dist/skills/business-analysis/locales/zh-CN.json +54 -0
  25. package/dist/skills/business-analysis/locales/zh-TW.json +54 -0
  26. package/dist/skills/business-analysis/pdd-generation.md +204 -0
  27. package/dist/skills/business-analysis/pdd-template.md +562 -0
  28. package/dist/skills/business-analysis/progress-presentation.json +13 -0
  29. package/dist/skills/business-analysis/recording-first.md +19 -0
  30. package/dist/skills/business-analysis/recording-processing.md +152 -0
  31. package/dist/skills/business-analysis/references/automation-hub-open-api.md +57 -0
  32. package/dist/skills/business-analysis/references/case-definition-spec.md +90 -0
  33. package/dist/skills/business-analysis/references/case-design-patterns/loan-origination-spec.md +86 -0
  34. package/dist/skills/business-analysis/references/component-type-mapping.md +52 -0
  35. package/dist/skills/business-analysis/references/uipath-products/case-management-schema.md +62 -0
  36. package/dist/skills/business-analysis/references/uipath-products/maestro-case-framework.md +65 -0
  37. package/dist/skills/business-analysis/references/uipath-products/maestro-case-management.md +49 -0
  38. package/dist/skills/business-analysis/research-offer.md +104 -0
  39. package/dist/skills/business-analysis/research-pass.md +149 -0
  40. package/dist/skills/business-analysis/scripts/assemble-pdd.ps1 +294 -0
  41. package/dist/skills/business-analysis/scripts/assemble-pdd.sh +453 -0
  42. package/dist/skills/business-analysis/scripts/check-phase-ready.ps1 +72 -0
  43. package/dist/skills/business-analysis/scripts/check-phase-ready.sh +98 -0
  44. package/dist/skills/business-analysis/scripts/lint-diagram.ps1 +524 -0
  45. package/dist/skills/business-analysis/scripts/lint-diagram.sh +519 -0
  46. package/dist/skills/business-analysis/scripts/stamp-pages.ps1 +363 -0
  47. package/dist/skills/business-analysis/scripts/stamp-pages.sh +360 -0
  48. package/dist/skills/business-analysis/to-be-design.md +199 -0
  49. package/dist/skills/confluence/SKILL.md +386 -0
  50. package/dist/skills/doc-coauthoring/SKILL.md +295 -0
  51. package/dist/skills/excel-architect/SKILL.macos.md +161 -0
  52. package/dist/skills/excel-architect/SKILL.md +180 -0
  53. package/dist/skills/excel-architect/SKILL.windows.md +61 -0
  54. package/dist/skills/excel-architect/archetypes/01-financial-model-advanced.md +332 -0
  55. package/dist/skills/excel-architect/archetypes/01-financial-model.md +248 -0
  56. package/dist/skills/excel-architect/archetypes/02-data-analysis.md +171 -0
  57. package/dist/skills/excel-architect/archetypes/03-tracking-dashboard.md +160 -0
  58. package/dist/skills/excel-architect/archetypes/04-project-planning.md +193 -0
  59. package/dist/skills/excel-architect/archetypes/05-simple-table.md +111 -0
  60. package/dist/skills/excel-architect/building.md +279 -0
  61. package/dist/skills/excel-architect/create.md +64 -0
  62. package/dist/skills/excel-architect/data-and-formulas.md +186 -0
  63. package/dist/skills/excel-architect/generator.md +272 -0
  64. package/dist/skills/excel-architect/macos/scripts/add-data-validation.applescript +242 -0
  65. package/dist/skills/excel-architect/macos/scripts/append-rows.applescript +310 -0
  66. package/dist/skills/excel-architect/macos/scripts/apply-conditional-format.applescript +565 -0
  67. package/dist/skills/excel-architect/macos/scripts/autofit-columns.applescript +79 -0
  68. package/dist/skills/excel-architect/macos/scripts/benchmark.sh +135 -0
  69. package/dist/skills/excel-architect/macos/scripts/check-compile.sh +30 -0
  70. package/dist/skills/excel-architect/macos/scripts/clear-range.applescript +152 -0
  71. package/dist/skills/excel-architect/macos/scripts/copy-paste.applescript +179 -0
  72. package/dist/skills/excel-architect/macos/scripts/create-chart.applescript +531 -0
  73. package/dist/skills/excel-architect/macos/scripts/create-pivot.applescript +443 -0
  74. package/dist/skills/excel-architect/macos/scripts/create-sheets.applescript +264 -0
  75. package/dist/skills/excel-architect/macos/scripts/create-workbook.applescript +92 -0
  76. package/dist/skills/excel-architect/macos/scripts/delete-chart.applescript +105 -0
  77. package/dist/skills/excel-architect/macos/scripts/delete-sheet.applescript +127 -0
  78. package/dist/skills/excel-architect/macos/scripts/filter-data.applescript +213 -0
  79. package/dist/skills/excel-architect/macos/scripts/find-replace.applescript +238 -0
  80. package/dist/skills/excel-architect/macos/scripts/format-range.applescript +531 -0
  81. package/dist/skills/excel-architect/macos/scripts/freeze-panes.applescript +133 -0
  82. package/dist/skills/excel-architect/macos/scripts/get-current-file.applescript +24 -0
  83. package/dist/skills/excel-architect/macos/scripts/get-sheet-dimensions.applescript +115 -0
  84. package/dist/skills/excel-architect/macos/scripts/health-check.applescript +704 -0
  85. package/dist/skills/excel-architect/macos/scripts/list-open-workbooks.applescript +80 -0
  86. package/dist/skills/excel-architect/macos/scripts/maximize-window.applescript +47 -0
  87. package/dist/skills/excel-architect/macos/scripts/merge-cells.applescript +227 -0
  88. package/dist/skills/excel-architect/macos/scripts/open-workbook.applescript +139 -0
  89. package/dist/skills/excel-architect/macos/scripts/read-range.applescript +267 -0
  90. package/dist/skills/excel-architect/macos/scripts/rename-sheet.applescript +231 -0
  91. package/dist/skills/excel-architect/macos/scripts/select-sheet.applescript +133 -0
  92. package/dist/skills/excel-architect/macos/scripts/set-tab-color.applescript +109 -0
  93. package/dist/skills/excel-architect/macos/scripts/sort-data.applescript +136 -0
  94. package/dist/skills/excel-architect/macos/scripts/undo.applescript +59 -0
  95. package/dist/skills/excel-architect/macos/scripts/workbook-lifecycle.applescript +149 -0
  96. package/dist/skills/excel-architect/macos/scripts/write-formula.applescript +225 -0
  97. package/dist/skills/excel-architect/macos/scripts/write-range.applescript +351 -0
  98. package/dist/skills/excel-architect/reference/api/advanced.md +381 -0
  99. package/dist/skills/excel-architect/reference/api/basic.md +747 -0
  100. package/dist/skills/excel-architect/reference/guides.md +348 -0
  101. package/dist/skills/excel-architect/reference/repair.md +174 -0
  102. package/dist/skills/excel-architect/reference/troubleshooting.md +46 -0
  103. package/dist/skills/excel-architect/scripting.md +266 -0
  104. package/dist/skills/excel-architect/styling-and-features.md +433 -0
  105. package/dist/skills/excel-architect/windows/api/composites.md +337 -0
  106. package/dist/skills/excel-architect/windows/api/scripting.md +139 -0
  107. package/dist/skills/excel-architect/windows/examples/level-1-workflows.md +485 -0
  108. package/dist/skills/excel-architect/windows/examples/level-2-advanced.md +690 -0
  109. package/dist/skills/excel-architect/windows/examples/level-3-scripting.md +337 -0
  110. package/dist/skills/github/SKILL.md +446 -0
  111. package/dist/skills/github/recipes/add-comment.md +85 -0
  112. package/dist/skills/github/recipes/check-pr-status.md +122 -0
  113. package/dist/skills/github/recipes/compare-branches.md +79 -0
  114. package/dist/skills/github/recipes/create-issue.md +103 -0
  115. package/dist/skills/github/recipes/create-pr.md +97 -0
  116. package/dist/skills/github/recipes/get-file-contents.md +76 -0
  117. package/dist/skills/github/recipes/get-last-commit.md +128 -0
  118. package/dist/skills/github/recipes/list-my-open-prs.md +105 -0
  119. package/dist/skills/github/recipes/list-recent-commits.md +84 -0
  120. package/dist/skills/github/recipes/search-issues.md +115 -0
  121. package/dist/skills/google-workspace/SKILL.md +217 -0
  122. package/dist/skills/google-workspace/services/calendar.md +311 -0
  123. package/dist/skills/google-workspace/services/docs.md +426 -0
  124. package/dist/skills/google-workspace/services/drive.md +504 -0
  125. package/dist/skills/google-workspace/services/gmail.md +466 -0
  126. package/dist/skills/google-workspace/services/sheets.md +370 -0
  127. package/dist/skills/internal-comms/SKILL.md +35 -0
  128. package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
  129. package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
  130. package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
  131. package/dist/skills/internal-comms/examples/general-comms.md +15 -0
  132. package/dist/skills/jira/SKILL.md +397 -0
  133. package/dist/skills/jira/recipes/add-comment.md +123 -0
  134. package/dist/skills/jira/recipes/assign-issue.md +157 -0
  135. package/dist/skills/jira/recipes/create-issue.md +274 -0
  136. package/dist/skills/jira/recipes/get-issue-details.md +154 -0
  137. package/dist/skills/jira/recipes/list-projects.md +151 -0
  138. package/dist/skills/jira/recipes/my-issues.md +180 -0
  139. package/dist/skills/jira/recipes/search-issues.md +215 -0
  140. package/dist/skills/jira/recipes/transition-issue.md +154 -0
  141. package/dist/skills/jira/recipes/troubleshooting.md +387 -0
  142. package/dist/skills/knowledge-base/SKILL.md +289 -0
  143. package/dist/skills/media-tools/SKILL.md +204 -0
  144. package/dist/skills/media-tools/references/encode-runbook.md +24 -0
  145. package/dist/skills/media-tools/references/resolve-binaries.md +81 -0
  146. package/dist/skills/media-tools/scripts/macos/ff-launch.sh +22 -0
  147. package/dist/skills/media-tools/scripts/macos/ff-poll.sh +10 -0
  148. package/dist/skills/media-tools/scripts/windows/ff-launch.ps1 +34 -0
  149. package/dist/skills/media-tools/scripts/windows/ff-poll.ps1 +20 -0
  150. package/dist/skills/office-download/SKILL.md +161 -0
  151. package/dist/skills/outlook-365/SKILL.macos.md +331 -0
  152. package/dist/skills/outlook-365/SKILL.md +171 -0
  153. package/dist/skills/outlook-365/SKILL.windows.md +124 -0
  154. package/dist/skills/outlook-365/api/bulk-email-operations.md +178 -0
  155. package/dist/skills/outlook-365/api/check-availability.md +87 -0
  156. package/dist/skills/outlook-365/api/create-inbox-rule.md +182 -0
  157. package/dist/skills/outlook-365/api/download-attachments.md +149 -0
  158. package/dist/skills/outlook-365/api/find-and-email-contact.md +185 -0
  159. package/dist/skills/outlook-365/api/manage-calendar-events.md +189 -0
  160. package/dist/skills/outlook-365/api/organize-with-folders.md +178 -0
  161. package/dist/skills/outlook-365/api/reply-to-conversation.md +68 -0
  162. package/dist/skills/outlook-365/api/schedule-meeting.md +73 -0
  163. package/dist/skills/outlook-365/api/search-and-read-email.md +93 -0
  164. package/dist/skills/outlook-365/api/send-email-with-attachments.md +94 -0
  165. package/dist/skills/outlook-365/api/send-email.md +396 -0
  166. package/dist/skills/outlook-365/api/set-out-of-office.md +196 -0
  167. package/dist/skills/outlook-365/macos/scripts/bulk-operations.applescript +429 -0
  168. package/dist/skills/outlook-365/macos/scripts/calendar.applescript +642 -0
  169. package/dist/skills/outlook-365/macos/scripts/contacts.applescript +635 -0
  170. package/dist/skills/outlook-365/macos/scripts/helpers.applescript +227 -0
  171. package/dist/skills/outlook-365/macos/scripts/read-emails.applescript +299 -0
  172. package/dist/skills/outlook-365/macos/scripts/search-emails.applescript +339 -0
  173. package/dist/skills/outlook-365/macos/scripts/send-email.applescript +245 -0
  174. package/dist/skills/outlook-365/uia/BASIC_OPERATIONS.md +278 -0
  175. package/dist/skills/outlook-365/uia/CALENDAR_OPERATIONS.md +386 -0
  176. package/dist/skills/outlook-365/uia/COMPOSE_EMAIL.md +426 -0
  177. package/dist/skills/outlook-365/uia/README.md +75 -0
  178. package/dist/skills/outlook-365/windows/com/bulk-operations.ps1 +241 -0
  179. package/dist/skills/outlook-365/windows/com/calendar.ps1 +227 -0
  180. package/dist/skills/outlook-365/windows/com/contacts.ps1 +270 -0
  181. package/dist/skills/outlook-365/windows/com/helpers.ps1 +158 -0
  182. package/dist/skills/outlook-365/windows/com/read-emails.ps1 +115 -0
  183. package/dist/skills/outlook-365/windows/com/search-emails.ps1 +141 -0
  184. package/dist/skills/outlook-365/windows/com/send-email.ps1 +121 -0
  185. package/dist/skills/pdf-architect/SKILL.md +640 -0
  186. package/dist/skills/powerpoint-architect/SKILL.macos.md +271 -0
  187. package/dist/skills/powerpoint-architect/SKILL.md +853 -0
  188. package/dist/skills/powerpoint-architect/SKILL.windows.md +458 -0
  189. package/dist/skills/powerpoint-architect/custom_themes.md +141 -0
  190. package/dist/skills/powerpoint-architect/editing-guide.md +424 -0
  191. package/dist/skills/powerpoint-architect/generator-reference.md +668 -0
  192. package/dist/skills/powerpoint-architect/images-guide.md +207 -0
  193. package/dist/skills/powerpoint-architect/issue-fix-mapping.md +768 -0
  194. package/dist/skills/powerpoint-architect/macos/scripts/add-html-to-slide.applescript +389 -0
  195. package/dist/skills/powerpoint-architect/macos/scripts/add-slide.applescript +255 -0
  196. package/dist/skills/powerpoint-architect/macos/scripts/add-speaker-notes.applescript +132 -0
  197. package/dist/skills/powerpoint-architect/macos/scripts/add-text.applescript +245 -0
  198. package/dist/skills/powerpoint-architect/macos/scripts/apply-slide-layout.applescript +80 -0
  199. package/dist/skills/powerpoint-architect/macos/scripts/apply-theme.applescript +122 -0
  200. package/dist/skills/powerpoint-architect/macos/scripts/autofit-placeholders.applescript +62 -0
  201. package/dist/skills/powerpoint-architect/macos/scripts/close-presentation.applescript +24 -0
  202. package/dist/skills/powerpoint-architect/macos/scripts/copy-slides.applescript +303 -0
  203. package/dist/skills/powerpoint-architect/macos/scripts/create-chart-with-data.applescript +305 -0
  204. package/dist/skills/powerpoint-architect/macos/scripts/create-with-theme.applescript +56 -0
  205. package/dist/skills/powerpoint-architect/macos/scripts/delete-slides.applescript +137 -0
  206. package/dist/skills/powerpoint-architect/macos/scripts/export-presentation.applescript +100 -0
  207. package/dist/skills/powerpoint-architect/macos/scripts/extract-slide-data.applescript +138 -0
  208. package/dist/skills/powerpoint-architect/macos/scripts/format-shape.applescript +192 -0
  209. package/dist/skills/powerpoint-architect/macos/scripts/format-slide-content.applescript +336 -0
  210. package/dist/skills/powerpoint-architect/macos/scripts/get-current-slide-number.applescript +38 -0
  211. package/dist/skills/powerpoint-architect/macos/scripts/get-file-path.applescript +94 -0
  212. package/dist/skills/powerpoint-architect/macos/scripts/get-layout-elements.applescript +141 -0
  213. package/dist/skills/powerpoint-architect/macos/scripts/get-layouts.applescript +58 -0
  214. package/dist/skills/powerpoint-architect/macos/scripts/get-opened-files.applescript +50 -0
  215. package/dist/skills/powerpoint-architect/macos/scripts/get-presentation-info.applescript +150 -0
  216. package/dist/skills/powerpoint-architect/macos/scripts/get-recent-files.applescript +68 -0
  217. package/dist/skills/powerpoint-architect/macos/scripts/get-slide-count.applescript +37 -0
  218. package/dist/skills/powerpoint-architect/macos/scripts/get-slide-info.applescript +105 -0
  219. package/dist/skills/powerpoint-architect/macos/scripts/health-check.applescript +690 -0
  220. package/dist/skills/powerpoint-architect/macos/scripts/insert-shape.applescript +188 -0
  221. package/dist/skills/powerpoint-architect/macos/scripts/insert-table.applescript +112 -0
  222. package/dist/skills/powerpoint-architect/macos/scripts/insert-text-box.applescript +225 -0
  223. package/dist/skills/powerpoint-architect/macos/scripts/manage-image.applescript +486 -0
  224. package/dist/skills/powerpoint-architect/macos/scripts/maximize-window.applescript +48 -0
  225. package/dist/skills/powerpoint-architect/macos/scripts/navigate-to-slide.applescript +84 -0
  226. package/dist/skills/powerpoint-architect/macos/scripts/open-presentation.applescript +38 -0
  227. package/dist/skills/powerpoint-architect/macos/scripts/reorder-slides.applescript +106 -0
  228. package/dist/skills/powerpoint-architect/macos/scripts/replace-text.applescript +193 -0
  229. package/dist/skills/powerpoint-architect/macos/scripts/save-presentation.applescript +54 -0
  230. package/dist/skills/powerpoint-architect/macos/scripts/set-animation.applescript +203 -0
  231. package/dist/skills/powerpoint-architect/macos/scripts/set-transition.applescript +130 -0
  232. package/dist/skills/powerpoint-architect/visual-styling-guide.md +206 -0
  233. package/dist/skills/powerpoint-architect/windows/api/advanced.md +317 -0
  234. package/dist/skills/powerpoint-architect/windows/api/basic.md +392 -0
  235. package/dist/skills/powerpoint-architect/windows/examples/10-slide-presentation.md +140 -0
  236. package/dist/skills/powerpoint-architect/windows/examples/custom-theme-workflow.md +219 -0
  237. package/dist/skills/powerpoint-architect/windows/examples/level-1-workflows.md +531 -0
  238. package/dist/skills/powerpoint-architect/windows/examples/level-2-scripting.md +239 -0
  239. package/dist/skills/powerpoint-architect/windows/scripts/create-with-theme.ps1 +81 -0
  240. package/dist/skills/project-task-list/SKILL.md +174 -0
  241. package/dist/skills/slack-operation/SKILL.md +97 -0
  242. package/dist/skills/slack-operation/api/advanced-api/GUIDE.md +277 -0
  243. package/dist/skills/slack-operation/api/search-and-read/EXAMPLE.md +75 -0
  244. package/dist/skills/slack-operation/api/search-and-read/GUIDE.md +108 -0
  245. package/dist/skills/slack-operation/api/send-message/EXAMPLE.md +112 -0
  246. package/dist/skills/slack-operation/api/send-message/GUIDE.md +63 -0
  247. package/dist/skills/slack-operation/api/share-files/EXAMPLE.md +94 -0
  248. package/dist/skills/slack-operation/api/share-files/GUIDE.md +63 -0
  249. package/dist/skills/slack-operation/ui/desktop-automation/GUIDE.md +55 -0
  250. package/dist/skills/system-diagnostics/SKILL.md +263 -0
  251. package/dist/skills/teams-operation/SKILL.md +79 -0
  252. package/dist/skills/teams-operation/api/advanced-api/GUIDE.md +234 -0
  253. package/dist/skills/teams-operation/api/meetings/EXAMPLE.md +63 -0
  254. package/dist/skills/teams-operation/api/meetings/GUIDE.md +52 -0
  255. package/dist/skills/teams-operation/api/search-and-read/EXAMPLE.md +72 -0
  256. package/dist/skills/teams-operation/api/search-and-read/GUIDE.md +54 -0
  257. package/dist/skills/teams-operation/api/send-message/EXAMPLE.md +92 -0
  258. package/dist/skills/teams-operation/api/send-message/GUIDE.md +60 -0
  259. package/dist/skills/teams-operation/ui/desktop-automation/GUIDE.md +66 -0
  260. package/dist/skills/transcribe-media/SKILL.md +142 -0
  261. package/dist/skills/uipath-integrations/SKILL.md +370 -0
  262. package/dist/skills/uipath-integrations/reference/connectors.md +331 -0
  263. package/dist/skills/uipath-integrations/reference/endpoints.md +220 -0
  264. package/dist/skills/uipath-integrations/reference/errors.md +211 -0
  265. package/dist/skills/uipath-integrations/reference/metadata.md +317 -0
  266. package/dist/skills/uipath-integrations/reference/operations.md +297 -0
  267. package/dist/skills/uipath-orchestrator/SKILL.md +312 -0
  268. package/dist/skills/uipath-orchestrator/recipes/assets.md +282 -0
  269. package/dist/skills/uipath-orchestrator/recipes/audit-logs.md +215 -0
  270. package/dist/skills/uipath-orchestrator/recipes/buckets.md +205 -0
  271. package/dist/skills/uipath-orchestrator/recipes/jobs.md +286 -0
  272. package/dist/skills/uipath-orchestrator/recipes/list-folders.md +207 -0
  273. package/dist/skills/uipath-orchestrator/recipes/queue-items.md +292 -0
  274. package/dist/skills/uipath-orchestrator/recipes/queues.md +232 -0
  275. package/dist/skills/uipath-orchestrator/recipes/releases.md +212 -0
  276. package/dist/skills/uipath-orchestrator/recipes/robots-sessions.md +274 -0
  277. package/dist/skills/uipath-orchestrator/recipes/schedules.md +280 -0
  278. package/dist/skills/uipath-orchestrator/reference/endpoints.md +85 -0
  279. package/dist/skills/uipath-orchestrator/reference/schemas.md +153 -0
  280. package/dist/skills/uipath-taskautomation/SKILL.md +310 -0
  281. package/dist/skills/uipath-taskautomation/assets/CodedWorkflow.template.cs +98 -0
  282. package/dist/skills/uipath-taskautomation/assets/ExampleWorkflow.cs +146 -0
  283. package/dist/skills/uipath-taskautomation/references/action-activity-map.json +32 -0
  284. package/dist/skills/uipath-taskautomation/references/action-activity-map.md +44 -0
  285. package/dist/skills/uipath-taskautomation/references/app-profiles.md +63 -0
  286. package/dist/skills/uipath-taskautomation/references/automation-spec.md +88 -0
  287. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/before-after-hooks-template.md +115 -0
  288. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/codedworkflow-template.md +186 -0
  289. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/helper-utility-template.md +22 -0
  290. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/json-template.md +91 -0
  291. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/testcase-template.md +92 -0
  292. package/dist/skills/uipath-taskautomation/references/coded-reference/cli-reference.md +249 -0
  293. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/codedworkflow-reference.md +275 -0
  294. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/coding-guidelines.md +229 -0
  295. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/inspect-package-guide.md +81 -0
  296. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/integration-service-guide.md +507 -0
  297. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md +410 -0
  298. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/third-party-packages-guide.md +67 -0
  299. package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md +110 -0
  300. package/dist/skills/uipath-taskautomation/references/coded-reference/environment-setup.md +194 -0
  301. package/dist/skills/uipath-taskautomation/references/coded-reference/error-handling-guide.md +195 -0
  302. package/dist/skills/uipath-taskautomation/references/coded-reference/powershell-interop-guide.md +57 -0
  303. package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure-guide.md +114 -0
  304. package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure.md +126 -0
  305. package/dist/skills/uipath-taskautomation/references/coded-reference/uia-elements-interaction-guide.md +109 -0
  306. package/dist/skills/uipath-taskautomation/references/coded-reference/validation-guide.md +147 -0
  307. package/dist/skills/uipath-taskautomation/references/coded-workflow-authoring.md +219 -0
  308. package/dist/skills/uipath-taskautomation/references/profiling-output.md +80 -0
  309. package/dist/skills/uipath-taskautomation/references/reliability-guide.md +83 -0
  310. package/dist/skills/uipath-taskautomation/references/task-automation-cheatsheet.md +272 -0
  311. package/dist/skills/uipath-taskautomation/references/template-preflight.md +17 -0
  312. package/dist/skills/uipath-workflow-documenter/SKILL.md +430 -0
  313. package/dist/skills/uipath-workflow-documenter/layouts/pdd-template.md +265 -0
  314. package/dist/skills/uipath-workflow-documenter/routines/from-orchestrator.md +11 -0
  315. package/dist/skills/uipath-workflow-documenter/routines/from-workflow.md +11 -0
  316. package/dist/skills/word-architect/SKILL.macos.md +147 -0
  317. package/dist/skills/word-architect/SKILL.md +502 -0
  318. package/dist/skills/word-architect/SKILL.windows.md +55 -0
  319. package/dist/skills/word-architect/api/advanced.md +522 -0
  320. package/dist/skills/word-architect/api/basic.md +378 -0
  321. package/dist/skills/word-architect/api/expert.md +302 -0
  322. package/dist/skills/word-architect/generation.md +308 -0
  323. package/dist/skills/word-architect/layouts/01-professional.md +168 -0
  324. package/dist/skills/word-architect/layouts/02-educational-kids.md +354 -0
  325. package/dist/skills/word-architect/layouts/03-academic.md +83 -0
  326. package/dist/skills/word-architect/layouts/04-creative.md +242 -0
  327. package/dist/skills/word-architect/layouts/05-operational.md +94 -0
  328. package/dist/skills/word-architect/macos/scripts/apply-heading-style.applescript +215 -0
  329. package/dist/skills/word-architect/macos/scripts/apply-style.applescript +272 -0
  330. package/dist/skills/word-architect/macos/scripts/autofit-tables.applescript +53 -0
  331. package/dist/skills/word-architect/macos/scripts/close-document.applescript +287 -0
  332. package/dist/skills/word-architect/macos/scripts/create-chart-with-data.applescript +379 -0
  333. package/dist/skills/word-architect/macos/scripts/create-chart.applescript +191 -0
  334. package/dist/skills/word-architect/macos/scripts/delete-selection.applescript +223 -0
  335. package/dist/skills/word-architect/macos/scripts/export-document.applescript +167 -0
  336. package/dist/skills/word-architect/macos/scripts/extract-table.applescript +168 -0
  337. package/dist/skills/word-architect/macos/scripts/find-by-style.applescript +173 -0
  338. package/dist/skills/word-architect/macos/scripts/find-text.applescript +199 -0
  339. package/dist/skills/word-architect/macos/scripts/format-table.applescript +234 -0
  340. package/dist/skills/word-architect/macos/scripts/format-text.applescript +431 -0
  341. package/dist/skills/word-architect/macos/scripts/get-document-properties.applescript +95 -0
  342. package/dist/skills/word-architect/macos/scripts/get-document-structure.applescript +371 -0
  343. package/dist/skills/word-architect/macos/scripts/get-header-footer-text.applescript +106 -0
  344. package/dist/skills/word-architect/macos/scripts/get-images.applescript +166 -0
  345. package/dist/skills/word-architect/macos/scripts/get-opened-files.applescript +103 -0
  346. package/dist/skills/word-architect/macos/scripts/get-paragraph-bounds.applescript +133 -0
  347. package/dist/skills/word-architect/macos/scripts/get-paragraph-format.applescript +134 -0
  348. package/dist/skills/word-architect/macos/scripts/get-recent-files.applescript +82 -0
  349. package/dist/skills/word-architect/macos/scripts/get-styled-text.applescript +256 -0
  350. package/dist/skills/word-architect/macos/scripts/get-tables.applescript +126 -0
  351. package/dist/skills/word-architect/macos/scripts/get-text-formatting.applescript +224 -0
  352. package/dist/skills/word-architect/macos/scripts/get-text.applescript +383 -0
  353. package/dist/skills/word-architect/macos/scripts/get-theme-colors.applescript +123 -0
  354. package/dist/skills/word-architect/macos/scripts/health-check.applescript +606 -0
  355. package/dist/skills/word-architect/macos/scripts/insert-cover-page.applescript +77 -0
  356. package/dist/skills/word-architect/macos/scripts/insert-header-footer.applescript +87 -0
  357. package/dist/skills/word-architect/macos/scripts/insert-horizontal-line.applescript +112 -0
  358. package/dist/skills/word-architect/macos/scripts/insert-html.applescript +440 -0
  359. package/dist/skills/word-architect/macos/scripts/insert-hyperlink.applescript +191 -0
  360. package/dist/skills/word-architect/macos/scripts/insert-image.applescript +320 -0
  361. package/dist/skills/word-architect/macos/scripts/insert-list.applescript +317 -0
  362. package/dist/skills/word-architect/macos/scripts/insert-pagebreak.applescript +181 -0
  363. package/dist/skills/word-architect/macos/scripts/insert-smartart.applescript +104 -0
  364. package/dist/skills/word-architect/macos/scripts/insert-table.applescript +238 -0
  365. package/dist/skills/word-architect/macos/scripts/insert-text.applescript +677 -0
  366. package/dist/skills/word-architect/macos/scripts/insert-textbox.applescript +261 -0
  367. package/dist/skills/word-architect/macos/scripts/maximize-window.applescript +67 -0
  368. package/dist/skills/word-architect/macos/scripts/normalize-formatting.applescript +56 -0
  369. package/dist/skills/word-architect/macos/scripts/open-document.applescript +222 -0
  370. package/dist/skills/word-architect/macos/scripts/replace-text.applescript +390 -0
  371. package/dist/skills/word-architect/macos/scripts/save-document.applescript +230 -0
  372. package/dist/skills/word-architect/macos/scripts/select-range.applescript +142 -0
  373. package/dist/skills/word-architect/macos/scripts/set-document-properties.applescript +195 -0
  374. package/dist/skills/word-architect/macos/scripts/set-page-layout.applescript +273 -0
  375. package/dist/skills/word-architect/macos/scripts/set-theme-colors.applescript +264 -0
  376. package/dist/skills/word-architect/macos/scripts/undo-redo.applescript +61 -0
  377. package/dist/skills/word-architect/macos/scripts/update-toc.applescript +112 -0
  378. package/dist/skills/word-architect/reference/formatting.md +119 -0
  379. package/dist/skills/word-architect/reference/html-layouts/01-executive-summary-box.md +36 -0
  380. package/dist/skills/word-architect/reference/html-layouts/02-kpi-summary-table.md +68 -0
  381. package/dist/skills/word-architect/reference/html-layouts/03-comparison-table.md +63 -0
  382. package/dist/skills/word-architect/reference/html-layouts/04-pros-cons-table.md +86 -0
  383. package/dist/skills/word-architect/reference/html-layouts/05-timeline-table.md +114 -0
  384. package/dist/skills/word-architect/reference/html-layouts/06-raci-matrix.md +95 -0
  385. package/dist/skills/word-architect/reference/html-layouts/07-data-table-alternating.md +84 -0
  386. package/dist/skills/word-architect/reference/html-layouts/08-callout-box.md +102 -0
  387. package/dist/skills/word-architect/reference/html-layouts/09-vertical-milestone.md +100 -0
  388. package/dist/skills/word-architect/reference/quality-assurance.md +102 -0
  389. package/dist/skills/word-architect/reference/tables.md +62 -0
  390. package/dist/skills/word-architect/reference/tracked-changes.md +34 -0
  391. package/dist/skills/word-architect/reference/uia-fallback.md +231 -0
  392. package/dist/skills/word-architect/reference/visual-elements.md +82 -0
  393. package/dist/skills/word-architect/windows/scripts/apply-heading-style.ps1 +190 -0
  394. package/dist/skills/word-architect/windows/scripts/autofit-tables.ps1 +64 -0
  395. package/dist/skills/word-architect/windows/scripts/create-chart-with-data.ps1 +133 -0
  396. package/dist/skills/word-architect/windows/scripts/create-chart.ps1 +73 -0
  397. package/dist/skills/word-architect/windows/scripts/export-document.ps1 +86 -0
  398. package/dist/skills/word-architect/windows/scripts/get-current-file.ps1 +27 -0
  399. package/dist/skills/word-architect/windows/scripts/insert-cover-page.ps1 +79 -0
  400. package/dist/skills/word-architect/windows/scripts/insert-horizontal-line.ps1 +74 -0
  401. package/dist/skills/word-architect/windows/scripts/insert-image.ps1 +98 -0
  402. package/dist/skills/word-architect/windows/scripts/insert-smartart.ps1 +118 -0
  403. package/dist/skills/word-architect/windows/scripts/insert-text-box.ps1 +90 -0
  404. package/dist/skills/word-architect/windows/scripts/normalize-formatting.ps1 +63 -0
  405. package/package.json +5 -4
@@ -0,0 +1,378 @@
1
+ # Word API — Basic (MANDATORY)
2
+
3
+ **Load this file before ANY edit operation.** Covers the core endpoints needed for 90% of tasks.
4
+
5
+ All positions are **0-based**. All paragraph numbers are **1-based**.
6
+
7
+ Native Word is active-document stateful. Never run native Word calls in parallel. For multiple documents, finish one document's open → read → edit → save sequence before touching the next.
8
+
9
+ ---
10
+
11
+ ## ⚠️ Stale Positions — The #1 Cause of Insert/Replace Failures
12
+
13
+ **Every successful `/word/insert/*`, `/word/replace/*`, `/word/selection/delete`, or `/word/apply/style` shifts character indices, paragraph numbers, and `contextBefore`/`contextAfter` text for the rest of the document.** All values you read BEFORE that call are now stale.
14
+
15
+ **Rule:** RIGHT BEFORE every position-bearing call, refresh:
16
+ - `/word/get/text` (or `/word/get/paragraph-bounds`) to get the actual `contextBefore`/`contextAfter`/`expectedText` at the position you want
17
+ - `/word/find/text` to get a fresh paragraph number after structural edits
18
+ - `/word/get/document-structure` to see the new outline
19
+
20
+ **Never** reuse `characterIndex`, `position`, `contextBefore`, `contextAfter`, or `paragraphNumber` from a read that happened before any edit. Even one insert invalidates them.
21
+
22
+ **Prefer** `paragraphStart`/`paragraphEnd` anchors with a fresh paragraph number over `characterIndex` — paragraph anchors survive most edits; char indices do not.
23
+
24
+ If you see `Position validation failed` or `SelectionEnd is beyond document end`, the cause is almost always stale state. Re-read first, retry second.
25
+
26
+ ---
27
+
28
+ ## Position & Range Reference
29
+
30
+ ### Position Object
31
+
32
+ Used by insert operations. Specifies WHERE to insert.
33
+
34
+ | Field | Required | Description |
35
+ |-------|----------|-------------|
36
+ | `anchor` | Yes | `documentStart`, `documentEnd`, `paragraphStart`, `paragraphEnd`, or `characterIndex` |
37
+ | `paragraph` | If paragraph anchor | 1-based paragraph number |
38
+ | `index` | If characterIndex | 0-based character index |
39
+ | `contextBefore` | Windows | ~20 chars before position (validation). Omit on macOS. |
40
+ | `contextAfter` | Windows | ~20 chars after position. Empty `""` for `documentEnd`. MUST start with `␍` for `paragraphEnd`. Omit on macOS. |
41
+
42
+ `contextBefore`/`contextAfter` are validated on Windows, but `autocorrectContextErrors` defaults to `true` there, so common slips (a missing `␍`, a non-empty `contextAfter` at `documentEnd`) are silently repaired rather than rejected — only a genuine content mismatch errors. macOS does not check them at all. Treat them as documentation of intent on both platforms, not a safety net.
43
+
44
+ ### Range Object
45
+
46
+ Used by replace, format, style, delete operations. Specifies WHAT range to act on.
47
+
48
+ | Field | Required | Description |
49
+ |-------|----------|-------------|
50
+ | `start` | Yes | `{ "anchor": "paragraphStart", "paragraph": N }` or `{ "anchor": "characterIndex", "index": N }` |
51
+ | `end` | Yes | Same format as start |
52
+ | `expectedText` | Yes | Actual text in range. Get from `/word/get/text` — NEVER guess. |
53
+ | `expectedTextCompact` | No | macOS only. `true` → read `expectedText` as `first20~~~last20`, checking prefix and suffix only. Use for large ranges. |
54
+
55
+ ⚠️ **Compact matching is opt-in on macOS, implicit on Windows.** macOS compares `expectedText` literally unless you also send `expectedTextCompact: true`, so text that itself contains `~~~` verifies correctly by default. Windows still reads any `~~~` as the separator, so on Windows a range whose text contains `~~~` leaves everything between the first `~~~` and the end unchecked — send a range whose text has no `~~~`, or verify it on macOS.
56
+
57
+ macOS resolves `paragraphStart`/`paragraphEnd`/`characterIndex`/`documentStart`/`documentEnd` anchors to real character positions before acting, and — when `expectedText` is present — verifies the resolved span holds that text. A mismatch fails with a stale-position error instead of acting on the wrong range.
58
+
59
+ ### Insert Text Boundaries
60
+
61
+ For `/word/insert/text`, send content only in `text`. Do not add a leading or trailing `␍`. `insertMode: "NewParagraph"` adds the one required paragraph boundary based on the anchor.
62
+
63
+ Windows calls that explicitly set `autocorrectContextErrors: false` are the exception; follow their validation error if a manual boundary is required.
64
+
65
+ `␍` remains part of actual document context and `expectedText`. Copy it from a fresh read; never guess it.
66
+
67
+ ---
68
+
69
+ ## Open Document
70
+
71
+ ```
72
+ endpoint: "/word/open-attach"
73
+ body: {
74
+ "filePath": "C:\\Documents\\report.docx",
75
+ "createNew": false
76
+ }
77
+ ```
78
+
79
+ | Parameter | Required | Description |
80
+ |-----------|----------|-------------|
81
+ | `filePath` | Yes | Absolute path (must include drive letter) |
82
+ | `createNew` | Yes | `true` = create new (fails if exists), `false` = open existing |
83
+ | `visible` | No | **Windows only.** Defaults to `false`: Word does not appear on screen. Pass `true` ONLY when the user asked to see the document — see "Windowless by Default (Windows)" in SKILL.md |
84
+
85
+ **On macOS `visible` does nothing.** The macOS executor ignores it, activates Word and maximizes the window, so the document appears whatever you pass. Never plan or claim off-screen work on macOS.
86
+
87
+ Returns: `documentId`, `pid`, `pageCount`, `characterCount`, `wordCount`, `paragraphCount`, `documentState`.
88
+
89
+ `documentId` and `pid` are real numbers even for a windowless document — they come from its own hidden window — and are `0` only when Word cannot report a window at all. Do not depend on either: every other endpoint targets the document by `filePath`.
90
+
91
+ A document the user already has open keeps its window whatever `visible` says: attaching never hides what they are looking at.
92
+
93
+ ---
94
+
95
+ ## Save Document
96
+
97
+ ```
98
+ endpoint: "/word/save"
99
+ body: { "filePath": "...", "saveAsPath": "..." }
100
+ ```
101
+
102
+ `saveAsPath` is optional (Save As).
103
+
104
+ **⚠️ Word edits are NOT auto-saved — call `/word/save` when you are done.** Every `/word/*`
105
+ mutation (replace, insert, format, apply style, delete) changes only the open document; on
106
+ both Windows and macOS nothing reaches disk until an explicit `/word/save`. Report a task as
107
+ complete only after that call succeeds. (This differs from `/ppt/*`, which saves after each
108
+ mutation on both platforms — do not carry the PowerPoint habit over to Word.)
109
+
110
+ ---
111
+
112
+ ## Close Document
113
+
114
+ ```
115
+ endpoint: "/word/close"
116
+ body: { "filePath": "..." }
117
+ ```
118
+
119
+ Save before closing to preserve changes.
120
+
121
+ ---
122
+
123
+ ## Get Document Structure
124
+
125
+ **ALWAYS call first** to understand the document before editing.
126
+
127
+ ```
128
+ endpoint: "/word/get/document-structure"
129
+ body: { "filePath": "...", "includeContent": false, "includeParagraphBounds": false }
130
+ ```
131
+
132
+ Returns: hierarchical headings with `level`, `text`, `paragraphNumber`, `startPosition`, `endPosition`. With `includeContent: true`: content between headings (max 500 chars each).
133
+
134
+ `includeParagraphBounds: true` (macOS) adds `paragraphBounds: [{paragraphNumber, paragraphStart, paragraphEnd}, ...]` covering EVERY paragraph. Use it whenever you need offsets for more than two paragraphs — one call replaces one `/word/get/paragraph-bounds` per paragraph, and the offsets feed `/word/apply/style` and `/word/format/text` batches directly. Offsets are always Word's own; the endpoint falls back to a per-paragraph read when it cannot derive them safely, so it stays correct on documents containing tables or astral characters.
135
+
136
+ ---
137
+
138
+ ## Get Text
139
+
140
+ Call before any edit to see actual content.
141
+
142
+ ```
143
+ endpoint: "/word/get/text"
144
+ body: { "filePath": "...", "paragraphNumber": 3 }
145
+ ```
146
+
147
+ | Parameter | Description |
148
+ |-----------|-------------|
149
+ | `paragraphNumber` | 1-based. Cannot use with selectionStart/End |
150
+ | `selectionStart` + `selectionEnd` | 0-based character positions, half-open: `selectionEnd` is excluded. Equal values read nothing. Cannot use with paragraphNumber |
151
+ | `maxChars` | Cap on returned chars. Default 8,000, clamped to [100, 50,000]. macOS truncates above the cap and sets `truncated: true`; Windows returns an error pointing at the cap. |
152
+
153
+ **Default cap:** 8,000 chars. Raise via `maxChars` up to 50,000 when you really need the whole document; prefer `paragraphNumber` or `selectionStart`/`selectionEnd` for targeted reads.
154
+
155
+ ---
156
+
157
+ ## Get Paragraph Bounds
158
+
159
+ Get exact character positions for a paragraph.
160
+
161
+ ```
162
+ endpoint: "/word/get/paragraph-bounds"
163
+ body: { "filePath": "...", "paragraphNumber": 3 }
164
+ ```
165
+
166
+ Returns `paragraphStart` and `paragraphEnd`. macOS also returns `text`, `contextBefore`, and `contextAfter`; its context fields surround the `paragraphEnd` insertion point, so `contextBefore` is the paragraph tail and `contextAfter` starts with its paragraph mark.
167
+
168
+ ---
169
+
170
+ ## Find Text
171
+
172
+ Search for text and get positions.
173
+
174
+ ```
175
+ endpoint: "/word/find/text"
176
+ body: {
177
+ "filePath": "...",
178
+ "searchText": "revenue",
179
+ "caseSensitive": false,
180
+ "matchWholeWord": false,
181
+ "contextCharacters": 300
182
+ }
183
+ ```
184
+
185
+ Returns: array of matches with `position`, `length`, `context`, `paragraphNumber`. Use `position` for `characterIndex` anchor in subsequent operations.
186
+
187
+ ---
188
+
189
+ ## Replace Text
190
+
191
+ Replaces the FIRST occurrence within a range. **Always use `find/text` first.**
192
+
193
+ ```
194
+ endpoint: "/word/replace/text"
195
+ body: {
196
+ "filePath": "...",
197
+ "oldText": "2023",
198
+ "newText": "2024",
199
+ "range": {
200
+ "start": { "anchor": "characterIndex", "index": 150 },
201
+ "end": { "anchor": "characterIndex", "index": 154 },
202
+ "expectedText": "2023"
203
+ }
204
+ }
205
+ ```
206
+
207
+ | Parameter | Required | Description |
208
+ |-----------|----------|-------------|
209
+ | `oldText` | Yes | Text to find and replace |
210
+ | `newText` | Yes | Replacement text |
211
+ | `range` | Yes | Range to search within (see Range Object) |
212
+
213
+ **When replacing multiple occurrences, process from end to start** (highest position first) to avoid position shifts.
214
+
215
+ ---
216
+
217
+ ## Insert Text
218
+
219
+ **macOS only: normal DOCX supports batch mode.** Windows has no batch endpoint — send sequential single calls. A `batch` array is ignored there and the call fails validation (`insertMode is required...`, or `Position is required.` if you did supply `insertMode`). Each batch item contains `text`, `insertMode`, and `position`; do not use replace's `range` schema. A batch uses either document coordinates or paragraph coordinates, never both. See [advanced.md](advanced.md#batch-operations) for the exact supported groups.
220
+
221
+ **Compatibility Mode rejects batch.** It supports only `documentStart` and `documentEnd` inserts, sent as separate sequential calls.
222
+
223
+ macOS `documentEnd` payload:
224
+
225
+ ```
226
+ endpoint: "/word/insert/text"
227
+ body: {
228
+ "filePath": "...",
229
+ "text": "New paragraph content",
230
+ "insertMode": "NewParagraph",
231
+ "position": { "anchor": "documentEnd" }
232
+ }
233
+ ```
234
+
235
+ | Parameter | Required | Description |
236
+ |-----------|----------|-------------|
237
+ | `text` | Yes | Content only. Do not add a leading or trailing `␍`. |
238
+ | `insertMode` | **Yes** | `NewParagraph` = creates one paragraph boundary. `WithinParagraph` = inserts inline. |
239
+ | `position` | Yes | Position Object |
240
+
241
+ On Windows `documentEnd`, get the final paragraph number from a fresh structure read, call `/word/get/paragraph-bounds`, then `/word/get/text` for that returned range. Copy the actual text tail into `contextBefore` and set `contextAfter` to `""`. Never reuse or invent context.
242
+
243
+ **Style inheritance:** New paragraphs inherit the style of the preceding paragraph. If you insert after a Heading 1, the new paragraph will also be Heading 1. Always follow with `/word/apply/style` to set `Normal` (or the desired style).
244
+
245
+ ---
246
+
247
+ ## Insert HTML
248
+
249
+ Insert formatted content (tables, lists, styled text) via clipboard.
250
+
251
+ ```
252
+ endpoint: "/word/insert/html"
253
+ body: {
254
+ "filePath": "...",
255
+ "html": "<h2>Section</h2><p>Content with <b>bold</b></p>",
256
+ "position": { "anchor": "documentEnd", "contextBefore": "...", "contextAfter": "" },
257
+ "fontFamily": "Calibri"
258
+ }
259
+ ```
260
+
261
+ | Parameter | Required | Description |
262
+ |-----------|----------|-------------|
263
+ | `html` | Yes | HTML content |
264
+ | `position` | Yes | Position Object |
265
+ | `fontFamily` | No | Font to apply (match document) |
266
+
267
+ Supported: `<table>`, `<tr>`, `<td>`, `<th>`, `<ul>`, `<ol>`, `<li>`, `<b>`, `<i>`, `<u>`, `<h1>`-`<h6>`, `<a>`, `<p>`, `<br>`, inline styles. For emoji encoding, see expert.md.
268
+
269
+ ---
270
+
271
+ ## Insert Page Break
272
+
273
+ ```
274
+ endpoint: "/word/insert/pagebreak"
275
+ body: { "filePath": "...", "position": { ... } }
276
+ ```
277
+
278
+ Use before major sections (H1), TOC, appendices.
279
+
280
+ **⚠️ After a pagebreak insert, `documentEnd` `contextBefore` goes stale.** The next position-bearing call that uses `{ "anchor": "documentEnd" }` will fail "Position validation failed" because the cached `contextBefore` no longer matches the document tail. Switch to `{ "anchor": "paragraphEnd", "paragraph": <N> }` of a known paragraph from a fresh `/word/get/document-structure` instead, or re-read the end-of-document context first.
281
+
282
+ ---
283
+
284
+ ## Delete Selection
285
+
286
+ ```
287
+ endpoint: "/word/selection/delete"
288
+ body: {
289
+ "filePath": "...",
290
+ "range": {
291
+ "start": { "anchor": "paragraphStart", "paragraph": 3 },
292
+ "end": { "anchor": "paragraphStart", "paragraph": 4 },
293
+ "expectedText": "Paragraph 3 content␍"
294
+ }
295
+ }
296
+ ```
297
+
298
+ **Delete patterns:**
299
+
300
+ | Goal | Start | End | expectedText includes |
301
+ |------|-------|-----|-----------------------|
302
+ | Delete middle para N | `paragraphStart N` | `paragraphStart N+1` | Content + trailing `␍` |
303
+ | Delete last para | `paragraphEnd N-1` | `documentEnd` | Leading `␍` + content |
304
+ | Delete specific text | `characterIndex` from find | `characterIndex` from find | Exact text |
305
+
306
+ **Plain-int alias (macOS only):** `/word/selection` and `/word/selection/delete` also accept top-level `start`/`end` ints instead of a `range` object: `{ "filePath": "...", "start": 10, "end": 20 }`. On Windows these endpoints bind only the `range` object — top-level ints are ignored and the call fails. Always send `range` with anchors: it works on both platforms and survives edits that shift character positions.
307
+
308
+ **`/word/selection/delete` requires a range or start/end.** Omitting both is rejected — it does not fall back to deleting the whole document.
309
+
310
+ ---
311
+
312
+ ## Format Text
313
+
314
+ **Requires a `range` object** — you cannot pass a bare `paragraphNumber`. Always use a full Range with `start`, `end`, and `expectedText`.
315
+
316
+ ```
317
+ endpoint: "/word/format/text"
318
+ body: {
319
+ "filePath": "...",
320
+ "range": {
321
+ "start": { "anchor": "paragraphStart", "paragraph": 1 },
322
+ "end": { "anchor": "paragraphEnd", "paragraph": 1 },
323
+ "expectedText": "Introduction"
324
+ },
325
+ "bold": true,
326
+ "fontSize": 14,
327
+ "textColorHex": "0000FF"
328
+ }
329
+ ```
330
+
331
+ **Formatting options:** `fontName`, `fontSize`, `bold`, `italic`, `underline`, `strikethrough`, `textColorHex` (no #), `highlightColor` (Yellow, Green, Cyan, etc.), `alignment` (Left, Center, Right, Justify), `paragraphBackgroundColorHex`.
332
+
333
+ ---
334
+
335
+ ## Apply Style
336
+
337
+ ```
338
+ endpoint: "/word/apply/style"
339
+ body: {
340
+ "filePath": "...",
341
+ "styleName": "Heading 1",
342
+ "range": {
343
+ "start": { "anchor": "paragraphStart", "paragraph": 1 },
344
+ "end": { "anchor": "paragraphEnd", "paragraph": 1 },
345
+ "expectedText": "Introduction"
346
+ }
347
+ }
348
+ ```
349
+
350
+ | Parameter | Required | Description |
351
+ |-----------|----------|-------------|
352
+ | `styleName` | Yes | `Heading 1`, `Heading 2`, `Title`, `Normal`, etc. |
353
+ | `range` | Yes | Range Object |
354
+
355
+ ---
356
+
357
+ ## Best Practices
358
+
359
+ 1. **Always `get/document-structure` first** — understand the doc before editing
360
+ 2. **Always `get/text` before editing a range** — get real content, never guess
361
+ 3. **Always `find/text` before `replace/text`** — never guess positions
362
+ 4. **Process replacements end-to-start** — preserve positions
363
+ 5. **`expectedText` from actual API response** — copy-paste, never write from memory
364
+ 6. **Tables inflate paragraph counts** — a 5-row table = 20+ paragraphs. NEVER count manually.
365
+ 7. **Images/charts appear as `/` in text** — expectedText will contain `/`
366
+ 8. **get/text caps at 8,000 chars by default** (bump via `maxChars`, up to 50,000). Use `/word/get/document-structure` + paragraph/range reads for precise targeting instead of dumping everything.
367
+ 9. **Insert separator after lists** before tables to prevent format inheritance
368
+ 10. **Use `<!!IgnoreValidation!!>` as last resort only** — if validation fails, re-read the document first
369
+ 11. **`characterIndex` goes stale after any edit** — positions shift when you insert or delete text. Re-read positions with `find/text` or `get/paragraph-bounds` before each operation. Prefer `paragraphStart`/`paragraphEnd` anchors over `characterIndex` for multi-step edits. For `/word/apply/style`, ALWAYS use `paragraphStart`/`paragraphEnd` anchors with a fresh paragraph number from `/word/find/text` — NEVER use `characterIndex` anchors.
370
+ 12. **Paragraph numbers go stale after any insert/delete** — after `/word/insert/html` or any edit that adds/removes content, ALL previously known paragraph numbers are invalid. Call `/word/find/text` to get the fresh paragraph number before using `/word/get/paragraph-bounds` or `/word/apply/style`.
371
+ 13. **New paragraphs inherit preceding style** — after inserting near a heading, always call `/word/apply/style` to set the correct style on the new paragraph.
372
+ 14. **Update TOC after heading changes** — after adding, removing, or renaming headings, update the Table of Contents. **Do NOT use UIA for this** — use the API:
373
+ - Both platforms: `/word/update/toc`
374
+ 15. **Match existing formatting when adding sections** — documents created by doc-gen use explicit inline formatting, NOT Word's built-in styles. Two-step process (see SKILL.md step 3b→4 for full details):
375
+ - **Step A:** Use `/word/insert/html` for structure — do NOT rely on inline CSS font-size/color (they are not applied reliably)
376
+ - **Step B:** Call `/word/format/text` on EVERY inserted paragraph with the theme's exact `fontSize`, `fontName`, `textColorHex` (look up the theme formatting table in SKILL.md step 3b)
377
+ - After formatting, apply heading styles (`Heading 1`, `Heading 2`) with `/word/apply/style` so the TOC includes them
378
+ - **DO NOT SKIP Step B** — without it, inserted content will have wrong font sizes and missing colors
@@ -0,0 +1,302 @@
1
+ # Word API — Expert
2
+
3
+ C# scripting, position troubleshooting, shape management, and edge cases. Load when basic and advanced endpoints aren't enough.
4
+
5
+ ---
6
+
7
+ ## Execute C# Script (Windows Only)
8
+
9
+ Runs custom C# code in Word's COM context. Use for operations not available via API endpoints.
10
+
11
+ ```
12
+ endpoint: "/word/execute-script"
13
+ body: {
14
+ "filePath": "...",
15
+ "script": "for (int i = 1; i <= document.Paragraphs.Count; i++) {\n dynamic para = document.Paragraphs[i];\n if (para.Range.Text?.Contains(\"TODO\") == true) {\n para.Range.Font.Bold = true;\n }\n}\nreturn \"Done\";"
16
+ }
17
+ ```
18
+
19
+ ### Available Global Variables
20
+
21
+ | Variable | Type | Description |
22
+ |----------|------|-------------|
23
+ | `document` | dynamic | Word Document COM object |
24
+ | `selection` | dynamic | Current Selection object |
25
+ | `range` | dynamic | Document Range object |
26
+ | `application` | dynamic | Word Application object |
27
+
28
+ ### Critical Rules
29
+
30
+ - Keep scripts under 30-50 lines
31
+ - **NEVER reassign globals** (`document`, `selection`, etc.)
32
+ - **NO LINQ on COM collections** — use manual for loops
33
+ - Must return a string
34
+ - 30-second timeout
35
+
36
+ ### When to Use Script vs API
37
+
38
+ | Task | Use |
39
+ |------|-----|
40
+ | Insert/format/replace text | API endpoints |
41
+ | Insert/format tables | API endpoints |
42
+ | Add rows/columns to tables | **execute-script** |
43
+ | Merge table cells | **execute-script** |
44
+ | Complex conditional formatting | **execute-script** |
45
+ | Loops over paragraphs | **execute-script** |
46
+
47
+ ### Common Patterns
48
+
49
+ **Add row at end of table:**
50
+ ```csharp
51
+ if (document.Tables.Count > 0) {
52
+ dynamic table = document.Tables[1];
53
+ table.Rows.Add();
54
+ return "Row added";
55
+ }
56
+ return "No tables";
57
+ ```
58
+
59
+ **Insert row BEFORE specific row:**
60
+ ```csharp
61
+ if (document.Tables.Count > 0) {
62
+ dynamic table = document.Tables[1];
63
+ table.Rows.Add(table.Rows[2]); // Before row 2
64
+ return "Row inserted";
65
+ }
66
+ return "No tables";
67
+ ```
68
+
69
+ **Add column at end / before specific column:**
70
+ ```csharp
71
+ // At end
72
+ table.Columns.Add();
73
+ table.AutoFitBehavior(2); // wdAutoFitWindow
74
+
75
+ // Before column 2
76
+ table.Columns.Add(table.Columns[2]);
77
+ table.AutoFitBehavior(2);
78
+ ```
79
+
80
+ **Fill cells:**
81
+ ```csharp
82
+ for (int i = 1; i <= table.Rows.Count; i++) {
83
+ table.Rows[i].Cells[1].Range.Text = "Cell " + i;
84
+ }
85
+ return "Cells filled";
86
+ ```
87
+
88
+ **Format headings by pattern:**
89
+ ```csharp
90
+ for (int i = 1; i <= document.Paragraphs.Count; i++) {
91
+ dynamic para = document.Paragraphs[i];
92
+ string text = para.Range.Text ?? "";
93
+ if (text.StartsWith("Chapter")) {
94
+ para.Range.Style = document.Styles["Heading 1"];
95
+ }
96
+ }
97
+ return "Headings formatted";
98
+ ```
99
+
100
+ **Create Table of Contents:**
101
+ ```csharp
102
+ dynamic tocRange = document.Range(0, 0);
103
+ tocRange.Text = "Table of Contents\r";
104
+ tocRange.Font.Bold = 1;
105
+ tocRange.Font.Size = 16;
106
+ int insertPos = tocRange.End;
107
+ dynamic insertPoint = document.Range(insertPos, insertPos);
108
+ document.TablesOfContents.Add(insertPoint, true, 1, 3, false, Type.Missing, true, true, Type.Missing, true);
109
+ return "TOC created";
110
+ ```
111
+
112
+ **Delete empty paragraphs:**
113
+ ```csharp
114
+ int count = 0;
115
+ for (int i = document.Paragraphs.Count; i >= 1; i--) {
116
+ dynamic para = document.Paragraphs[i];
117
+ if (string.IsNullOrWhiteSpace(para.Range.Text?.Replace("\r", ""))) {
118
+ para.Range.Delete();
119
+ count++;
120
+ }
121
+ }
122
+ return $"Deleted {count} empty paragraphs";
123
+ ```
124
+
125
+ ### Style Assignment
126
+
127
+ ```csharp
128
+ // CORRECT — direct property assignment
129
+ para.Range.Style = document.Styles["Heading 1"];
130
+
131
+ // WRONG — set_Style() fails with dynamic COM
132
+ para.Range.set_Style("Heading 1");
133
+ ```
134
+
135
+ ### Enum Usage
136
+
137
+ Use Word enums WITHOUT `Word.` prefix:
138
+ ```csharp
139
+ para.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
140
+ range.Font.Underline = WdUnderline.wdUnderlineSingle;
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Shape Management (via Script)
146
+
147
+ The `/word/insert/textbox` API doesn't support naming or listing text boxes. Use scripts for advanced management.
148
+
149
+ **Create named text box:**
150
+ ```csharp
151
+ dynamic shape = document.Shapes.AddTextbox(1, 50, 100, 150, 40);
152
+ shape.TextFrame.TextRange.Text = "Callout text";
153
+ shape.Name = "CalloutBox_1";
154
+ return $"Created: {shape.Name}";
155
+ ```
156
+
157
+ **List all text boxes:**
158
+ ```csharp
159
+ string info = "Text Boxes:\n";
160
+ int count = 0;
161
+ for (int i = 1; i <= document.Shapes.Count; i++) {
162
+ dynamic shape = document.Shapes[i];
163
+ if (shape.Type == 17) { // msoTextBox
164
+ count++;
165
+ string text = "";
166
+ try { text = shape.TextFrame.TextRange.Text.Trim(); } catch { }
167
+ info += $"[{i}] Name: {shape.Name}, Text: {text}\n";
168
+ }
169
+ }
170
+ return info + $"Total: {count}";
171
+ ```
172
+
173
+ **Delete by name:**
174
+ ```csharp
175
+ for (int i = document.Shapes.Count; i >= 1; i--) {
176
+ if (document.Shapes[i].Name == "CalloutBox_1") {
177
+ document.Shapes[i].Delete();
178
+ return "Deleted";
179
+ }
180
+ }
181
+ return "Not found";
182
+ ```
183
+
184
+ **Delete all text boxes:**
185
+ ```csharp
186
+ int count = 0;
187
+ for (int i = document.Shapes.Count; i >= 1; i--) {
188
+ if (document.Shapes[i].Type == 17) {
189
+ document.Shapes[i].Delete();
190
+ count++;
191
+ }
192
+ }
193
+ return $"Deleted {count}";
194
+ ```
195
+
196
+ Always iterate in **reverse** when deleting (indices shift).
197
+
198
+ ---
199
+
200
+ ## Position Troubleshooting
201
+
202
+ ### Example: Insert after paragraph 1
203
+
204
+ Document: `Para1␍Para2␍` → Goal: `Para1␍NewPara␍Para2␍`
205
+
206
+ ```json
207
+ {
208
+ "anchor": "paragraphEnd", "paragraph": 1,
209
+ "contextBefore": "Para1",
210
+ "contextAfter": "␍Para2"
211
+ }
212
+ // text: "NewPara", insertMode: "NewParagraph"
213
+ ```
214
+
215
+ ### Example: Insert before paragraph 2
216
+
217
+ Document: `Title␍Body␍` → Goal: `Title␍Subtitle␍Body␍`
218
+
219
+ ```json
220
+ {
221
+ "anchor": "paragraphStart", "paragraph": 2,
222
+ "contextBefore": "Title␍",
223
+ "contextAfter": "Body"
224
+ }
225
+ // text: "Subtitle", insertMode: "NewParagraph"
226
+ ```
227
+
228
+ ### Example: Delete middle paragraph
229
+
230
+ `Para1␍Para2␍Para3␍` → `Para1␍Para3␍`
231
+
232
+ ```json
233
+ {
234
+ "start": { "anchor": "paragraphStart", "paragraph": 2 },
235
+ "end": { "anchor": "paragraphStart", "paragraph": 3 },
236
+ "expectedText": "Para2␍"
237
+ }
238
+ ```
239
+
240
+ ### Example: Delete last paragraph
241
+
242
+ `Para1␍Para2␍Para3␍` → `Para1␍Para2␍`
243
+
244
+ ```json
245
+ {
246
+ "start": { "anchor": "paragraphEnd", "paragraph": 2 },
247
+ "end": { "anchor": "documentEnd" },
248
+ "expectedText": "␍Para3"
249
+ }
250
+ ```
251
+
252
+ ### Common Mistakes
253
+
254
+ | Mistake | Fix |
255
+ |---------|-----|
256
+ | Insert text contains a leading/trailing ␍ | Send content only; `NewParagraph` adds the boundary |
257
+ | `paragraphEnd` contextAfter missing ␍ | contextAfter MUST start with ␍ |
258
+ | `paragraphStart` contextBefore missing ␍ | contextBefore MUST end with ␍ (except para 1) |
259
+ | `documentEnd` contextAfter not empty | contextAfter must be `""` for documentEnd |
260
+ | Deleting last para with paragraphStart→documentEnd | Leaves empty para. Use paragraphEnd N-1→documentEnd |
261
+
262
+ ### Quick Debug Checklist
263
+
264
+ 1. Re-read target with `/word/get/text`
265
+ 2. Check contextBefore/contextAfter against actual content
266
+ 3. Copy context/expectedText from the fresh read; never add ␍ to insert text
267
+ 4. Use `/word/get/paragraph-bounds` for exact positions
268
+
269
+ ---
270
+
271
+ ## Emoji in HTML (macOS)
272
+
273
+ NEVER use raw Unicode emoji in `/word/insert/html` — they get garbled on macOS (AppleScript encoding issues).
274
+
275
+ **Always use HTML numeric entities:**
276
+
277
+ | Emoji | Entity |
278
+ |-------|--------|
279
+ | Party popper | `&#127881;` |
280
+ | Birthday cake | `&#127874;` |
281
+ | Confetti | `&#127880;` |
282
+ | Check mark | `&#9989;` |
283
+ | Star | `&#11088;` |
284
+ | Musical note | `&#127925;` |
285
+
286
+ ---
287
+
288
+ ## Select Range
289
+
290
+ Sets Word's selection (rarely needed — most operations accept range directly).
291
+
292
+ ```
293
+ endpoint: "/word/selection"
294
+ body: {
295
+ "filePath": "...",
296
+ "range": {
297
+ "start": { "anchor": "paragraphStart", "paragraph": 2 },
298
+ "end": { "anchor": "paragraphEnd", "paragraph": 2 },
299
+ "expectedText": "Second paragraph"
300
+ }
301
+ }
302
+ ```