@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,191 @@
1
+ #!/usr/bin/osascript
2
+ (*
3
+ * Create Chart in Word
4
+ * Inserts a chart into the active Word document via Insert > Chart menu.
5
+ *
6
+ * Usage: osascript create-chart.applescript [chartType]
7
+ *
8
+ * Chart Types:
9
+ * column, bar, line, pie, area, scatter, combo
10
+ *
11
+ * Examples:
12
+ * osascript create-chart.applescript # Opens chart dialog
13
+ * osascript create-chart.applescript column # Selects Column chart type
14
+ * osascript create-chart.applescript pie # Selects Pie chart type
15
+ *
16
+ * Note: Word must be open with an active document.
17
+ * After chart insertion, Excel opens for data editing - use Excel skills to populate.
18
+ *)
19
+
20
+ on run argv
21
+ set chartType to "column"
22
+ set positionArg to "end"
23
+
24
+ if (count of argv) > 0 then
25
+ set chartType to item 1 of argv as string
26
+ end if
27
+ if (count of argv) > 1 then
28
+ set positionArg to item 2 of argv as string
29
+ end if
30
+
31
+ -- Validate chart type
32
+ set validTypes to {"column", "bar", "line", "pie", "area", "scatter", "combo"}
33
+ if chartType is not in validTypes then
34
+ return "Error: Invalid chart type '" & chartType & "'. Use: column, bar, line, pie, area, scatter, combo"
35
+ end if
36
+
37
+ tell application "Microsoft Word"
38
+ if not (exists active document) then
39
+ return "Error: No document is open in Word."
40
+ end if
41
+
42
+ -- Move cursor to the requested position before inserting
43
+ try
44
+ set doc to active document
45
+ set docEnd to end of content of text object of doc
46
+
47
+ if positionArg is "start" then
48
+ set targetRange to create range doc start 0 end 0
49
+ select targetRange
50
+ else if positionArg is "end" then
51
+ set targetRange to create range doc start (docEnd - 1) end (docEnd - 1)
52
+ select targetRange
53
+ else
54
+ -- Treat as placeholder text: find via selection, delete it, cursor stays there.
55
+ -- Placeholders must use the format {{CHART:name}} to avoid accidental matches.
56
+ set placeholderText to positionArg
57
+ if placeholderText does not start with "{{" or placeholderText does not end with "}}" then
58
+ set placeholderText to "{{CHART:" & positionArg & "}}"
59
+ end if
60
+
61
+ -- Count occurrences first to ensure placeholder is unique
62
+ set docText to content of text object of doc
63
+ set matchCount to my countOccurrences(docText, placeholderText)
64
+
65
+ if matchCount is 0 then
66
+ return "Error: Placeholder \"" & placeholderText & "\" not found in document."
67
+ else if matchCount > 1 then
68
+ return "Error: Placeholder \"" & placeholderText & "\" found " & matchCount & " times. Must be unique (exactly 1)."
69
+ end if
70
+
71
+ -- Exactly 1 match — safe to find and replace
72
+ set targetRange to create range doc start 0 end 0
73
+ select targetRange
74
+
75
+ set sel to selection
76
+ set findObj to find object of sel
77
+ tell findObj
78
+ set content to placeholderText
79
+ set forward to true
80
+ set wrap to find stop
81
+ set format to false
82
+ set match case to true
83
+ set match whole word to false
84
+ end tell
85
+ set foundIt to execute find findObj
86
+
87
+ if foundIt then
88
+ type text selection text ""
89
+ else
90
+ set targetRange to create range doc start (docEnd - 1) end (docEnd - 1)
91
+ select targetRange
92
+ end if
93
+ end if
94
+ on error
95
+ -- If positioning fails, continue with current cursor
96
+ end try
97
+
98
+ activate
99
+ end tell
100
+
101
+ delay 0.3
102
+
103
+ -- Map chart type to menu item name
104
+ set menuItemName to "Column"
105
+ if chartType is "column" then
106
+ set menuItemName to "Column"
107
+ else if chartType is "bar" then
108
+ set menuItemName to "Bar"
109
+ else if chartType is "line" then
110
+ set menuItemName to "Line"
111
+ else if chartType is "pie" then
112
+ set menuItemName to "Pie"
113
+ else if chartType is "area" then
114
+ set menuItemName to "Area"
115
+ else if chartType is "scatter" then
116
+ set menuItemName to "X Y (Scatter)"
117
+ else if chartType is "combo" then
118
+ set menuItemName to "Combo"
119
+ end if
120
+
121
+ -- Use System Events to insert chart via menu navigation
122
+ tell application "System Events"
123
+ tell process "Microsoft Word"
124
+ try
125
+ -- Click Insert menu in menu bar
126
+ click menu bar item "Insert" of menu bar 1
127
+ delay 0.6
128
+
129
+ -- Get Chart menu item and open its submenu using AXPress
130
+ set chartItem to menu item "Chart" of menu "Insert" of menu bar 1
131
+ perform action "AXPress" of chartItem
132
+ delay 0.6
133
+
134
+ -- Now the Chart submenu should be open
135
+ -- Click on the specific chart type
136
+ set chartSubmenu to menu 1 of chartItem
137
+ set typeMenuItem to menu item menuItemName of chartSubmenu
138
+
139
+ -- Some chart types might have submenus
140
+ perform action "AXPress" of typeMenuItem
141
+ delay 0.8
142
+
143
+ -- Check if there's a submenu and we need to select from it
144
+ try
145
+ set typeSubmenu to menu 1 of typeMenuItem
146
+ -- If we get here, there's a submenu - click first item
147
+ set firstVariant to menu item 1 of typeSubmenu
148
+ perform action "AXPress" of firstVariant
149
+ delay 1.5
150
+ on error
151
+ -- No submenu - the chart should have been inserted directly
152
+ delay 1
153
+ end try
154
+
155
+ on error errMsg
156
+ -- Try to close any open menus and report error
157
+ try
158
+ key code 53 -- Escape
159
+ delay 0.2
160
+ end try
161
+ return "Error inserting chart via menu: " & errMsg & ". Please insert manually: Insert > Chart > " & menuItemName
162
+ end try
163
+ end tell
164
+ end tell
165
+
166
+ -- Wait for chart to be inserted and Excel to open
167
+ delay 2
168
+
169
+ -- Check if Excel is now running
170
+ set excelOpened to false
171
+ tell application "System Events"
172
+ if (name of processes) contains "Microsoft Excel" then
173
+ set excelOpened to true
174
+ end if
175
+ end tell
176
+
177
+ if excelOpened then
178
+ return "CHART_CREATED_EXCEL_OPEN: Created " & chartType & " chart in Word. Excel is now open with the chart data sheet." & return & return & "NEXT STEPS FOR AGENT:" & return & "1. Switch to Excel and populate data starting from cell A1" & return & "2. Save the Excel data (Cmd+S)" & return & "3. Close Excel (Cmd+W) to return to Word" & return & "4. The chart will automatically update with the new data"
179
+ else
180
+ return "CHART_CREATED: Created " & chartType & " chart in Word." & return & return & "To edit data: Click on chart > Chart Design tab > Edit Data in Excel"
181
+ end if
182
+ end run
183
+
184
+ -- Count occurrences of searchStr in theText
185
+ on countOccurrences(theText, searchStr)
186
+ set oldDelimiters to AppleScript's text item delimiters
187
+ set AppleScript's text item delimiters to searchStr
188
+ set itemCount to (count of text items of theText) - 1
189
+ set AppleScript's text item delimiters to oldDelimiters
190
+ return itemCount
191
+ end countOccurrences
@@ -0,0 +1,223 @@
1
+ #!/usr/bin/osascript
2
+ (*
3
+ * Delete Selection/Range in Word Document
4
+ * Deletes the content within a specified range.
5
+ *
6
+ * Usage: osascript delete-selection.applescript <filePath> <rangeJson>
7
+ *
8
+ * Parameters:
9
+ * filePath - Path to the Word document (used for verification)
10
+ * rangeJson - JSON string: {"start":N,"end":N} (0-based positions)
11
+ *
12
+ * Examples:
13
+ * osascript delete-selection.applescript "/path/to/doc.docx" '{"start":0,"end":50}'
14
+ * osascript delete-selection.applescript "/path/to/doc.docx" '{"start":100,"end":200}'
15
+ *
16
+ * Output:
17
+ * {"success":true,"message":"Content deleted","stateChanges":{"documentLength":N}}
18
+ *
19
+ * Note: Word must be open with an active document.
20
+ *)
21
+
22
+ on run argv
23
+ if (count of argv) < 2 then
24
+ return "Error: Missing arguments. Usage: osascript delete-selection.applescript <filePath> <rangeJson>
25
+
26
+ Parameters:
27
+ filePath - Path to the Word document
28
+ rangeJson - JSON range: {\"start\":N,\"end\":N} (0-based positions)
29
+
30
+ Examples:
31
+ osascript delete-selection.applescript \"/path/to/doc.docx\" '{\"start\":0,\"end\":50}'
32
+ osascript delete-selection.applescript \"/path/to/doc.docx\" '{\"start\":100,\"end\":200}'"
33
+ end if
34
+
35
+ set filePath to item 1 of argv as string
36
+ set rangeJson to item 2 of argv as string
37
+
38
+ -- Parse range JSON via Python so we can handle both shapes:
39
+ -- plain ints: {"start":10, "end":50}
40
+ -- anchor objects:{"start":{"anchor":"paragraphStart","paragraph":5},
41
+ -- "end": {"anchor":"paragraphEnd", "paragraph":5}}
42
+ -- SKILL.md actively teaches the LLM to use anchor objects for
43
+ -- /word/selection/delete (see the Delete patterns table), so the script
44
+ -- must accept them.
45
+ set parsed to my parseRangeAnchors(rangeJson)
46
+ if parsed starts with "ERROR:" then
47
+ return "Error: Invalid rangeJson: " & (text 7 thru -1 of parsed)
48
+ end if
49
+ set AppleScript's text item delimiters to tab
50
+ set parts to text items of parsed
51
+ set AppleScript's text item delimiters to ""
52
+ if (count of parts) < 4 then
53
+ return "Error: Invalid rangeJson. Expected start and end positions."
54
+ end if
55
+ set sAnchor to item 1 of parts
56
+ set sValue to (item 2 of parts) as integer
57
+ set eAnchor to item 3 of parts
58
+ set eValue to (item 4 of parts) as integer
59
+
60
+ tell application "Microsoft Word"
61
+ if not (exists active document) then
62
+ return "Error: No document is open in Word."
63
+ end if
64
+
65
+ try
66
+ set doc to active document
67
+ set docEnd to end of content of text object of doc
68
+ set paraCount to count of paragraphs of doc
69
+
70
+ -- Resolve anchors to 0-based character positions
71
+ set wordStart to my resolveAnchor(sAnchor, sValue, doc, docEnd, paraCount)
72
+ set wordEnd to my resolveAnchor(eAnchor, eValue, doc, docEnd, paraCount)
73
+
74
+ -- Validate range bounds
75
+ if wordStart < 0 then set wordStart to 0
76
+ if wordEnd > (docEnd - 1) then set wordEnd to (docEnd - 1)
77
+ if wordStart > wordEnd then
78
+ return "Error: Invalid range: start (" & wordStart & ") is after end (" & wordEnd & ")."
79
+ end if
80
+
81
+ -- Create the range to delete
82
+ set targetRange to create range doc start wordStart end wordEnd
83
+
84
+ -- Auto-extend to consume the trailing paragraph mark when the caller
85
+ -- passed a paragraphStart→paragraphEnd shape (text-only). Without this,
86
+ -- the text is removed but an empty paragraph is left behind. Only fires
87
+ -- when both ends are paragraph-aligned so mid-text deletions are unaffected.
88
+ try
89
+ set paraCount to count of paragraphs of doc
90
+ repeat with i from 1 to paraCount
91
+ set p to text object of paragraph i of doc
92
+ if (start of content of p) is wordStart then
93
+ if (end of content of p) is (wordEnd + 1) and (wordEnd + 1) ≤ (docEnd - 1) then
94
+ set wordEnd to wordEnd + 1
95
+ set targetRange to create range doc start wordStart end wordEnd
96
+ end if
97
+ exit repeat
98
+ end if
99
+ end repeat
100
+ end try
101
+
102
+ -- `delete` removes the range entirely (text and any paragraph marks
103
+ -- inside it). `set content to ""` would only empty the text and leave
104
+ -- structural marks behind — that is the bug this script used to have.
105
+ delete targetRange
106
+
107
+ -- Get updated document length (0-based)
108
+ set newDocLen to end of content of text object of doc
109
+ set newDocLen0 to newDocLen - 1
110
+
111
+ return "{\"success\":true,\"message\":\"Content deleted\",\"stateChanges\":{\"documentLength\":" & newDocLen0 & "}}"
112
+
113
+ on error errMsg
114
+ return "Error: " & errMsg
115
+ end try
116
+ end tell
117
+ end run
118
+
119
+ -- Parse the range JSON into four tab-separated fields:
120
+ -- sAnchor \t sValue \t eAnchor \t eValue
121
+ -- Accepts plain ints OR anchor objects for `start` and `end`. Returns
122
+ -- "ERROR:..." on invalid JSON.
123
+ on parseRangeAnchors(jsonStr)
124
+ try
125
+ set shellCmd to "echo " & quoted form of jsonStr & " | /usr/bin/python3 -c \"
126
+ import json, sys
127
+ try:
128
+ r = json.loads(sys.stdin.read(), strict=False)
129
+ except json.JSONDecodeError as e:
130
+ print('ERROR:Invalid JSON: ' + str(e))
131
+ sys.exit(0)
132
+ def parse_pos(v, default_value):
133
+ if isinstance(v, dict):
134
+ anchor = v.get('anchor', 'characterIndex')
135
+ for k in ('value', 'paragraphNumber', 'paragraph', 'index'):
136
+ if k in v:
137
+ try:
138
+ return anchor, int(v[k])
139
+ except (TypeError, ValueError):
140
+ pass
141
+ return anchor, default_value
142
+ try:
143
+ return 'characterIndex', int(v)
144
+ except (TypeError, ValueError):
145
+ return 'characterIndex', default_value
146
+ s_anchor, s_value = parse_pos(r.get('start', 0), 0)
147
+ e_anchor, e_value = parse_pos(r.get('end', 999999999), 999999999)
148
+ print(s_anchor + '\\t' + str(s_value) + '\\t' + e_anchor + '\\t' + str(e_value))
149
+ \""
150
+ return do shell script shellCmd
151
+ on error errMsg
152
+ return "ERROR:" & errMsg
153
+ end try
154
+ end parseRangeAnchors
155
+
156
+ -- Resolve an anchor + value pair into a 0-based character position.
157
+ -- The body wraps `tell application "Microsoft Word"` because `my resolveAnchor`
158
+ -- calls back to top-level scope, where Word terms like `paragraph N of doc`
159
+ -- aren't defined unless we re-enter the Word tell context here.
160
+ on resolveAnchor(anchor, posValue, doc, docEnd, paraCount)
161
+ if anchor is "documentStart" then
162
+ return 0
163
+ else if anchor is "documentEnd" then
164
+ if docEnd > 1 then
165
+ return docEnd - 1
166
+ else
167
+ return 0
168
+ end if
169
+ else if anchor is "paragraphStart" then
170
+ set n to posValue
171
+ if n < 1 then set n to 1
172
+ if n > paraCount then set n to paraCount
173
+ tell application "Microsoft Word"
174
+ return start of content of text object of paragraph n of doc
175
+ end tell
176
+ else if anchor is "paragraphEnd" then
177
+ set n to posValue
178
+ if n < 1 then set n to 1
179
+ if n > paraCount then set n to paraCount
180
+ tell application "Microsoft Word"
181
+ set pEnd to end of content of text object of paragraph n of doc
182
+ end tell
183
+ if pEnd > 1 then
184
+ return pEnd - 1
185
+ else
186
+ return 0
187
+ end if
188
+ else
189
+ -- characterIndex (default)
190
+ return posValue
191
+ end if
192
+ end resolveAnchor
193
+
194
+ -- Extract a numeric value from a JSON string by key name
195
+ on extractJsonNumber(jsonStr, keyName)
196
+ set AppleScript's text item delimiters to "\"" & keyName & "\":"
197
+ if (count of text items of jsonStr) < 2 then
198
+ set AppleScript's text item delimiters to ""
199
+ return -1
200
+ end if
201
+ set afterKey to text item 2 of jsonStr
202
+ set AppleScript's text item delimiters to ""
203
+
204
+ -- Extract the number value
205
+ set numStr to ""
206
+ repeat with c in (characters of afterKey)
207
+ set c to c as text
208
+ if c is in {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} then
209
+ set numStr to numStr & c
210
+ else if c is "-" and numStr is "" then
211
+ set numStr to numStr & c
212
+ else if numStr is not "" then
213
+ exit repeat
214
+ end if
215
+ end repeat
216
+
217
+ if numStr is "" then return -1
218
+ try
219
+ return numStr as integer
220
+ on error
221
+ return -1
222
+ end try
223
+ end extractJsonNumber
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/osascript
2
+ (*
3
+ * Export Word Document to Various Formats
4
+ * Usage: osascript export-document.applescript <filePath> [pdfFilePath] [startPage] [endPage]
5
+ *
6
+ * Parameters:
7
+ * filePath - The full POSIX path of the document to export
8
+ * pdfFilePath - Optional: Output path (default: same dir as source, .pdf extension)
9
+ * startPage - Optional: Start page number for export
10
+ * endPage - Optional: End page number for export
11
+ *
12
+ * Supported formats (derived from output file extension):
13
+ * .pdf - PDF document (default)
14
+ * .docx - Word Document
15
+ * .doc - Word 97-2003 Document
16
+ * .rtf - Rich Text Format
17
+ * .html - HTML Web Page
18
+ * .txt - Plain Text
19
+ *
20
+ * Examples:
21
+ * osascript export-document.applescript "/Users/me/doc.docx" "/Users/me/output.pdf"
22
+ * osascript export-document.applescript "/Users/me/doc.docx" "/Users/me/output.rtf"
23
+ * osascript export-document.applescript "/Users/me/doc.docx"
24
+ *
25
+ * Output:
26
+ * {"success":true,"outputPath":"/Users/me/output.pdf"}
27
+ *
28
+ * Note: Word must be open with an active document.
29
+ *)
30
+
31
+ on run argv
32
+ if (count of argv) < 1 then
33
+ return "Error: Usage: osascript export-document.applescript <filePath> [pdfFilePath] [startPage] [endPage]"
34
+ end if
35
+
36
+ set filePath to item 1 of argv as string
37
+ set pdfFilePath to ""
38
+ set startPageStr to ""
39
+ set endPageStr to ""
40
+
41
+ if (count of argv) >= 2 then set pdfFilePath to item 2 of argv as string
42
+ if (count of argv) >= 3 then set startPageStr to item 3 of argv as string
43
+ if (count of argv) >= 4 then set endPageStr to item 4 of argv as string
44
+
45
+ -- Get document info from Word
46
+ tell application "Microsoft Word"
47
+ if not (exists active document) then
48
+ return "Error: No document is open in Word."
49
+ end if
50
+
51
+ set docPath to full name of active document
52
+ end tell
53
+
54
+ -- Determine output path and format from extension
55
+ if pdfFilePath is "" then
56
+ -- Default: export as PDF to same directory
57
+ -- Derive from document HFS path
58
+ set AppleScript's text item delimiters to ":"
59
+ set pathParts to text items of docPath
60
+ set docName to last item of pathParts
61
+ set dirPath to (items 1 thru -2 of pathParts) as text
62
+ set AppleScript's text item delimiters to ""
63
+
64
+ -- Remove extension from filename
65
+ set AppleScript's text item delimiters to "."
66
+ set nameParts to text items of docName
67
+ if (count of nameParts) > 1 then
68
+ set baseName to (items 1 thru -2 of nameParts) as text
69
+ else
70
+ set baseName to docName
71
+ end if
72
+ set AppleScript's text item delimiters to ""
73
+
74
+ set hfsPath to dirPath & ":" & baseName & ".pdf"
75
+ set exportFormat to "pdf"
76
+ -- Derive POSIX output path from HFS path
77
+ set outputPath to POSIX path of hfsPath
78
+ else
79
+ -- Convert POSIX output path to HFS path for Word
80
+ set hfsPath to POSIX file pdfFilePath as text
81
+ set outputPath to pdfFilePath
82
+
83
+ -- Determine format from file extension
84
+ set AppleScript's text item delimiters to "."
85
+ set extParts to text items of pdfFilePath
86
+ set AppleScript's text item delimiters to ""
87
+ if (count of extParts) > 1 then
88
+ set fileExt to last item of extParts
89
+ else
90
+ set fileExt to "pdf"
91
+ end if
92
+
93
+ if fileExt is "pdf" then
94
+ set exportFormat to "pdf"
95
+ else if fileExt is "rtf" then
96
+ set exportFormat to "rtf"
97
+ else if fileExt is "html" or fileExt is "htm" then
98
+ set exportFormat to "html"
99
+ else if fileExt is "txt" then
100
+ set exportFormat to "txt"
101
+ else if fileExt is "doc" then
102
+ set exportFormat to "doc"
103
+ else if fileExt is "docx" then
104
+ set exportFormat to "docx"
105
+ else
106
+ set exportFormat to "pdf"
107
+ end if
108
+ end if
109
+
110
+ -- Note: startPage/endPage are accepted for API compatibility but macOS Word
111
+ -- AppleScript does not support page-range PDF export. Full document is exported.
112
+ set pageRangeNote to ""
113
+ if startPageStr is not "" or endPageStr is not "" then
114
+ set pageRangeNote to " (note: page range not supported on macOS, full document exported)"
115
+ end if
116
+
117
+ -- Export based on format
118
+ try
119
+ if exportFormat is "pdf" then
120
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format PDF
121
+ else if exportFormat is "rtf" then
122
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format rtf
123
+ else if exportFormat is "html" then
124
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format HTML
125
+ else if exportFormat is "txt" then
126
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format text
127
+ else if exportFormat is "doc" then
128
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format document97
129
+ else if exportFormat is "docx" then
130
+ tell application "Microsoft Word" to save as (active document) file name hfsPath file format format document
131
+ end if
132
+ on error errMsg
133
+ return "Error: Failed to export: " & errMsg
134
+ end try
135
+
136
+ -- Re-open the original document if save-as changed it
137
+ if exportFormat is not "pdf" then
138
+ try
139
+ tell application "Microsoft Word" to open file name (POSIX file filePath as text)
140
+ end try
141
+ end if
142
+
143
+ if pageRangeNote is not "" then
144
+ return "{\"success\":true,\"outputPath\":\"" & my escapeJSONString(outputPath) & "\",\"note\":\"page range not supported on macOS, full document exported\"}"
145
+ end if
146
+ return "{\"success\":true,\"outputPath\":\"" & my escapeJSONString(outputPath) & "\"}"
147
+ end run
148
+
149
+ -- Escape special characters for JSON strings
150
+ on escapeJSONString(theText)
151
+ set theText to my replaceText(theText, "\\", "\\\\")
152
+ set theText to my replaceText(theText, "\"", "\\\"")
153
+ set theText to my replaceText(theText, return, "\\n")
154
+ set theText to my replaceText(theText, linefeed, "\\n")
155
+ set theText to my replaceText(theText, tab, "\\t")
156
+ return theText
157
+ end escapeJSONString
158
+
159
+ -- Replace all occurrences of searchStr with replaceStr
160
+ on replaceText(theText, searchStr, replaceStr)
161
+ set AppleScript's text item delimiters to searchStr
162
+ set theItems to text items of theText
163
+ set AppleScript's text item delimiters to replaceStr
164
+ set theText to theItems as string
165
+ set AppleScript's text item delimiters to ""
166
+ return theText
167
+ end replaceText