slidemind 0.1.8 → 0.2.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/CLAUDE.md CHANGED
@@ -52,6 +52,8 @@ The script bumps `package.json` and commits — it does not tag (CI does that).
52
52
 
53
53
  Teammates pick up the release with `npm install -g slidemind@latest` (or `slidemind update` if already installed); pin with `slidemind@X.Y.Z` / `slidemind update --ref X.Y.Z`.
54
54
 
55
+ **The add-in's version floor.** The add-in serves the oldest CLI it still speaks two ways: `minCliVersion` in `/api/cli/capabilities` + `/api/cli/readiness`, and an `x-slidemind-min-cli` header on **every** response of its CLI router. `bridgeFetch`/`bridgeStreamToFile` check that header on each call (so the pane routes — search/read/insert — are covered without a probe), `assertCliVersionSupported` pre-flights render/translate, and `doctor`/`ready` opt out via `setDiagnosticMode(true)` because they report the skew as the `cli_update_required` blocker themselves. The remediation the CLI prints is `slidemind update` → `slidemind@latest`, so **the add-in's floor must never exceed the version published to npm** — raise it only in lockstep with the release that satisfies it, or every paired CLI hard-blocks on an instruction that cannot resolve.
56
+
55
57
  > **One-time GitHub setup:** the workflow uses the default `GITHUB_TOKEN`. If branch-protection rules on `main` block bot pushes, allow the `github-actions[bot]` actor (or relax "require pull request before merging" for that bot).
56
58
 
57
59
  ## Repository layout
@@ -79,6 +81,7 @@ slidemind/
79
81
  ├── src/ implementation of the slidemind CLI
80
82
  │ ├── bridge/ add-in local-bridge: client.mjs, bundle.mjs (materialize), build-and-push.mjs (server render; native-slide splicing), engine-download.mjs + recolor.mjs (image/icon fetch + recolour)
81
83
  │ ├── builders/ build.mjs (HTML preview), review.mjs (spatial preview-review gate + local server; stable per-deck port, graceful fallback, tab reuse across rounds), plan.mjs (plan sign-off gate) + plan-overlay.js + plan-md.mjs (markdown→HTML) + gate-server.mjs (shared gate primitives), resolve-skill.mjs (→ bundle), lint.mjs (runs the add-in's engine)
84
+ │ ├── pptx/ host-free local-.pptx support (fflate-based): read-local.mjs (read a file's slides — output-identical to the host read), slide-swap.mjs (fold a picked slide into a deck as native .pptx — swaps it into the lowest slot the splicer reads, then prunes the package to that slide's dependency closure so a slice carries only what it needs), zip.mjs + ooxml.mjs (shared unzip/order helpers)
82
85
  │ └── installers/ per-harness installers: claude.mjs, codex.mjs, opencode.mjs, lib.mjs
83
86
  ├── archive/ retired code/assets (local exporter, icon library, brand design files) — NOT shipped
84
87
  ├── decks/ the user's working decks; sources are slides/*.jsx, design via .bundle-ref.json
@@ -96,7 +99,7 @@ We **do not** ship separate slash commands. Earlier versions had a top-level `co
96
99
  slidemind ready [deck] # one-shot session start: connection ladder + design resolution + bundle download + deck bind; --to/--force/--connect-only/--json (HOST REQUIRED)
97
100
  slidemind doctor # read-only connection diagnostics (ordered next-action ladder; does NOT materialize or bind — `ready` is the preflight)
98
101
  slidemind presentations # list PowerPoint windows registered with the add-in
99
- slidemind read [presId] # pull the current content of an open presentation (--mode summary|raw) (HOST REQUIRED)
102
+ slidemind read [presId|file.pptx] # pull an open presentation's content (presId; HOST REQUIRED) OR read a local .pptx on disk (file path; host-free) — same per-slide output (--mode summary|raw)
100
103
  slidemind download-bundle [deck] # materialize the active corporate design's bundle locally
101
104
  slidemind new <name> # scaffold ./decks/<name>/ (auto-binds to the open design when unambiguous + bundle already materialized; --to/--no-bind)
102
105
  slidemind plan <deck> # plan sign-off gate on <deck>/plan.md; markdown editor + live preview + overall feedback, blocks for approve/comments (host-free)
@@ -108,7 +111,8 @@ slidemind push <deck> # render + push slides into a running PowerPo
108
111
  slidemind ls engines # list the live engine catalog (image + slide; --type/--subtype) (HOST REQUIRED)
109
112
  slidemind search "<query>" # search an engine for imagery or slides (--engine/--intent/--top) (HOST REQUIRED)
110
113
  slidemind insert-slide [opts] # reuse found slide(s) live into a window (--search/--pick/--to/--at) (HOST REQUIRED)
111
- slidemind add-slide [opts] # fold found slide(s) into a deck as native .pptx (--search/--pick/--deck/--to/--at) (HOST REQUIRED)
114
+ slidemind imagen "<prompt>" [opts] # generate ONE image via the add-in's image model into <deck>/assets/ (--deck/--out/--size/--quality/--brand-style; paired backend, pane-free)
115
+ slidemind add-slide [opts] # fold slide(s) into a deck as native .pptx — from an engine (--search/--pick/--deck/--to/--at; HOST REQUIRED) or a local file (--from <file.pptx>/--pick/--deck/--at; host-free, mutually exclusive with --search)
112
116
  slidemind pair <code> # pair with an add-in environment (copy from its "Connect CLI")
113
117
  slidemind whoami # list every paired environment (* = default)
114
118
  slidemind use <url|env> # set the default environment
@@ -127,10 +131,10 @@ slidemind uninstall --for <target> # remove the skill (also clears the bundle
127
131
 
128
132
  The corporate design is **served by the add-in, not shipped by the CLI.** `slidemind download-bundle` materializes it (keyed by the deck's `.bundle-ref.json`) into `${XDG_CACHE_HOME:-~/.cache}/slidemind/bundles/<presFP>/`:
129
133
 
130
- - `design.md` — the **single source of brand rules** (tokens, type scale, layout palette, the authoring contract, and a `### Brand Image Sources` block). **Read it; never restate it.**
134
+ - `design.md` — the **single source of brand rules** (tokens, type scale, layout palette, the authoring contract). **Read it; never restate it.**
131
135
  - `corporate-design.css` — the design tokens to link/inline and compose with token classes.
132
136
  - `layouts/*.jsx` + `layouts/layouts.css` — the closed layout palette to compose against.
133
- - `assets/`, `engines.json` — brand assets and the searchable image/icon engines.
137
+ - `assets/` — brand assets. (Engine discovery is **live-only** via `slidemind ls engines` — new backends no longer ship an engine list on the bundle wire; `engines.json` is still written for older backends but is `[]` going forward.)
134
138
 
135
139
  Both skills are **brand-agnostic workflow guidance** and must not duplicate any brand rule — `scripts/check-skill-parity.mjs` (`npm run lint:parity`) scans **every** `skills/<name>/SKILL.md` and fails the build if a hardcoded color, design token, or layout name leaks into any skill doc.
136
140
 
@@ -154,11 +158,11 @@ slidemind review <deck> # spatial preview-review gate; blocks until ap
154
158
  slidemind build-pptx <deck> # native PPTX rendered server-side via the add-in (host required)
155
159
  slidemind view-draft <deck> # per-slide PNG draft preview, no push/no .pptx — the agent's look-before-review self-check (host-free once the bundle is cached)
156
160
  slidemind push <deck> # render + push into a running PowerPoint (host required)
157
- slidemind read [presId] # pull current content of an open presentation (--mode summary|raw) (host required)
161
+ slidemind read [presId|file.pptx] # pull current content of an open presentation (presId; host required) OR read a local .pptx (file path; host-free) (--mode summary|raw)
158
162
  slidemind ls engines # list the live engine catalog (image + slide) (host required)
159
163
  slidemind search "<query>" # search an engine for imagery or slides (host required)
160
164
  slidemind insert-slide [opts] # reuse found slide(s) live into a window (host required)
161
- slidemind add-slide [opts] # fold found slide(s) into a deck as native .pptx (host required)
165
+ slidemind add-slide [opts] # fold slide(s) into a deck as native .pptx — engine (--search; host required) or local file (--from <file.pptx>; host-free)
162
166
  npm run lint:parity # assert EVERY skill (create-slides + search) carries no brand rules (CI guard)
163
167
  ```
164
168
 
package/README.md CHANGED
@@ -49,7 +49,7 @@ Both drive the same add-in bridge, so an agent and a human end up producing the
49
49
 
50
50
  The CLI reaches PowerPoint through the add-in's **cloud relay** (no localhost, no certificates). Because of that, the machine running the CLI **does not have to be the same machine running PowerPoint** — pair once and commands route to wherever your add-in is registered.
51
51
 
52
- Commands that read the design, render, push, or reach an engine (`ready`, `download-bundle`, `build-pptx`, `push`, `ls engines`, `search`, `insert-slide`, `add-slide`) **require an open PowerPoint host with the add-in and an active corporate design.** `build`, `review`, and `view-draft` work fully offline against a previously materialized bundle. `new` scaffolds offline too; when you're paired and a design is open it also best-effort binds the new deck (otherwise it just scaffolds and hints to run `slidemind ready <slug>`).
52
+ Commands that read the design, render, push, or reach an engine (`ready`, `download-bundle`, `build-pptx`, `push`, `ls engines`, `search`, `insert-slide`, `add-slide`) **require an open PowerPoint host with the add-in and an active corporate design.** `build`, `review`, and `view-draft` work fully offline against a previously materialized bundle. Reading a local PowerPoint file (`read <file.pptx>`) or folding a slide from one into a deck (`add-slide --from <file.pptx>`) is host-free too — no PowerPoint, no pairing, no bundle needed. `new` scaffolds offline too; when you're paired and a design is open it also best-effort binds the new deck (otherwise it just scaffolds and hints to run `slidemind ready <slug>`).
53
53
 
54
54
  ---
55
55
 
@@ -100,7 +100,18 @@ The global install lands in `%APPDATA%\npm`, which the Node installer puts on yo
100
100
  slidemind --version
101
101
  ```
102
102
 
103
- If `npm install -g` fails with `EACCES`, you've hit a permissions issue with a system-owned npm prefix — the cleanest fix is a user-owned Node from [Homebrew](https://brew.sh) or [nvm](https://github.com/nvm-sh/nvm) (avoid `sudo npm`). Credentials are stored under `~/.config/slidemind/`.
103
+ If `npm install -g` fails with `EACCES` on `/usr/local/lib/node_modules`, you've hit a permissions issue with the official macOS Node installer: npm's global package directory is system-owned. Avoid `sudo npm`; it can leave root-owned files in npm's cache and makes later updates brittle. Either install a user-owned Node with [Homebrew](https://brew.sh) or [nvm](https://github.com/nvm-sh/nvm), or move npm's global prefix into your home directory:
104
+
105
+ ```bash
106
+ mkdir -p ~/.npm-global
107
+ npm config set prefix ~/.npm-global
108
+ echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
109
+ source ~/.zshrc
110
+ npm install -g slidemind
111
+ slidemind init --for all
112
+ ```
113
+
114
+ Credentials are stored under `~/.config/slidemind/`.
104
115
 
105
116
  ### Linux
106
117
 
@@ -161,11 +172,11 @@ slidemind build my-deck # build a self-contained HTML preview (offline
161
172
  slidemind review my-deck # spatial preview review: leave comments / approve in the browser (offline)
162
173
  slidemind build-pptx my-deck # render a native .pptx via the add-in (host required)
163
174
  slidemind push my-deck # stream slides straight into an open PowerPoint (host required)
164
- slidemind read <presId> # pull the current content of an open presentation (host required)
175
+ slidemind read <presId|file.pptx> # read an open presentation (host required) or a local .pptx on disk (host-free)
165
176
  slidemind ls engines # list the active design's image + slide engines (host required)
166
177
  slidemind search "shield" # search an engine for imagery or slides (host required)
167
178
  slidemind insert-slide ... # reuse a found slide live into an open PowerPoint (host required)
168
- slidemind add-slide ... # fold a found slide into a deck as a native .pptx (host required)
179
+ slidemind add-slide ... # fold a found slide — or one from a local .pptx (--from, host-free) — into a deck as a native .pptx
169
180
  ```
170
181
 
171
182
  `slidemind ready` is the one command to run at the start of a session — it verifies the connection, resolves whichever corporate design the add-in has open, and downloads its bundle in a single call, printing exactly one next step if anything's missing. Continuing an existing deck? `slidemind ready <deck>` also binds the deck to that design.
@@ -211,13 +222,14 @@ slidemind view-slide [opts] Fetch a slide result's preview image to a file
211
222
  --search <id> --pick <n> --to <presId> [--out <dir>]
212
223
  slidemind insert-slide [opts] Insert reused slide results live into a window (host required)
213
224
  --search <id> --pick <n[,n,...]> --to <presId> [--at <N>]
214
- slidemind add-slide [opts] Fold reused slide results into a deck as native .pptx (host required)
225
+ slidemind add-slide [opts] Fold slide(s) into a deck as native .pptx — from an engine (host required) or a local file (host-free)
215
226
  --search <id> --pick <n[,n,...]> --deck <deck> [--to <presId>] [--at <N>]
227
+ --from <file.pptx> --pick <n[,n,...]> --deck <deck> [--at <N>] (local file; host-free; not with --search)
216
228
  slidemind download-result [opts] Download image/icon result(s) into a deck's assets/ (host required)
217
229
  --search <id> --pick <n[,n,...]> --deck <deck> --to <presId> [--icon-color <hex[,hex,...]>]
218
230
  slidemind download-bundle [deck] Materialize the active corporate design locally (host required; lower-level — `ready` covers this)
219
231
  slidemind presentations List PowerPoint windows registered with the add-in
220
- slidemind read [presId] Pull the current content of an open presentation (host required)
232
+ slidemind read [presId|file.pptx] Read an open presentation (presId; host required) or a local .pptx on disk (file path; host-free)
221
233
  --mode summary|raw (default raw) [--to <presId>] [--json]
222
234
  slidemind pair <code> Pair with an add-in (copy the code from "Connect CLI")
223
235
  slidemind whoami Show paired environment(s)
@@ -308,7 +320,7 @@ Equivalently: `npm install -g slidemind@latest && slidemind init --for all`.
308
320
  | `slidemind presentations` is empty right after pairing (PowerPoint + add-in already open) | The just-paired task pane never registered. **Restart the add-in** — close the slidemind task pane and reopen it from the ribbon (or reopen the presentation). The pairing wizard doesn't prompt for this. |
309
321
  | `Not paired` | In the add-in, open **Settings → General → Connect CLI**, press **Pair**, and run the shown `slidemind pair <code>`. Codes are one-time and expire — generate a fresh one if it's stale. |
310
322
  | `build-pptx` / `push` / `search` error about no host | These require an open PowerPoint host with an active corporate design. `slidemind build` (HTML) is the only fully-offline preview. |
311
- | `EACCES` on `npm install -g` (macOS/Linux) | Don't `sudo npm`. Use a user-owned Node via [nvm](https://github.com/nvm-sh/nvm) or Homebrew, or set a user-writable npm prefix. |
323
+ | `EACCES` on `npm install -g` (macOS/Linux) | Don't `sudo npm`. Use a user-owned Node via [nvm](https://github.com/nvm-sh/nvm) or Homebrew, or run `mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global`, add `~/.npm-global/bin` to `PATH`, then retry. |
312
324
 
313
325
  ---
314
326