ask-marcel-office-cli 2.0.0 → 2.1.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.
- package/CHANGELOG.md +66 -0
- package/README.md +7 -6
- package/dist/cli.js +785 -604
- package/dist/commands.json +75 -22
- package/dist/index.js +723 -576
- package/dist/infra/auth.d.ts +31 -1
- package/dist/infra/browser-auth.d.ts +3 -1
- package/dist/infra/graph-client.d.ts +26 -0
- package/dist/use-cases/commands/convert-local-file.d.ts +4 -0
- package/dist/use-cases/commands/create-forward-draft.d.ts +12 -0
- package/dist/use-cases/commands/create-reply-draft.d.ts +0 -4
- package/dist/use-cases/commands/image-extraction.d.ts +2 -1
- package/dist/use-cases/commands/login-status.d.ts +31 -0
- package/dist/use-cases/commands/login.d.ts +3 -1
- package/dist/use-cases/commands/parse-recipients.d.ts +14 -0
- package/dist/use-cases/commands/zip-archive-to-markdown.d.ts +3 -1
- package/docs/COMMANDS.md +5 -4
- package/docs/USAGE.md +1 -1
- package/package.json +1 -1
package/dist/commands.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "ask-marcel-office-cli",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"generatedAt": "2026-07-
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"generatedAt": "2026-07-13T10:43:42.181Z",
|
|
5
5
|
"commands": [
|
|
6
6
|
{
|
|
7
7
|
"name": "convert-calendar-event-attachment-to-markdown",
|
|
@@ -143,6 +143,19 @@
|
|
|
143
143
|
]
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"name": "include-images",
|
|
148
|
+
"key": "includeImages",
|
|
149
|
+
"required": false,
|
|
150
|
+
"description": "Pass `--include-images true` (a `.zip` only) to also extract each archive entry’s embedded images (docx/xlsx/pptx OOXML media parts, pdf page images) — every entry gains an `images: [{ path, contentType, sizeBytes, base64 }]` array (the same shape `extract-*-images` returns). Best-effort: an entry that carries no extractable images has no `images` key. Default `false`. Lets a caller OCR a secret pasted as a screenshot inside a zipped document.",
|
|
151
|
+
"argumentHint": {
|
|
152
|
+
"kind": "magicValue",
|
|
153
|
+
"values": [
|
|
154
|
+
"true",
|
|
155
|
+
"false"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
146
159
|
{
|
|
147
160
|
"name": "max-cells",
|
|
148
161
|
"key": "maxCells",
|
|
@@ -151,7 +164,7 @@
|
|
|
151
164
|
}
|
|
152
165
|
],
|
|
153
166
|
"example": "ask-marcel-office convert-local-file --path ./report.docx",
|
|
154
|
-
"responseShape": "`{ contentType: \"text/markdown\" | \"text/plain\", size, text }` for a single file; `{ count, files: [{ path, contentType, size, text } | { path, note }] }` for a `.zip` (one entry per contained file, unsupported entries noted). A missing file returns api_error 404 with the path. Pair with the global `--output-path` to land the markdown on disk.",
|
|
167
|
+
"responseShape": "`{ contentType: \"text/markdown\" | \"text/plain\", size, text }` for a single file; `{ count, files: [{ path, contentType, size, text } | { path, note }] }` for a `.zip` (one entry per contained file, unsupported entries noted). With `--include-images true` each `.zip` entry also carries `images: [{ path, contentType, sizeBytes, base64 }]` when it has extractable embedded images. A missing file returns api_error 404 with the path. Pair with the global `--output-path` to land the markdown on disk.",
|
|
155
168
|
"producesBytes": true
|
|
156
169
|
},
|
|
157
170
|
{
|
|
@@ -298,6 +311,59 @@
|
|
|
298
311
|
"responseShape": "`{ contentType: \"text/markdown\", size, text, note? }` — headers + turndown-rendered body + (when present) a file-attachments list. The optional `note` carries a partial-success hint when the attachments-metadata fetch fails after the body succeeded, and/or a flag that a quoted reply chain was stripped (use `--keep-quoted true` to include it).",
|
|
299
312
|
"producesBytes": true
|
|
300
313
|
},
|
|
314
|
+
{
|
|
315
|
+
"name": "create-forward-draft",
|
|
316
|
+
"summary": "Create an UNSENT forward draft of an existing message. POST /me/messages/{id}/createForward mints the draft (FW: subject, quoted original) with your comment placed above the quote and the recipients set, in one call. Redirects a thread to the right owner without leaving the CLI. The draft is saved in Drafts and can be reviewed, edited, and sent from any Outlook client; the CLI still cannot send.",
|
|
317
|
+
"category": "mail",
|
|
318
|
+
"graphMethod": "POST",
|
|
319
|
+
"graphPathTemplate": "/me/messages/{forward-message-id}/createForward (+ optional body-free PATCH for cc / subject)",
|
|
320
|
+
"graphDocsUrl": "https://learn.microsoft.com/en-us/graph/api/message-createforward",
|
|
321
|
+
"options": [
|
|
322
|
+
{
|
|
323
|
+
"name": "forward-message-id",
|
|
324
|
+
"key": "forwardMessageId",
|
|
325
|
+
"required": true,
|
|
326
|
+
"aliases": [
|
|
327
|
+
{
|
|
328
|
+
"name": "id",
|
|
329
|
+
"key": "id"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"description": "The message being forwarded. Source from list-mail-folder-messages or search-mail-messages. Accepts `--id` as an alias.",
|
|
333
|
+
"argumentHint": {
|
|
334
|
+
"kind": "idOrName"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "to-recipients",
|
|
339
|
+
"key": "toRecipients",
|
|
340
|
+
"required": true,
|
|
341
|
+
"description": "Comma-separated list of recipient email addresses to forward to (e.g. \"alice@example.com,bob@example.com\"). Required: a forward without a recipient is not actionable."
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "cc-recipients",
|
|
345
|
+
"key": "ccRecipients",
|
|
346
|
+
"required": false,
|
|
347
|
+
"description": "Comma-separated list of CC recipient email addresses."
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "body-content",
|
|
351
|
+
"key": "bodyContent",
|
|
352
|
+
"required": true,
|
|
353
|
+
"description": "The comment text, placed above the quoted forwarded message by Graph."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "subject",
|
|
357
|
+
"key": "subject",
|
|
358
|
+
"required": false,
|
|
359
|
+
"description": "Optional subject override. Omit to keep the inherited \"FW: ...\" subject."
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"example": "ask-marcel-office create-forward-draft --forward-message-id \"AAMkAD...\" --to-recipients \"bob@example.com\" --body-content \"Bob owns this now, forwarding for your action.\"",
|
|
363
|
+
"responseShape": "The updated draft message object (or `{ ok: true }` when Graph answers 204): `{ id, subject, body, toRecipients, ccRecipients, isDraft: true, … }`. The `id` is the draft - update further with update-mail-draft, or open Outlook Drafts to review and send.",
|
|
364
|
+
"bodyTemplate": "POST { comment: '{body-content}', toRecipients: '{to-recipients}' } then optional PATCH { ccRecipients?: '{cc-recipients}', subject?: '{subject}' }",
|
|
365
|
+
"mutates": true
|
|
366
|
+
},
|
|
301
367
|
{
|
|
302
368
|
"name": "create-mail-draft",
|
|
303
369
|
"summary": "Create a new mail draft. POST /me/messages (or /me/mailFolders/{id}/messages when --mail-folder-id is set). The draft is saved in the Drafts folder (or the specified folder) and can be sent later via the Outlook client or Graph sendMail. Recipients are comma-separated email addresses. Returns the created message object with its id — use this id with update-mail-draft to modify the draft before sending.",
|
|
@@ -380,10 +446,10 @@
|
|
|
380
446
|
},
|
|
381
447
|
{
|
|
382
448
|
"name": "create-reply-draft",
|
|
383
|
-
"summary": "Create an UNSENT reply-all draft threaded on an existing message. POST /me/messages/{id}/createReplyAll mints the draft (inherited recipients, RE: subject, quoted history)
|
|
449
|
+
"summary": "Create an UNSENT reply-all draft threaded on an existing message. POST /me/messages/{id}/createReplyAll mints the draft (inherited recipients, RE: subject, quoted history) with your reply text placed above the quote, in one call. Reply-all by design - dropping recipients is a deliberate act for the human in Outlook, not a default. The draft is saved in Drafts and can be reviewed, edited, and sent from any Outlook client; the CLI still cannot send.",
|
|
384
450
|
"category": "mail",
|
|
385
451
|
"graphMethod": "POST",
|
|
386
|
-
"graphPathTemplate": "/me/messages/{reply-to-message-id}/createReplyAll (
|
|
452
|
+
"graphPathTemplate": "/me/messages/{reply-to-message-id}/createReplyAll (+ optional body-free PATCH for subject)",
|
|
387
453
|
"graphDocsUrl": "https://learn.microsoft.com/en-us/graph/api/message-createreplyall",
|
|
388
454
|
"options": [
|
|
389
455
|
{
|
|
@@ -405,20 +471,7 @@
|
|
|
405
471
|
"name": "body-content",
|
|
406
472
|
"key": "bodyContent",
|
|
407
473
|
"required": true,
|
|
408
|
-
"description": "The reply text, placed above the quoted history
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"name": "body-content-type",
|
|
412
|
-
"key": "bodyContentType",
|
|
413
|
-
"required": false,
|
|
414
|
-
"description": "Reply body format: Text (default) or HTML.",
|
|
415
|
-
"argumentHint": {
|
|
416
|
-
"kind": "magicValue",
|
|
417
|
-
"values": [
|
|
418
|
-
"Text",
|
|
419
|
-
"HTML"
|
|
420
|
-
]
|
|
421
|
-
}
|
|
474
|
+
"description": "The reply text, placed above the quoted history by Graph."
|
|
422
475
|
},
|
|
423
476
|
{
|
|
424
477
|
"name": "subject",
|
|
@@ -429,7 +482,7 @@
|
|
|
429
482
|
],
|
|
430
483
|
"example": "ask-marcel-office create-reply-draft --reply-to-message-id \"AAMkAD...\" --body-content \"Confirmed for Concur, aligned with the group choice.\"",
|
|
431
484
|
"responseShape": "The updated draft message object (or `{ ok: true }` when Graph answers 204): `{ id, subject, body, toRecipients, ccRecipients, isDraft: true, … }`. The `id` is the draft - update further with update-mail-draft, or open Outlook Drafts to review and send.",
|
|
432
|
-
"bodyTemplate": "POST {
|
|
485
|
+
"bodyTemplate": "POST { comment: '{body-content}' } then optional PATCH { subject?: '{subject}' }",
|
|
433
486
|
"mutates": true
|
|
434
487
|
},
|
|
435
488
|
{
|
|
@@ -7386,14 +7439,14 @@
|
|
|
7386
7439
|
},
|
|
7387
7440
|
{
|
|
7388
7441
|
"name": "scopes-check",
|
|
7389
|
-
"summary": "Decode the cached Teams web client access token and return its scopes, audience, and expiry without making a Graph call. Use this as a self-test before running a command an LLM expects to fail with `accessDenied` — if the required scope isn't in the returned list, the call will reject regardless of tenant config. Each command's `scopesRequired` field in `help-json` lists the scopes that command needs; intersect with the array returned here for a pre-flight check (pipe both through `jq` and diff). The `expiresInSeconds` field
|
|
7442
|
+
"summary": "Decode the cached Teams web client access token and return its scopes, audience, and expiry without making a Graph call. Use this as a self-test before running a command an LLM expects to fail with `accessDenied` — if the required scope isn't in the returned list, the call will reject regardless of tenant config. Each command's `scopesRequired` field in `help-json` lists the scopes that command needs; intersect with the array returned here for a pre-flight check (pipe both through `jq` and diff). The `expiresInSeconds` field lets an LLM decide pre-emptively to `login` again — typically worth doing under ~5 minutes (300 s) so a long-running session doesn't hit the wall mid-command. The `elevated` block reports whether the *separate* M365ChatClient-elevated token (needed by the historical-version download / convert commands) is cached and still usable — so a fresh process can pre-flight `deep-scan`-style workloads instead of discovering a 403 mid-run; `available:false` when it is absent, expired, or within the same 5-minute buffer the download path applies. The `chatsvcagg` and `ic3` blocks report the two Teams-chat substrate tokens (used by `list-teams-chat*` / `find-chats-with-user`) the same way; both self-heal from the shared refresh token, so they are informational rather than a preflight gate.",
|
|
7390
7443
|
"category": "meta",
|
|
7391
7444
|
"graphMethod": "GET",
|
|
7392
7445
|
"graphPathTemplate": "(meta) cached-token introspection — no Graph endpoint",
|
|
7393
7446
|
"graphDocsUrl": "https://learn.microsoft.com/en-us/graph/permissions-reference",
|
|
7394
7447
|
"options": [],
|
|
7395
7448
|
"example": "ask-marcel-office scopes-check",
|
|
7396
|
-
"responseShape": "`{ scopes: string[], audience: string, expiresAt: string (ISO 8601), expiresInSeconds: number }`. `expiresInSeconds` is negative when the cached token has already expired (run `login`); `audience` is the JWT `aud` claim (typically `https://graph.microsoft.com`)."
|
|
7449
|
+
"responseShape": "`{ scopes: string[], audience: string, expiresAt: string (ISO 8601), expiresInSeconds: number, elevated: { available: boolean, expiresInSeconds?: number }, chatsvcagg: { available: boolean, expiresInSeconds?: number }, ic3: { available: boolean, expiresInSeconds?: number } }`. `expiresInSeconds` is negative when the cached token has already expired (run `login`); `audience` is the JWT `aud` claim (typically `https://graph.microsoft.com`). `elevated.available` is `true` only when the cached M365ChatClient-elevated token (used by the historical-version commands) is present and beyond the 5-minute buffer; `elevated.expiresInSeconds` is its raw remaining seconds and is omitted (the key is absent) when no elevated token is cached. `chatsvcagg` and `ic3` are the two Teams-chat substrate tokens, same shape as `elevated`; both self-heal from the shared refresh token, so they are informational rather than a preflight gate."
|
|
7397
7450
|
},
|
|
7398
7451
|
{
|
|
7399
7452
|
"name": "search-all-accessible-sites",
|