ask-marcel-office-cli 0.1.0 → 1.0.0

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 (212) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +319 -120
  3. package/dist/cli.js +85117 -1741
  4. package/dist/commands.json +6312 -0
  5. package/dist/composition/build-deps.d.ts +6 -1
  6. package/dist/composition/cli.d.ts +14 -6
  7. package/dist/composition/package-manager.d.ts +2 -0
  8. package/dist/index.d.ts +6 -1
  9. package/dist/index.js +93317 -10724
  10. package/dist/infra/auth.d.ts +31 -3
  11. package/dist/infra/browser-auth.d.ts +106 -2
  12. package/dist/infra/graph-client.d.ts +63 -2
  13. package/dist/infra/mammoth-adapter.d.ts +4 -0
  14. package/dist/infra/playwright-loader.d.ts +4 -0
  15. package/dist/infra/process-runner-bun.d.ts +2 -0
  16. package/dist/infra/process-runner-node.d.ts +2 -0
  17. package/dist/infra/sheetjs-adapter.d.ts +9 -0
  18. package/dist/infra/turndown-adapter.d.ts +4 -0
  19. package/dist/presenter/output-text.d.ts +2 -0
  20. package/dist/presenter/output.d.ts +4 -2
  21. package/dist/use-cases/commands/build-command.d.ts +46 -2
  22. package/dist/use-cases/commands/command-types.d.ts +115 -1
  23. package/dist/use-cases/commands/convert-mail-attachment-to-markdown.d.ts +11 -0
  24. package/dist/use-cases/commands/convert-mail-attachment-to-pdf.d.ts +11 -0
  25. package/dist/use-cases/commands/convert-mail-to-markdown.d.ts +10 -0
  26. package/dist/use-cases/commands/docs-render.d.ts +31 -0
  27. package/dist/use-cases/commands/docs.d.ts +10 -0
  28. package/dist/use-cases/commands/docx-to-markdown.d.ts +11 -0
  29. package/dist/use-cases/commands/download-drive-item-as-markdown.d.ts +11 -0
  30. package/dist/use-cases/commands/download-drive-item-as-pdf.d.ts +11 -0
  31. package/dist/use-cases/commands/download-drive-item-version-as-markdown.d.ts +12 -0
  32. package/dist/use-cases/commands/download-drive-item-version-as-pdf.d.ts +12 -0
  33. package/dist/use-cases/commands/download-drive-item-version-content.d.ts +12 -0
  34. package/dist/use-cases/commands/download-onedrive-file-content.d.ts +5 -3
  35. package/dist/use-cases/commands/embedded-item-to-markdown.d.ts +59 -0
  36. package/dist/use-cases/commands/excel-error.d.ts +6 -0
  37. package/dist/use-cases/commands/extract-sharepoint-links-in-mail.d.ts +26 -0
  38. package/dist/use-cases/commands/fetch-raw-bytes.d.ts +56 -0
  39. package/dist/use-cases/commands/format-zod-error.d.ts +14 -0
  40. package/dist/use-cases/commands/get-calendar-event.d.ts +4 -6
  41. package/dist/use-cases/commands/get-calendar-view.d.ts +4 -4
  42. package/dist/use-cases/commands/get-channel-files-folder.d.ts +4 -7
  43. package/dist/use-cases/commands/get-chat.d.ts +3 -1
  44. package/dist/use-cases/commands/get-current-user.d.ts +4 -4
  45. package/dist/use-cases/commands/get-drive-delta.d.ts +4 -7
  46. package/dist/use-cases/commands/get-drive-item-analytics.d.ts +9 -0
  47. package/dist/use-cases/commands/get-drive-item-created-by-user.d.ts +4 -0
  48. package/dist/use-cases/commands/get-drive-item-last-modified-by-user.d.ts +4 -0
  49. package/dist/use-cases/commands/get-drive-item-list-item.d.ts +4 -0
  50. package/dist/use-cases/commands/get-drive-item.d.ts +4 -7
  51. package/dist/use-cases/commands/get-drive-root-delta.d.ts +4 -0
  52. package/dist/use-cases/commands/get-drive-root-item.d.ts +4 -6
  53. package/dist/use-cases/commands/get-drive-special-folder.d.ts +4 -0
  54. package/dist/use-cases/commands/get-excel-range.d.ts +4 -2
  55. package/dist/use-cases/commands/get-excel-table.d.ts +4 -2
  56. package/dist/use-cases/commands/get-excel-used-range.d.ts +10 -0
  57. package/dist/use-cases/commands/get-group-calendar-view.d.ts +4 -0
  58. package/dist/use-cases/commands/get-group.d.ts +4 -0
  59. package/dist/use-cases/commands/get-mail-attachment.d.ts +6 -2
  60. package/dist/use-cases/commands/get-mail-message-mime.d.ts +8 -0
  61. package/dist/use-cases/commands/get-mail-message.d.ts +4 -6
  62. package/dist/use-cases/commands/get-mail-rule.d.ts +9 -0
  63. package/dist/use-cases/commands/get-mailbox-settings.d.ts +4 -2
  64. package/dist/use-cases/commands/get-my-calendar.d.ts +4 -0
  65. package/dist/use-cases/commands/get-my-manager.d.ts +9 -0
  66. package/dist/use-cases/commands/get-my-profile-photo.d.ts +6 -2
  67. package/dist/use-cases/commands/get-onenote-page-as-markdown.d.ts +10 -0
  68. package/dist/use-cases/commands/get-onenote-page-content.d.ts +6 -2
  69. package/dist/use-cases/commands/get-organization.d.ts +4 -0
  70. package/dist/use-cases/commands/get-planner-bucket.d.ts +3 -1
  71. package/dist/use-cases/commands/get-planner-plan.d.ts +3 -1
  72. package/dist/use-cases/commands/get-planner-task-details.d.ts +3 -1
  73. package/dist/use-cases/commands/get-planner-task.d.ts +3 -1
  74. package/dist/use-cases/commands/get-shared-calendar-view.d.ts +4 -0
  75. package/dist/use-cases/commands/get-shared-mailbox-message.d.ts +4 -0
  76. package/dist/use-cases/commands/get-sharepoint-list-column.d.ts +4 -0
  77. package/dist/use-cases/commands/get-sharepoint-site-by-path.d.ts +4 -2
  78. package/dist/use-cases/commands/get-sharepoint-site-drive-by-id.d.ts +4 -7
  79. package/dist/use-cases/commands/get-sharepoint-site-list-item.d.ts +4 -8
  80. package/dist/use-cases/commands/get-sharepoint-site-list.d.ts +4 -7
  81. package/dist/use-cases/commands/{list-sharepoint-site-items.d.ts → get-sharepoint-site-onenote-page-content.d.ts} +4 -1
  82. package/dist/use-cases/commands/get-sharepoint-site.d.ts +4 -6
  83. package/dist/use-cases/commands/{get-sharepoint-site-item.d.ts → get-site-analytics.d.ts} +3 -2
  84. package/dist/use-cases/commands/get-specific-calendar-event.d.ts +4 -7
  85. package/dist/use-cases/commands/get-specific-calendar-view.d.ts +4 -6
  86. package/dist/use-cases/commands/get-team-channel.d.ts +5 -7
  87. package/dist/use-cases/commands/get-team-primary-channel.d.ts +4 -0
  88. package/dist/use-cases/commands/get-team.d.ts +4 -6
  89. package/dist/use-cases/commands/get-todo-task.d.ts +4 -7
  90. package/dist/use-cases/commands/get-user-manager.d.ts +10 -0
  91. package/dist/use-cases/commands/graph-scopes.d.ts +29 -0
  92. package/dist/use-cases/commands/inline-image-embedder.d.ts +20 -0
  93. package/dist/use-cases/commands/list-all-onenote-sections.d.ts +4 -4
  94. package/dist/use-cases/commands/list-calendar-event-instances.d.ts +5 -7
  95. package/dist/use-cases/commands/list-calendar-events-delta.d.ts +7 -3
  96. package/dist/use-cases/commands/list-calendar-events.d.ts +4 -4
  97. package/dist/use-cases/commands/list-calendar-group-calendars.d.ts +4 -0
  98. package/dist/use-cases/commands/list-calendar-groups.d.ts +4 -0
  99. package/dist/use-cases/commands/list-calendar-view-delta.d.ts +9 -3
  100. package/dist/use-cases/commands/list-calendars.d.ts +4 -4
  101. package/dist/use-cases/commands/list-chat-members.d.ts +5 -6
  102. package/dist/use-cases/commands/list-chats.d.ts +4 -4
  103. package/dist/use-cases/commands/list-conversation-messages.d.ts +12 -0
  104. package/dist/use-cases/commands/list-drive-item-permissions.d.ts +4 -7
  105. package/dist/use-cases/commands/list-drive-item-thumbnails.d.ts +4 -0
  106. package/dist/use-cases/commands/list-drive-item-versions.d.ts +4 -7
  107. package/dist/use-cases/commands/list-drives.d.ts +4 -4
  108. package/dist/use-cases/commands/list-excel-comments.d.ts +5 -0
  109. package/dist/use-cases/commands/list-excel-defined-names.d.ts +5 -0
  110. package/dist/use-cases/commands/list-excel-table-rows.d.ts +5 -8
  111. package/dist/use-cases/commands/list-excel-tables.d.ts +5 -7
  112. package/dist/use-cases/commands/list-excel-worksheet-charts.d.ts +5 -0
  113. package/dist/use-cases/commands/list-excel-worksheet-pivot-tables.d.ts +5 -0
  114. package/dist/use-cases/commands/list-excel-worksheets.d.ts +5 -7
  115. package/dist/use-cases/commands/list-focused-inbox-overrides.d.ts +4 -0
  116. package/dist/use-cases/commands/list-folder-files.d.ts +4 -7
  117. package/dist/use-cases/commands/list-followed-drive-items.d.ts +4 -0
  118. package/dist/use-cases/commands/list-group-conversations.d.ts +4 -0
  119. package/dist/use-cases/commands/list-group-events.d.ts +4 -0
  120. package/dist/use-cases/commands/list-group-members.d.ts +4 -0
  121. package/dist/use-cases/commands/list-group-owners.d.ts +4 -0
  122. package/dist/use-cases/commands/list-group-threads.d.ts +4 -0
  123. package/dist/use-cases/commands/list-groups.d.ts +4 -0
  124. package/dist/use-cases/commands/list-incomplete-planner-tasks.d.ts +13 -0
  125. package/dist/use-cases/commands/list-incomplete-todo-tasks.d.ts +14 -0
  126. package/dist/use-cases/commands/list-joined-teams.d.ts +3 -1
  127. package/dist/use-cases/commands/list-mail-attachments.d.ts +10 -2
  128. package/dist/use-cases/commands/list-mail-child-folders.d.ts +4 -6
  129. package/dist/use-cases/commands/list-mail-folder-messages-delta.d.ts +4 -0
  130. package/dist/use-cases/commands/list-mail-folder-messages.d.ts +4 -6
  131. package/dist/use-cases/commands/{get-sharepoint-sites-delta.d.ts → list-mail-folders-delta.d.ts} +3 -1
  132. package/dist/use-cases/commands/list-mail-folders.d.ts +4 -4
  133. package/dist/use-cases/commands/list-mail-messages.d.ts +4 -4
  134. package/dist/use-cases/commands/list-mail-rules.d.ts +4 -2
  135. package/dist/use-cases/commands/list-my-direct-reports.d.ts +13 -0
  136. package/dist/use-cases/commands/list-my-memberships.d.ts +4 -0
  137. package/dist/use-cases/commands/list-my-transitive-memberships.d.ts +4 -0
  138. package/dist/use-cases/commands/list-onenote-notebook-sections.d.ts +4 -6
  139. package/dist/use-cases/commands/list-onenote-notebooks.d.ts +4 -4
  140. package/dist/use-cases/commands/list-onenote-section-pages.d.ts +4 -6
  141. package/dist/use-cases/commands/{list-outlook-contacts.d.ts → list-outlook-categories.d.ts} +3 -1
  142. package/dist/use-cases/commands/list-plan-buckets.d.ts +4 -6
  143. package/dist/use-cases/commands/list-plan-tasks.d.ts +3 -1
  144. package/dist/use-cases/commands/list-planner-plans.d.ts +4 -0
  145. package/dist/use-cases/commands/list-planner-tasks.d.ts +4 -4
  146. package/dist/use-cases/commands/list-recent-files.d.ts +4 -0
  147. package/dist/use-cases/commands/list-recently-used-insights.d.ts +4 -0
  148. package/dist/use-cases/commands/list-relevant-people.d.ts +4 -0
  149. package/dist/use-cases/commands/list-room-lists.d.ts +4 -0
  150. package/dist/use-cases/commands/list-rooms.d.ts +4 -0
  151. package/dist/use-cases/commands/list-sensitivity-labels.d.ts +4 -0
  152. package/dist/use-cases/commands/list-shared-calendar-events.d.ts +4 -0
  153. package/dist/use-cases/commands/list-shared-insights.d.ts +4 -0
  154. package/dist/use-cases/commands/list-shared-mailbox-folder-messages.d.ts +4 -0
  155. package/dist/use-cases/commands/list-shared-mailbox-messages.d.ts +4 -0
  156. package/dist/use-cases/commands/{search-sharepoint-sites.d.ts → list-shared-with-me.d.ts} +3 -1
  157. package/dist/use-cases/commands/list-sharepoint-list-columns.d.ts +4 -0
  158. package/dist/use-cases/commands/list-sharepoint-list-item-versions.d.ts +4 -0
  159. package/dist/use-cases/commands/list-sharepoint-site-drives.d.ts +4 -6
  160. package/dist/use-cases/commands/list-sharepoint-site-list-items.d.ts +4 -7
  161. package/dist/use-cases/commands/list-sharepoint-site-lists.d.ts +9 -2
  162. package/dist/use-cases/commands/list-sharepoint-site-onenote-notebook-sections.d.ts +5 -0
  163. package/dist/use-cases/commands/list-sharepoint-site-onenote-notebooks.d.ts +5 -0
  164. package/dist/use-cases/commands/list-sharepoint-site-onenote-section-pages.d.ts +5 -0
  165. package/dist/use-cases/commands/list-sharepoint-site-pages.d.ts +4 -0
  166. package/dist/use-cases/commands/list-site-columns.d.ts +4 -0
  167. package/dist/use-cases/commands/list-site-content-types.d.ts +4 -0
  168. package/dist/use-cases/commands/list-specific-calendar-events.d.ts +4 -6
  169. package/dist/use-cases/commands/list-team-channels.d.ts +4 -6
  170. package/dist/use-cases/commands/{list-channel-messages.d.ts → list-team-installed-apps.d.ts} +3 -2
  171. package/dist/use-cases/commands/list-todo-linked-resources.d.ts +4 -7
  172. package/dist/use-cases/commands/list-todo-task-lists.d.ts +4 -4
  173. package/dist/use-cases/commands/list-todo-tasks-delta.d.ts +8 -0
  174. package/dist/use-cases/commands/list-todo-tasks.d.ts +10 -2
  175. package/dist/use-cases/commands/list-trending-insights.d.ts +4 -0
  176. package/dist/use-cases/commands/list-user-direct-reports.d.ts +4 -0
  177. package/dist/use-cases/commands/markdown-pipeline.d.ts +23 -0
  178. package/dist/use-cases/commands/microsoft-search-query.d.ts +8 -0
  179. package/dist/use-cases/commands/my-quick-context.d.ts +6 -0
  180. package/dist/use-cases/commands/next-page.d.ts +8 -0
  181. package/dist/use-cases/commands/odata-query.d.ts +90 -0
  182. package/dist/use-cases/commands/office-to-markdown.d.ts +6 -0
  183. package/dist/use-cases/commands/onenote-5k-limit.d.ts +3 -0
  184. package/dist/use-cases/commands/output-path.d.ts +37 -0
  185. package/dist/use-cases/commands/scopes-check.d.ts +6 -0
  186. package/dist/use-cases/commands/search-mail-messages.d.ts +5 -0
  187. package/dist/use-cases/commands/search-my-documents.d.ts +4 -0
  188. package/dist/use-cases/commands/search-onedrive-files.d.ts +4 -9
  189. package/dist/use-cases/commands/search-onenote-pages.d.ts +13 -0
  190. package/dist/use-cases/commands/search-sharepoint-sites-by-name.d.ts +4 -0
  191. package/dist/use-cases/commands/sharepoint-link-extractor.d.ts +14 -0
  192. package/dist/use-cases/commands/text-passthrough.d.ts +24 -0
  193. package/dist/use-cases/commands/update.d.ts +16 -0
  194. package/dist/use-cases/commands/version-id.d.ts +18 -0
  195. package/dist/use-cases/commands/xlsx-to-markdown.d.ts +6 -0
  196. package/dist/use-cases/ports/filesystem.d.ts +8 -0
  197. package/dist/use-cases/ports/process-runner.d.ts +11 -0
  198. package/docs/commands.json +6312 -0
  199. package/package.json +13 -3
  200. package/dist/use-cases/commands/get-channel-message-hosted-content.d.ts +0 -9
  201. package/dist/use-cases/commands/get-channel-message.d.ts +0 -8
  202. package/dist/use-cases/commands/get-chat-message-hosted-content.d.ts +0 -8
  203. package/dist/use-cases/commands/get-chat-message.d.ts +0 -7
  204. package/dist/use-cases/commands/get-outlook-contact.d.ts +0 -6
  205. package/dist/use-cases/commands/list-channel-message-hosted-contents.d.ts +0 -8
  206. package/dist/use-cases/commands/list-channel-message-replies.d.ts +0 -8
  207. package/dist/use-cases/commands/list-channel-tabs.d.ts +0 -7
  208. package/dist/use-cases/commands/list-chat-message-hosted-contents.d.ts +0 -7
  209. package/dist/use-cases/commands/list-chat-message-replies.d.ts +0 -7
  210. package/dist/use-cases/commands/list-chat-messages.d.ts +0 -6
  211. package/dist/use-cases/commands/list-pinned-chat-messages.d.ts +0 -6
  212. package/dist/use-cases/commands/list-team-members.d.ts +0 -6
@@ -0,0 +1,5 @@
1
+ import type { Command, CommandMeta } from './command-types.js';
2
+ declare const execute: Command['execute'];
3
+ declare const schema: import("./command-types.js").CommandSchema;
4
+ declare const meta: CommandMeta;
5
+ export { execute, meta, schema };
@@ -0,0 +1,4 @@
1
+ import type { CommandMeta } from './command-types.js';
2
+ declare const execute: import("./command-types.js").CommandExecute, schema: import("./command-types.js").CommandSchema;
3
+ declare const meta: CommandMeta;
4
+ export { execute, meta, schema };
@@ -1,9 +1,4 @@
1
- import { z } from 'zod';
2
- import type { Result } from '../../domain/result.js';
3
- import type { GraphClient } from '../../infra/graph-client.js';
4
- declare const schema: z.ZodObject<{
5
- driveId: z.ZodString;
6
- query: z.ZodString;
7
- }, z.core.$strip>;
8
- declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, import("../../infra/graph-client.js").GraphError>>;
9
- export { execute, schema };
1
+ import type { CommandMeta } from './command-types.js';
2
+ declare const execute: import("./command-types.js").CommandExecute, schema: import("./command-types.js").CommandSchema;
3
+ declare const meta: CommandMeta;
4
+ export { execute, meta, schema };
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import type { Command, CommandMeta } from './command-types.js';
3
+ declare const schema: z.ZodObject<{
4
+ titleSubstring: z.ZodString;
5
+ select: z.ZodOptional<z.ZodString>;
6
+ top: z.ZodOptional<z.ZodString>;
7
+ skip: z.ZodOptional<z.ZodString>;
8
+ orderby: z.ZodOptional<z.ZodString>;
9
+ expand: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ declare const execute: Command['execute'];
12
+ declare const meta: CommandMeta;
13
+ export { execute, meta, schema };
@@ -0,0 +1,4 @@
1
+ import type { CommandMeta } from './command-types.js';
2
+ declare const execute: import("./command-types.js").CommandExecute, schema: import("./command-types.js").CommandSchema;
3
+ declare const meta: CommandMeta;
4
+ export { execute, meta, schema };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pure helpers for `extract-sharepoint-links-in-mail`.
3
+ *
4
+ * `extractSharepointUrls(htmlBody)` finds every `https://*.sharepoint.com/...`
5
+ * URL inside an HTML mail body — both `<a href=...>` and bare-text
6
+ * occurrences — and returns the deduplicated list.
7
+ *
8
+ * `buildShareToken(url)` encodes a URL for Graph's `/shares/{token}`
9
+ * resolver per [shares-get](https://learn.microsoft.com/en-us/graph/api/shares-get):
10
+ * `u!` + base64url(url) with no padding.
11
+ */
12
+ declare const extractSharepointUrls: (htmlBody: string) => ReadonlyArray<string>;
13
+ declare const buildShareToken: (url: string) => string;
14
+ export { buildShareToken, extractSharepointUrls };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Microsoft Graph's `?format=pdf` / `?format=html` conversion accepts a
3
+ * fixed set of source extensions. For anything outside that whitelist
4
+ * Graph (or its downstream Office Online sandbox) returns a 4xx, which
5
+ * is a cryptic failure mode for an LLM agent.
6
+ *
7
+ * The conversion commands short-circuit on the extensions below and
8
+ * return the raw bytes instead of attempting (and wasting) a Graph
9
+ * round-trip:
10
+ *
11
+ * - PLAIN_TEXT_EXTENSIONS: extensions that are themselves plain text
12
+ * (txt/md/json/yaml/etc.) — turning these through `?format=pdf` or
13
+ * `?format=html` is meaningless; just return the bytes.
14
+ *
15
+ * - `pdf`: the `*-as-pdf` commands ask Graph to convert TO pdf, but
16
+ * `pdf` is NOT in Graph's `format=pdf` source-input list (verified
17
+ * 2026-05 against svc.ms; CDN responds 406 InputFormatNotSupported).
18
+ * The user wanted a PDF and the source IS a PDF, so return its
19
+ * bytes directly.
20
+ */
21
+ declare const PLAIN_TEXT_EXTENSIONS: ReadonlySet<string>;
22
+ declare const isPlainTextFilename: (name: string) => boolean;
23
+ declare const isPdfSource: (name: string) => boolean;
24
+ export { isPdfSource, isPlainTextFilename, PLAIN_TEXT_EXTENSIONS };
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import type { Result } from '../../domain/result.js';
3
+ import type { ProcessRunner } from '../ports/process-runner.js';
4
+ export type UpdateError = {
5
+ type: 'spawn_failed';
6
+ message: string;
7
+ } | {
8
+ type: 'install_failed';
9
+ exitCode: number;
10
+ };
11
+ export type PackageManager = 'npm' | 'bun';
12
+ declare const schema: z.ZodObject<{}, z.core.$strict>;
13
+ declare const execute: (runner: ProcessRunner, manager: PackageManager) => Promise<Result<{
14
+ readonly exitCode: number;
15
+ }, UpdateError>>;
16
+ export { execute, schema };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Graph's historical-version endpoints template `{version-id}` as a string
3
+ * that must look like a stringified float (`"79.0"`, `"4.0"`). An LLM
4
+ * (reasonably) types `79`, and the response is wildly inconsistent across
5
+ * the three sibling commands:
6
+ *
7
+ * - download-drive-item-version-content → `invalidRequest`
8
+ * - download-drive-item-version-as-markdown → `invalidRequest`
9
+ * - download-drive-item-version-as-pdf → accepts (Graph quirk)
10
+ *
11
+ * Audit round-6 §1.4 caught the inconsistency. Normalize at the CLI
12
+ * boundary: a pure-integer version-id gets `.0` appended before path
13
+ * substitution, so all three commands accept both spellings.
14
+ *
15
+ * Already-floated values (`79.0`, `12.5`, `4.1`) and non-numeric values
16
+ * (a bad input the schema will then reject) pass through unchanged.
17
+ */
18
+ export declare const normalizeVersionId: (raw: string) => string;
@@ -0,0 +1,6 @@
1
+ import type { Result } from '../../domain/result.js';
2
+ import type { GraphError } from '../../infra/graph-client.js';
3
+ import type { MarkdownEnvelope } from './docx-to-markdown.js';
4
+ declare const csvToMarkdownTable: (csv: string) => string;
5
+ declare const xlsxToMarkdown: (bytes: Uint8Array) => Result<MarkdownEnvelope, GraphError>;
6
+ export { csvToMarkdownTable, xlsxToMarkdown };
@@ -11,5 +11,13 @@ export type FileSystemError = {
11
11
  export type FileSystem = {
12
12
  readonly readJson: <T>(path: string) => Promise<Result<T, FileSystemError>>;
13
13
  readonly writeText: (path: string, content: string) => Promise<Result<void, FileSystemError>>;
14
+ readonly writeBytes: (path: string, bytes: Uint8Array) => Promise<Result<void, FileSystemError>>;
14
15
  readonly deleteIfExists: (path: string) => Promise<Result<void, FileSystemError>>;
16
+ /**
17
+ * Recursively delete a directory (and all its contents). Used by `logout`
18
+ * to wipe the Playwright persistent browser profile so stale auth cookies
19
+ * don't survive across login attempts. Returns ok even when the
20
+ * directory does not exist — semantics mirror `deleteIfExists`.
21
+ */
22
+ readonly deleteDirIfExists: (path: string) => Promise<Result<void, FileSystemError>>;
15
23
  };
@@ -0,0 +1,11 @@
1
+ import type { Result } from '../../domain/result.js';
2
+ export type ProcessRunnerError = {
3
+ type: 'spawn_failed';
4
+ message: string;
5
+ };
6
+ export type ProcessRunResult = {
7
+ readonly exitCode: number;
8
+ };
9
+ export type ProcessRunner = {
10
+ readonly runInherit: (command: string, args: ReadonlyArray<string>) => Promise<Result<ProcessRunResult, ProcessRunnerError>>;
11
+ };