@get-technology-inc/jamf-docs-mcp-server 5.9.0 → 5.10.1
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/README.md +99 -0
- package/dist/core/apps/generated/app-html.d.ts +2 -2
- package/dist/core/apps/generated/app-html.d.ts.map +1 -1
- package/dist/core/apps/generated/app-html.js +2 -2
- package/dist/core/apps/generated/app-html.js.map +1 -1
- package/dist/core/apps/index.d.ts +1 -1
- package/dist/core/apps/index.d.ts.map +1 -1
- package/dist/core/apps/index.js +35 -0
- package/dist/core/apps/index.js.map +1 -1
- package/dist/core/services/article-service.d.ts.map +1 -1
- package/dist/core/services/article-service.js +21 -1
- package/dist/core/services/article-service.js.map +1 -1
- package/dist/core/services/cache-key.d.ts +1 -1
- package/dist/core/services/cache-key.js +1 -1
- package/dist/core/services/content-parser.d.ts.map +1 -1
- package/dist/core/services/content-parser.js +74 -0
- package/dist/core/services/content-parser.js.map +1 -1
- package/dist/core/services/ft-internal-link.d.ts +22 -0
- package/dist/core/services/ft-internal-link.d.ts.map +1 -1
- package/dist/core/services/ft-internal-link.js +132 -4
- package/dist/core/services/ft-internal-link.js.map +1 -1
- package/dist/core/tools/glossary-lookup.d.ts.map +1 -1
- package/dist/core/tools/glossary-lookup.js +8 -0
- package/dist/core/tools/glossary-lookup.js.map +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +26 -7
- package/dist/core/tools/search.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -313,6 +313,103 @@ because the URI is content-addressed: a given URI names one exact bundle forever
|
|
|
313
313
|
and a new bundle arrives under a new URI rather than replacing an old one. Hosts
|
|
314
314
|
pick up a changed viewer on their next `tools/list` refresh.
|
|
315
315
|
|
|
316
|
+
### Design
|
|
317
|
+
|
|
318
|
+
The viewer paints no background and owns no colour. It reads the host's theme,
|
|
319
|
+
design tokens and fonts out of `hostContext` (`applyDocumentTheme`,
|
|
320
|
+
`applyHostStyleVariables`, `applyHostFonts`) and builds every rule from those,
|
|
321
|
+
so the panel is a piece of the host's surface rather than a web page embedded in
|
|
322
|
+
one. `app-ui/styles.ts` carries a `:root` fallback for each token, because hosts
|
|
323
|
+
may send any subset of the 76 style variables.
|
|
324
|
+
|
|
325
|
+
Before 5.10 it did the opposite: a hardcoded palette with a
|
|
326
|
+
`prefers-color-scheme` dark block. That media query reports the **operating
|
|
327
|
+
system**, not the host — so a user running Claude in dark mode on a light OS got
|
|
328
|
+
a white slab in a dark conversation, and no tuning of the greys could fix it.
|
|
329
|
+
|
|
330
|
+
### Inline and fullscreen
|
|
331
|
+
|
|
332
|
+
The two display modes render different things, because Claude's
|
|
333
|
+
[design guidelines](https://claude.com/docs/connectors/building/mcp-apps/design-guidelines)
|
|
334
|
+
make them different surfaces. An inline card is a compact summary that fits its
|
|
335
|
+
own content; fullscreen is where a documentation browser lives.
|
|
336
|
+
|
|
337
|
+
| | Inline | Fullscreen |
|
|
338
|
+
| --------------------------------- | ----------------------------- | ---------- |
|
|
339
|
+
| Search hits | 3 | the page |
|
|
340
|
+
| Table-of-contents rows | 8 | the page |
|
|
341
|
+
| Article prose | 3 blocks, stopping before any table or code block | whole |
|
|
342
|
+
| Breadcrumbs, Back, parent link | — | ✓ |
|
|
343
|
+
| Section rail, neighbour list | — | ✓ |
|
|
344
|
+
| Type-ahead filter, paging | — | ✓ |
|
|
345
|
+
| Actions | 1 | as needed |
|
|
346
|
+
|
|
347
|
+
Opening a result from an inline panel sends `ui/request-display-mode` **before**
|
|
348
|
+
the `tools/call`, so the article arrives in the mode built for it. A host that
|
|
349
|
+
declines, or that offers no fullscreen, still gets the article in place.
|
|
350
|
+
|
|
351
|
+
Two documented constraints drive this.
|
|
352
|
+
|
|
353
|
+
**Inline apps must not scroll internally.** On a touch device the conversation
|
|
354
|
+
view owns vertical panning, so a vertical gesture starting inside an inline app
|
|
355
|
+
is handed to the conversation — an internal scroll container does not scroll at
|
|
356
|
+
all, and everything past the host's cap becomes *unreachable* rather than below
|
|
357
|
+
the fold. Bounding what is rendered instead keeps search at ~518px, the table of
|
|
358
|
+
contents at ~373px and an article at ~554px, all fully visible.
|
|
359
|
+
|
|
360
|
+
**Inline apps must not drill in.** "Drill-ins, breadcrumbs, or multiple views"
|
|
361
|
+
are named patterns to avoid, which is why every piece of navigation chrome above
|
|
362
|
+
is fullscreen-only.
|
|
363
|
+
|
|
364
|
+
The article preview is counted in blocks rather than characters. A character
|
|
365
|
+
budget does not predict height: 900 characters of prose is three short
|
|
366
|
+
paragraphs, and 900 characters containing a 22-row settings table is 700px of
|
|
367
|
+
panel.
|
|
368
|
+
|
|
369
|
+
Style variables in `app-ui/styles.ts` are transcribed from the same guidelines.
|
|
370
|
+
|
|
371
|
+
### Article navigation
|
|
372
|
+
|
|
373
|
+
`jamf_docs_get_article` publishes `navigation` — `parent`, `siblings`,
|
|
374
|
+
`children`, and the true totals alongside the (capped) lists.
|
|
375
|
+
|
|
376
|
+
This matters more than it sounds. Fluid Topics serves **one topic per API call**
|
|
377
|
+
while learn.jamf.com concatenates a topic and its children into a single page,
|
|
378
|
+
so every `<h2>` a reader sees on the site is a separate topic here — verified at
|
|
379
|
+
9 of 9 on "Computer Configuration Profiles", whose API payload contains zero
|
|
380
|
+
heading tags of any level. Without `navigation`, a client showing that page has
|
|
381
|
+
the introduction and no route to the nine procedures the page consists of on the
|
|
382
|
+
website. The viewer renders them as *In this section*.
|
|
383
|
+
|
|
384
|
+
It is derived from the map's TOC index, which the breadcrumb lookup already
|
|
385
|
+
fetches and caches, so an article pays no extra request for it.
|
|
386
|
+
|
|
387
|
+
### Developing the viewer
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
npm run dev:app-ui # http://127.0.0.1:5173 — edit app-ui/*.ts, the frame reloads
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
`app-ui/dev/harness.ts` is a local MCP Apps host built on the SDK's `AppBridge`,
|
|
394
|
+
which accepts `Client | null` — a host with no server behind it is a supported
|
|
395
|
+
mode. It speaks the real protocol to the real `App` class and answers
|
|
396
|
+
`tools/call` out of `app-ui/dev/fixtures.json`, real `structuredContent`
|
|
397
|
+
captured from the live tools by `npm run fixtures:app-ui`.
|
|
398
|
+
|
|
399
|
+
It exists because the viewer only runs inside a host, so there is nothing to
|
|
400
|
+
look at without one, and the alternative loop — build, launch the Inspector,
|
|
401
|
+
click through — is tens of seconds per edit. It also does three things no
|
|
402
|
+
inspector can: strip `hostContext.styles` entirely (the check that proves the
|
|
403
|
+
`:root` fallbacks are coherent as a set), resize the container continuously
|
|
404
|
+
across the `@container` breakpoints, and lie about `deviceCapabilities.hover`.
|
|
405
|
+
|
|
406
|
+
Before shipping, run the viewer through the real thing as well — it is the only
|
|
407
|
+
place the actual `ui://` resource, CSP and `_meta` are exercised:
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
npm run build && npm run test:inspector
|
|
411
|
+
```
|
|
412
|
+
|
|
316
413
|
> [!WARNING]
|
|
317
414
|
> **The MCP Apps viewer is broken in 4.0.0 — upgrade past it.** The build step that
|
|
318
415
|
> inlines the UI bundle into the HTML document used a replacement string, so every
|
|
@@ -439,6 +536,8 @@ npm run start:http # HTTP transport mode
|
|
|
439
536
|
|--------|-------------|
|
|
440
537
|
| `npm run build` | Compile TypeScript to `dist/` |
|
|
441
538
|
| `npm run dev` | Development mode with auto-reload (stdio) |
|
|
539
|
+
| `npm run dev:app-ui` | Live preview of the MCP Apps viewer at http://127.0.0.1:5173 |
|
|
540
|
+
| `npm run fixtures:app-ui` | Re-capture the viewer's fixtures from the live tools |
|
|
442
541
|
| `npm run start:http` | Start HTTP/SSE transport mode |
|
|
443
542
|
| `npm test` | Run all tests |
|
|
444
543
|
| `npm run test:unit` | Unit tests only |
|