@get-technology-inc/jamf-docs-mcp-server 1.1.0 → 1.3.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/README.md +233 -21
- package/dist/completions.d.ts +13 -0
- package/dist/completions.d.ts.map +1 -0
- package/dist/completions.js +31 -0
- package/dist/completions.js.map +1 -0
- package/dist/constants.d.ts +125 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +187 -14
- package/dist/constants.js.map +1 -1
- package/dist/index.js +43 -7
- package/dist/index.js.map +1 -1
- package/dist/prompts/compare-versions.d.ts +7 -0
- package/dist/prompts/compare-versions.d.ts.map +1 -0
- package/dist/prompts/compare-versions.js +56 -0
- package/dist/prompts/compare-versions.js.map +1 -0
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +12 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/setup-guide.d.ts +7 -0
- package/dist/prompts/setup-guide.d.ts.map +1 -0
- package/dist/prompts/setup-guide.js +53 -0
- package/dist/prompts/setup-guide.js.map +1 -0
- package/dist/prompts/troubleshoot.d.ts +7 -0
- package/dist/prompts/troubleshoot.d.ts.map +1 -0
- package/dist/prompts/troubleshoot.js +52 -0
- package/dist/prompts/troubleshoot.js.map +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +78 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/schemas/index.d.ts +10 -7
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +18 -16
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/output.d.ts +78 -0
- package/dist/schemas/output.d.ts.map +1 -0
- package/dist/schemas/output.js +78 -0
- package/dist/schemas/output.js.map +1 -0
- package/dist/services/cache.d.ts +37 -3
- package/dist/services/cache.d.ts.map +1 -1
- package/dist/services/cache.js +139 -15
- package/dist/services/cache.js.map +1 -1
- package/dist/services/metadata.d.ts +4 -0
- package/dist/services/metadata.d.ts.map +1 -1
- package/dist/services/metadata.js +52 -9
- package/dist/services/metadata.js.map +1 -1
- package/dist/services/scraper.d.ts +9 -1
- package/dist/services/scraper.d.ts.map +1 -1
- package/dist/services/scraper.js +171 -20
- package/dist/services/scraper.js.map +1 -1
- package/dist/services/tokenizer.d.ts +5 -0
- package/dist/services/tokenizer.d.ts.map +1 -1
- package/dist/services/tokenizer.js +20 -5
- package/dist/services/tokenizer.js.map +1 -1
- package/dist/tools/get-article.d.ts.map +1 -1
- package/dist/tools/get-article.js +37 -11
- package/dist/tools/get-article.js.map +1 -1
- package/dist/tools/get-toc.d.ts.map +1 -1
- package/dist/tools/get-toc.js +54 -10
- package/dist/tools/get-toc.js.map +1 -1
- package/dist/tools/list-products.d.ts.map +1 -1
- package/dist/tools/list-products.js +34 -15
- package/dist/tools/list-products.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +83 -22
- package/dist/tools/search.js.map +1 -1
- package/dist/transport/http.d.ts +12 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/transport/http.js +297 -0
- package/dist/transport/http.js.map +1 -0
- package/dist/transport/index.d.ts +13 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +40 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/types.d.ts +30 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/doc-type.d.ts +9 -0
- package/dist/utils/doc-type.d.ts.map +1 -0
- package/dist/utils/doc-type.js +16 -0
- package/dist/utils/doc-type.js.map +1 -0
- package/dist/utils/progress.d.ts +13 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/progress.js +18 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/sanitize.d.ts +30 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +57 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/url.d.ts +11 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/url.js +23 -0
- package/dist/utils/url.js.map +1 -0
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
An MCP server that gives AI assistants (Claude, Cursor, etc.) direct access to Jamf official documentation. Ask Jamf-related questions and get answers based on the latest docs from learn.jamf.com.
|
|
8
8
|
|
|
9
|
-
**Supported Products**: Jamf Pro, Jamf School, Jamf Connect, Jamf Protect
|
|
9
|
+
**Supported Products**: Jamf Pro, Jamf School, Jamf Connect, Jamf Protect, Jamf Now, Jamf Safe Internet, Jamf Insights, RapidIdentity, Jamf Trust, Jamf Routines, Self Service+, Jamf App Catalog
|
|
10
10
|
|
|
11
11
|
[中文文件](docs/README.zh-TW.md)
|
|
12
12
|
|
|
@@ -68,41 +68,236 @@ Once configured, just ask your AI assistant:
|
|
|
68
68
|
- "How do I configure SSO in Jamf Pro?"
|
|
69
69
|
- "What are the system requirements for Jamf Protect?"
|
|
70
70
|
- "Explain the MDM enrollment process"
|
|
71
|
+
- "What changed in the latest Jamf Connect release notes?"
|
|
71
72
|
|
|
72
73
|
## Available Tools
|
|
73
74
|
|
|
74
75
|
| Tool | Description |
|
|
75
76
|
|------|-------------|
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
77
|
+
| `jamf_docs_list_products` | List all supported products, topics, and document type filters |
|
|
78
|
+
| `jamf_docs_search` | Search documentation by keyword with filtering and pagination |
|
|
79
|
+
| `jamf_docs_get_article` | Retrieve full content of a specific documentation article |
|
|
80
|
+
| `jamf_docs_get_toc` | Browse the table of contents for a product |
|
|
81
|
+
|
|
82
|
+
### jamf_docs_list_products
|
|
83
|
+
|
|
84
|
+
Returns all available Jamf products and their IDs, available topic filters, and document type filters.
|
|
85
|
+
|
|
86
|
+
| Parameter | Type | Default | Description |
|
|
87
|
+
|-----------|------|---------|-------------|
|
|
88
|
+
| `outputMode` | `"full"` \| `"compact"` | `"full"` | Detail level of the response |
|
|
89
|
+
| `responseFormat` | `"markdown"` \| `"json"` | `"markdown"` | Output format |
|
|
90
|
+
| `maxTokens` | number (100–20000) | `5000` | Maximum tokens in response |
|
|
91
|
+
|
|
92
|
+
### jamf_docs_search
|
|
93
|
+
|
|
94
|
+
Searches across all Jamf product documentation.
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Default | Description |
|
|
97
|
+
|-----------|------|---------|-------------|
|
|
98
|
+
| `query` | string (2–200 chars) | required | Search keywords |
|
|
99
|
+
| `product` | string | — | Filter by product ID (e.g., `jamf-pro`) |
|
|
100
|
+
| `topic` | string | — | Filter by topic category (e.g., `enrollment`, `security`) |
|
|
101
|
+
| `docType` | string | — | Filter by document type: `documentation`, `release-notes`, `install-guide`, `technical-paper`, `configuration-guide`, `training` |
|
|
102
|
+
| `version` | string | — | Filter by version (e.g., `"11.5.0"`) |
|
|
103
|
+
| `limit` | number (1–50) | `10` | Results per page |
|
|
104
|
+
| `page` | number (1–100) | `1` | Page number for pagination |
|
|
105
|
+
| `maxTokens` | number (100–20000) | `5000` | Maximum tokens in response |
|
|
106
|
+
| `outputMode` | `"full"` \| `"compact"` | `"full"` | Detail level; use `"compact"` for token-efficient output |
|
|
107
|
+
| `responseFormat` | `"markdown"` \| `"json"` | `"markdown"` | Output format |
|
|
108
|
+
|
|
109
|
+
### jamf_docs_get_article
|
|
110
|
+
|
|
111
|
+
Fetches and converts a documentation article to clean markdown or JSON.
|
|
112
|
+
|
|
113
|
+
| Parameter | Type | Default | Description |
|
|
114
|
+
|-----------|------|---------|-------------|
|
|
115
|
+
| `url` | string | required | Full URL from `docs.jamf.com` or `learn.jamf.com` |
|
|
116
|
+
| `section` | string | — | Extract only a named section (e.g., `"Prerequisites"`) |
|
|
117
|
+
| `summaryOnly` | boolean | `false` | Return only article outline — token-efficient way to preview before fetching full content |
|
|
118
|
+
| `includeRelated` | boolean | `false` | Include links to related articles |
|
|
119
|
+
| `maxTokens` | number (100–20000) | `5000` | Maximum tokens in response |
|
|
120
|
+
| `outputMode` | `"full"` \| `"compact"` | `"full"` | Detail level |
|
|
121
|
+
| `responseFormat` | `"markdown"` \| `"json"` | `"markdown"` | Output format |
|
|
122
|
+
|
|
123
|
+
When content exceeds `maxTokens`, the tool truncates the response and lists all available sections with their token counts. Use the `section` parameter on a follow-up call to retrieve a specific part.
|
|
124
|
+
|
|
125
|
+
### jamf_docs_get_toc
|
|
126
|
+
|
|
127
|
+
Retrieves the navigation structure (table of contents) for a product.
|
|
128
|
+
|
|
129
|
+
| Parameter | Type | Default | Description |
|
|
130
|
+
|-----------|------|---------|-------------|
|
|
131
|
+
| `product` | string | required | Product ID (see supported products below) |
|
|
132
|
+
| `version` | string | latest | Specific version to fetch |
|
|
133
|
+
| `page` | number (1–100) | `1` | Page number for paginated TOC |
|
|
134
|
+
| `maxTokens` | number (100–20000) | `5000` | Maximum tokens in response |
|
|
135
|
+
| `outputMode` | `"full"` \| `"compact"` | `"full"` | Use `"compact"` for a flat list without nested children |
|
|
136
|
+
| `responseFormat` | `"markdown"` \| `"json"` | `"markdown"` | Output format |
|
|
80
137
|
|
|
81
138
|
## MCP Resources
|
|
82
139
|
|
|
83
|
-
Static reference data accessible without tool calls:
|
|
140
|
+
Static and dynamic reference data accessible without tool calls:
|
|
84
141
|
|
|
85
|
-
| Resource | Description |
|
|
86
|
-
|
|
87
|
-
| `jamf://products` |
|
|
88
|
-
| `jamf://topics` | Topic categories for filtering |
|
|
142
|
+
| Resource | URI | Description |
|
|
143
|
+
|----------|-----|-------------|
|
|
144
|
+
| Products list | `jamf://products` | All available Jamf products with IDs and version info (fetched dynamically from API) |
|
|
145
|
+
| Topics list | `jamf://topics` | Topic categories for filtering documentation searches |
|
|
146
|
+
| Product TOC | `jamf://products/{productId}/toc` | Table of contents for a specific product (template resource) |
|
|
147
|
+
| Product versions | `jamf://products/{productId}/versions` | Available documentation versions for a specific product (template resource) |
|
|
148
|
+
|
|
149
|
+
Template resources support tab-completion on `productId` in compatible clients.
|
|
150
|
+
|
|
151
|
+
## MCP Prompts
|
|
152
|
+
|
|
153
|
+
Pre-built prompt workflows that guide the AI through multi-step documentation tasks:
|
|
154
|
+
|
|
155
|
+
### `jamf_troubleshoot`
|
|
156
|
+
|
|
157
|
+
Guides the AI through a structured troubleshooting workflow: searching for relevant documentation, previewing articles with `summaryOnly`, then providing a root-cause diagnosis and step-by-step resolution.
|
|
158
|
+
|
|
159
|
+
| Argument | Type | Description |
|
|
160
|
+
|----------|------|-------------|
|
|
161
|
+
| `problem` | string (required) | Description of the issue to troubleshoot |
|
|
162
|
+
| `product` | string (optional) | Jamf product ID to scope the search |
|
|
163
|
+
|
|
164
|
+
### `jamf_setup_guide`
|
|
165
|
+
|
|
166
|
+
Directs the AI to generate a step-by-step setup guide for a Jamf feature, including prerequisites, configuration steps, and verification.
|
|
167
|
+
|
|
168
|
+
| Argument | Type | Description |
|
|
169
|
+
|----------|------|-------------|
|
|
170
|
+
| `feature` | string (required) | The feature or capability to set up |
|
|
171
|
+
| `product` | string (optional) | Jamf product ID to scope the search |
|
|
172
|
+
|
|
173
|
+
### `jamf_compare_versions`
|
|
174
|
+
|
|
175
|
+
Instructs the AI to compare table-of-contents structures and key articles between two product versions, summarizing new features, removed capabilities, and migration considerations.
|
|
176
|
+
|
|
177
|
+
| Argument | Type | Description |
|
|
178
|
+
|----------|------|-------------|
|
|
179
|
+
| `product` | string (required) | Jamf product ID |
|
|
180
|
+
| `version_a` | string (required) | First version to compare (e.g., `"11.5.0"`) |
|
|
181
|
+
| `version_b` | string (required) | Second version to compare (e.g., `"11.12.0"`) |
|
|
182
|
+
|
|
183
|
+
## Supported Products
|
|
184
|
+
|
|
185
|
+
| Product ID | Name | Description |
|
|
186
|
+
|------------|------|-------------|
|
|
187
|
+
| `jamf-pro` | Jamf Pro | Apple device management for enterprise |
|
|
188
|
+
| `jamf-school` | Jamf School | Apple device management for education |
|
|
189
|
+
| `jamf-connect` | Jamf Connect | Identity and access management |
|
|
190
|
+
| `jamf-protect` | Jamf Protect | Endpoint security for Apple |
|
|
191
|
+
| `jamf-now` | Jamf Now | Simple Apple device management for small businesses |
|
|
192
|
+
| `jamf-safe-internet` | Jamf Safe Internet | Content filtering and web security for education and business |
|
|
193
|
+
| `jamf-insights` | Jamf Insights | Analytics and reporting platform for Apple fleet |
|
|
194
|
+
| `jamf-rapididentity` | RapidIdentity | Identity and access management platform |
|
|
195
|
+
| `jamf-trust` | Jamf Trust | Zero-trust network access for Apple devices |
|
|
196
|
+
| `jamf-routines` | Jamf Routines | Automated workflow orchestration for device management |
|
|
197
|
+
| `self-service-plus` | Self Service+ | Next-generation self-service portal for macOS |
|
|
198
|
+
| `jamf-app-catalog` | Jamf App Catalog | Curated application catalog for managed deployments |
|
|
89
199
|
|
|
90
200
|
## Key Features
|
|
91
201
|
|
|
92
|
-
- **Compact Mode**: Use `outputMode: "compact"` for token-efficient responses
|
|
93
|
-
- **Summary Only**: Use `summaryOnly: true` to preview
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
202
|
+
- **Compact Mode**: Use `outputMode: "compact"` for token-efficient responses when browsing or listing
|
|
203
|
+
- **Summary Only**: Use `summaryOnly: true` on `jamf_docs_get_article` to preview an article outline before fetching full content
|
|
204
|
+
- **Section Extraction**: Use `section: "Prerequisites"` to retrieve only the part of an article you need
|
|
205
|
+
- **Document Type Filter**: Use `docType` on `jamf_docs_search` to narrow results to `release-notes`, `install-guide`, `technical-paper`, `configuration-guide`, or `training`
|
|
206
|
+
- **Version Query**: Use the `version` parameter to query documentation for a specific product version
|
|
207
|
+
- **Pagination**: Search results support `page` and `limit`; table of contents supports `page`; product lists are not paginated
|
|
208
|
+
- **Search Suggestions**: Receive helpful suggestions when a search returns no results
|
|
209
|
+
- **Token Management**: All tools accept a `maxTokens` parameter (100–20000, default 5000) to control response size
|
|
210
|
+
|
|
211
|
+
## HTTP/SSE Transport Mode
|
|
212
|
+
|
|
213
|
+
In addition to the default `stdio` transport, the server supports an HTTP transport for use as a remote or shared MCP endpoint.
|
|
214
|
+
|
|
215
|
+
### Starting the HTTP Server
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Using the npm script (defaults: localhost:3000)
|
|
219
|
+
npm run start:http
|
|
220
|
+
|
|
221
|
+
# Using the built binary directly with custom options
|
|
222
|
+
node dist/index.js --transport http --port 8080 --host 127.0.0.1
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### CLI Arguments
|
|
226
|
+
|
|
227
|
+
| Argument | Default | Description |
|
|
228
|
+
|----------|---------|-------------|
|
|
229
|
+
| `--transport` | `stdio` | Transport mode: `stdio` or `http` |
|
|
230
|
+
| `--port` | `3000` | Port to listen on (1–65535) |
|
|
231
|
+
| `--host` | `127.0.0.1` | Host to bind to |
|
|
232
|
+
|
|
233
|
+
> **Security note**: The default host `127.0.0.1` restricts access to localhost only. Binding to `0.0.0.0` exposes the server to the network; only do this in controlled environments.
|
|
234
|
+
|
|
235
|
+
### HTTP Endpoints
|
|
236
|
+
|
|
237
|
+
| Endpoint | Method | Description |
|
|
238
|
+
|----------|--------|-------------|
|
|
239
|
+
| `/mcp` | `POST` | MCP JSON-RPC endpoint (streamable HTTP transport) |
|
|
240
|
+
| `/health` | `GET` | Health check — returns `{"status":"ok","version":"<current>"}` |
|
|
241
|
+
|
|
242
|
+
### Connecting an MCP Client via HTTP
|
|
243
|
+
|
|
244
|
+
Claude Desktop or other MCP clients that support HTTP transport can connect with:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"mcpServers": {
|
|
249
|
+
"jamf-docs": {
|
|
250
|
+
"url": "http://127.0.0.1:3000/mcp"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### CORS Configuration
|
|
257
|
+
|
|
258
|
+
By default the server does not set CORS headers (cross-origin requests are blocked). To allow specific origins, set the `CORS_ALLOWED_ORIGINS` environment variable:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
CORS_ALLOWED_ORIGINS=https://myapp.example.com node dist/index.js --transport http
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Multiple origins are separated by commas.
|
|
265
|
+
|
|
266
|
+
### Rate Limiting
|
|
267
|
+
|
|
268
|
+
The HTTP server applies per-IP token-bucket rate limiting. The default is 60 requests per minute. Override with the `RATE_LIMIT_RPM` environment variable.
|
|
96
269
|
|
|
97
270
|
## Configuration
|
|
98
271
|
|
|
99
|
-
|
|
272
|
+
All settings are optional. Set them as environment variables before launching the server.
|
|
100
273
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
|
104
|
-
|
|
105
|
-
| `
|
|
274
|
+
### Cache Settings
|
|
275
|
+
|
|
276
|
+
| Variable | Default | Range | Description |
|
|
277
|
+
|----------|---------|-------|-------------|
|
|
278
|
+
| `CACHE_DIR` | `.cache` | — | Cache directory (relative paths must stay within the project; sensitive system paths are rejected) |
|
|
279
|
+
| `CACHE_TTL_SEARCH` | `1800000` (30 min) | 1 min–30 days | TTL for search result cache entries |
|
|
280
|
+
| `CACHE_TTL_ARTICLE` | `86400000` (24 hr) | 1 min–30 days | TTL for article content cache entries |
|
|
281
|
+
| `CACHE_TTL_PRODUCTS` | `604800000` (7 days) | 1 min–30 days | TTL for product list cache entries |
|
|
282
|
+
| `CACHE_TTL_TOC` | `86400000` (24 hr) | 1 min–30 days | TTL for table of contents cache entries |
|
|
283
|
+
| `CACHE_MAX_ENTRIES` | `500` | 10–10000 | Maximum number of entries kept in the in-memory cache |
|
|
284
|
+
|
|
285
|
+
### Request Settings
|
|
286
|
+
|
|
287
|
+
| Variable | Default | Range | Description |
|
|
288
|
+
|----------|---------|-------|-------------|
|
|
289
|
+
| `REQUEST_TIMEOUT` | `15000` | 1000–60000 ms | HTTP request timeout |
|
|
290
|
+
| `MAX_RETRIES` | `3` | 0–10 | Number of retry attempts on failure |
|
|
291
|
+
| `RETRY_DELAY` | `1000` | 100–30000 ms | Delay between retries |
|
|
292
|
+
| `RATE_LIMIT_DELAY` | `500` | 0–10000 ms | Delay between outbound requests (politeness) |
|
|
293
|
+
| `USER_AGENT` | `JamfDocsMCP/1.0 ...` | — | User-Agent header sent to learn.jamf.com |
|
|
294
|
+
|
|
295
|
+
### HTTP Transport Settings
|
|
296
|
+
|
|
297
|
+
| Variable | Default | Range | Description |
|
|
298
|
+
|----------|---------|-------|-------------|
|
|
299
|
+
| `RATE_LIMIT_RPM` | `60` | 1–10000 | Inbound requests per minute per IP (HTTP transport only) |
|
|
300
|
+
| `CORS_ALLOWED_ORIGINS` | `` (empty) | — | Comma-separated list of allowed CORS origins (HTTP transport only) |
|
|
106
301
|
|
|
107
302
|
## Development
|
|
108
303
|
|
|
@@ -110,9 +305,26 @@ Optional environment variables:
|
|
|
110
305
|
git clone https://github.com/GET-Technology-Inc/jamf-docs-mcp-server.git
|
|
111
306
|
cd jamf-docs-mcp-server
|
|
112
307
|
npm install
|
|
113
|
-
npm run dev
|
|
308
|
+
npm run dev # stdio mode with file watching
|
|
309
|
+
npm run start:http # HTTP transport mode
|
|
114
310
|
```
|
|
115
311
|
|
|
312
|
+
### Available Scripts
|
|
313
|
+
|
|
314
|
+
| Script | Description |
|
|
315
|
+
|--------|-------------|
|
|
316
|
+
| `npm run build` | Compile TypeScript to `dist/` |
|
|
317
|
+
| `npm run dev` | Development mode with auto-reload (stdio) |
|
|
318
|
+
| `npm run start:http` | Start HTTP/SSE transport mode |
|
|
319
|
+
| `npm test` | Run all tests |
|
|
320
|
+
| `npm run test:unit` | Unit tests only |
|
|
321
|
+
| `npm run test:integration` | Integration tests only |
|
|
322
|
+
| `npm run test:e2e` | End-to-end tests only |
|
|
323
|
+
| `npm run test:coverage` | Test coverage report |
|
|
324
|
+
| `npm run test:inspector` | Launch MCP Inspector against local build |
|
|
325
|
+
| `npm run lint` | Lint source files |
|
|
326
|
+
| `npm run typecheck` | TypeScript type check without emitting |
|
|
327
|
+
|
|
116
328
|
## License
|
|
117
329
|
|
|
118
330
|
MIT - Copyright (c) 2025 GET Technology Inc.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion utilities for argument autocompletion
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Two-tier matching: prefix matches first, then substring matches.
|
|
6
|
+
*/
|
|
7
|
+
export declare function filterMatches(values: string[], input: string): string[];
|
|
8
|
+
export declare function completeProduct(value: string | undefined): string[];
|
|
9
|
+
export declare function completeTopic(value: string | undefined): string[];
|
|
10
|
+
export declare function completeVersion(value: string | undefined, context?: {
|
|
11
|
+
arguments?: Record<string, string>;
|
|
12
|
+
}): Promise<string[]>;
|
|
13
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/completions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAOvE;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,EAAE,CAEV;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,EAAE,CAEV;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAC/C,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion utilities for argument autocompletion
|
|
3
|
+
*/
|
|
4
|
+
import { JAMF_PRODUCTS, PRODUCT_IDS, TOPIC_IDS } from './constants.js';
|
|
5
|
+
import { getAvailableVersions } from './services/metadata.js';
|
|
6
|
+
/**
|
|
7
|
+
* Two-tier matching: prefix matches first, then substring matches.
|
|
8
|
+
*/
|
|
9
|
+
export function filterMatches(values, input) {
|
|
10
|
+
if (input === '') {
|
|
11
|
+
return values;
|
|
12
|
+
}
|
|
13
|
+
const prefix = values.filter(v => v.startsWith(input));
|
|
14
|
+
const substring = values.filter(v => !v.startsWith(input) && v.includes(input));
|
|
15
|
+
return [...prefix, ...substring];
|
|
16
|
+
}
|
|
17
|
+
export function completeProduct(value) {
|
|
18
|
+
return filterMatches(PRODUCT_IDS, value ?? '');
|
|
19
|
+
}
|
|
20
|
+
export function completeTopic(value) {
|
|
21
|
+
return filterMatches(TOPIC_IDS, value ?? '');
|
|
22
|
+
}
|
|
23
|
+
export async function completeVersion(value, context) {
|
|
24
|
+
const product = context?.arguments?.product;
|
|
25
|
+
if (product === undefined || !(product in JAMF_PRODUCTS)) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const versions = await getAvailableVersions(product);
|
|
29
|
+
return filterMatches(versions, value ?? '');
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=completions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../src/completions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAgB,EAAE,KAAa;IAC3D,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,KAAyB;IAEzB,OAAO,aAAa,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAAyB;IAEzB,OAAO,aAAa,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAAyB,EACzB,OAAgD;IAEhD,MAAM,OAAO,GAAG,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;IAC5C,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,EAAE,CAAC;QACzD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,OAAoB,CAAC,CAAC;IAClE,OAAO,aAAa,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Note: Jamf documentation has moved from docs.jamf.com to learn.jamf.com
|
|
5
5
|
* The new URL structure is: learn.jamf.com/en-US/bundle/{product}-documentation/page/{page}.html
|
|
6
6
|
*/
|
|
7
|
+
export declare function getEnvNumber(key: string, defaultValue: number, min?: number, max?: number): number;
|
|
8
|
+
export declare const SERVER_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAiUlEQVR4nGNgGAU4QEpKxX9qYpItpwSA9N+58wyOSXYENR0AYw+IA9AdQr4DehgQmEgHYIsGujuA7IRIqQNwOYp8B1ABUOQAOat4svDwcQA1wNB2ACVBPzwcQA0wtB0w4NlwwB1ADTC0HUBu1hs+DqAGGNoOAAbxCVLx8HIANQBZvaMB65qNKAAA5fafYXNsHh0AAAAASUVORK5CYII=";
|
|
9
|
+
export declare const SERVER_VERSION: string;
|
|
7
10
|
export declare const DOCS_BASE_URL = "https://learn.jamf.com";
|
|
8
11
|
export declare const DOCS_API_URL = "https://learn-be.jamf.com";
|
|
9
12
|
export declare const JAMF_PRODUCTS: {
|
|
@@ -47,6 +50,86 @@ export declare const JAMF_PRODUCTS: {
|
|
|
47
50
|
readonly latestVersion: "current";
|
|
48
51
|
readonly versions: readonly ["current"];
|
|
49
52
|
};
|
|
53
|
+
readonly 'jamf-now': {
|
|
54
|
+
readonly id: "jamf-now";
|
|
55
|
+
readonly name: "Jamf Now";
|
|
56
|
+
readonly description: "Simple Apple device management for small businesses";
|
|
57
|
+
readonly urlPattern: "en-US/bundle/jamf-now-documentation/page";
|
|
58
|
+
readonly bundleId: "jamf-now-documentation";
|
|
59
|
+
readonly searchLabel: "product-now";
|
|
60
|
+
readonly latestVersion: "current";
|
|
61
|
+
readonly versions: readonly ["current"];
|
|
62
|
+
};
|
|
63
|
+
readonly 'jamf-safe-internet': {
|
|
64
|
+
readonly id: "jamf-safe-internet";
|
|
65
|
+
readonly name: "Jamf Safe Internet";
|
|
66
|
+
readonly description: "Content filtering and web security for education and business";
|
|
67
|
+
readonly urlPattern: "en-US/bundle/jamf-safe-internet-documentation/page";
|
|
68
|
+
readonly bundleId: "jamf-safe-internet-documentation";
|
|
69
|
+
readonly searchLabel: "product-safeinternet";
|
|
70
|
+
readonly latestVersion: "current";
|
|
71
|
+
readonly versions: readonly ["current"];
|
|
72
|
+
};
|
|
73
|
+
readonly 'jamf-insights': {
|
|
74
|
+
readonly id: "jamf-insights";
|
|
75
|
+
readonly name: "Jamf Insights";
|
|
76
|
+
readonly description: "Analytics and reporting platform for Apple fleet";
|
|
77
|
+
readonly urlPattern: "en-US/bundle/jamf-insights-documentation/page";
|
|
78
|
+
readonly bundleId: "jamf-insights-documentation";
|
|
79
|
+
readonly searchLabel: "product-insights";
|
|
80
|
+
readonly latestVersion: "current";
|
|
81
|
+
readonly versions: readonly ["current"];
|
|
82
|
+
};
|
|
83
|
+
readonly 'jamf-rapididentity': {
|
|
84
|
+
readonly id: "jamf-rapididentity";
|
|
85
|
+
readonly name: "RapidIdentity";
|
|
86
|
+
readonly description: "Identity and access management platform";
|
|
87
|
+
readonly urlPattern: "en-US/bundle/jamf-rapididentity-documentation/page";
|
|
88
|
+
readonly bundleId: "jamf-rapididentity-documentation";
|
|
89
|
+
readonly searchLabel: "product-rapididentity";
|
|
90
|
+
readonly latestVersion: "current";
|
|
91
|
+
readonly versions: readonly ["current"];
|
|
92
|
+
};
|
|
93
|
+
readonly 'jamf-trust': {
|
|
94
|
+
readonly id: "jamf-trust";
|
|
95
|
+
readonly name: "Jamf Trust";
|
|
96
|
+
readonly description: "Zero-trust network access for Apple devices";
|
|
97
|
+
readonly urlPattern: "en-US/bundle/jamf-trust-documentation/page";
|
|
98
|
+
readonly bundleId: "jamf-trust-documentation";
|
|
99
|
+
readonly searchLabel: "product-trust";
|
|
100
|
+
readonly latestVersion: "current";
|
|
101
|
+
readonly versions: readonly ["current"];
|
|
102
|
+
};
|
|
103
|
+
readonly 'jamf-routines': {
|
|
104
|
+
readonly id: "jamf-routines";
|
|
105
|
+
readonly name: "Jamf Routines";
|
|
106
|
+
readonly description: "Automated workflow orchestration for device management";
|
|
107
|
+
readonly urlPattern: "en-US/bundle/jamf-routines-documentation/page";
|
|
108
|
+
readonly bundleId: "jamf-routines-documentation";
|
|
109
|
+
readonly searchLabel: "product-routines";
|
|
110
|
+
readonly latestVersion: "current";
|
|
111
|
+
readonly versions: readonly ["current"];
|
|
112
|
+
};
|
|
113
|
+
readonly 'self-service-plus': {
|
|
114
|
+
readonly id: "self-service-plus";
|
|
115
|
+
readonly name: "Self Service+";
|
|
116
|
+
readonly description: "Next-generation self-service portal for macOS";
|
|
117
|
+
readonly urlPattern: "en-US/bundle/self-service-plus-documentation/page";
|
|
118
|
+
readonly bundleId: "self-service-plus-documentation";
|
|
119
|
+
readonly searchLabel: "product-self-service";
|
|
120
|
+
readonly latestVersion: "current";
|
|
121
|
+
readonly versions: readonly ["current"];
|
|
122
|
+
};
|
|
123
|
+
readonly 'jamf-app-catalog': {
|
|
124
|
+
readonly id: "jamf-app-catalog";
|
|
125
|
+
readonly name: "Jamf App Catalog";
|
|
126
|
+
readonly description: "Curated application catalog for managed deployments";
|
|
127
|
+
readonly urlPattern: "en-US/bundle/jamf-app-catalog/page";
|
|
128
|
+
readonly bundleId: "jamf-app-catalog";
|
|
129
|
+
readonly searchLabel: "product-appcatalog";
|
|
130
|
+
readonly latestVersion: "current";
|
|
131
|
+
readonly versions: readonly ["current"];
|
|
132
|
+
};
|
|
50
133
|
};
|
|
51
134
|
export type ProductId = keyof typeof JAMF_PRODUCTS;
|
|
52
135
|
export declare enum ResponseFormat {
|
|
@@ -63,6 +146,7 @@ export declare const CACHE_TTL: {
|
|
|
63
146
|
readonly PRODUCT_LIST: number;
|
|
64
147
|
readonly TOC: number;
|
|
65
148
|
};
|
|
149
|
+
export declare const CACHE_MAX_ENTRIES: number;
|
|
66
150
|
export declare const CACHE_DIR: string;
|
|
67
151
|
export declare const REQUEST_CONFIG: {
|
|
68
152
|
readonly TIMEOUT: number;
|
|
@@ -79,7 +163,7 @@ export declare const CONTENT_LIMITS: {
|
|
|
79
163
|
};
|
|
80
164
|
export declare const TOKEN_CONFIG: {
|
|
81
165
|
readonly DEFAULT_MAX_TOKENS: 5000;
|
|
82
|
-
readonly MAX_TOKENS_LIMIT:
|
|
166
|
+
readonly MAX_TOKENS_LIMIT: 50000;
|
|
83
167
|
readonly MIN_TOKENS: 100;
|
|
84
168
|
readonly CHARS_PER_TOKEN: 4;
|
|
85
169
|
readonly CODE_CHARS_PER_TOKEN: 3;
|
|
@@ -252,6 +336,46 @@ export declare const JAMF_TOPICS: {
|
|
|
252
336
|
};
|
|
253
337
|
};
|
|
254
338
|
export type TopicId = keyof typeof JAMF_TOPICS;
|
|
339
|
+
export declare const DOC_TYPES: {
|
|
340
|
+
readonly documentation: {
|
|
341
|
+
readonly name: "Documentation";
|
|
342
|
+
readonly description: "Main product documentation";
|
|
343
|
+
};
|
|
344
|
+
readonly 'release-notes': {
|
|
345
|
+
readonly name: "Release Notes";
|
|
346
|
+
readonly description: "Version release notes and changelogs";
|
|
347
|
+
readonly bundlePattern: RegExp;
|
|
348
|
+
};
|
|
349
|
+
readonly 'install-guide': {
|
|
350
|
+
readonly name: "Installation Guide";
|
|
351
|
+
readonly description: "Installation and configuration guides";
|
|
352
|
+
readonly bundlePattern: RegExp;
|
|
353
|
+
};
|
|
354
|
+
readonly 'technical-paper': {
|
|
355
|
+
readonly name: "Technical Paper";
|
|
356
|
+
readonly description: "Technical white papers and integration guides";
|
|
357
|
+
readonly bundlePattern: RegExp;
|
|
358
|
+
};
|
|
359
|
+
readonly 'configuration-guide': {
|
|
360
|
+
readonly name: "Configuration Guide";
|
|
361
|
+
readonly description: "Setup and configuration guides";
|
|
362
|
+
readonly bundlePattern: RegExp;
|
|
363
|
+
};
|
|
364
|
+
readonly training: {
|
|
365
|
+
readonly name: "Training";
|
|
366
|
+
readonly description: "Training materials and video guides";
|
|
367
|
+
readonly bundlePattern: RegExp;
|
|
368
|
+
};
|
|
369
|
+
readonly 'technical-article': {
|
|
370
|
+
readonly name: "Technical Article";
|
|
371
|
+
readonly description: "Technical articles and knowledge base content";
|
|
372
|
+
readonly bundlePattern: RegExp;
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
export type DocTypeId = keyof typeof DOC_TYPES;
|
|
376
|
+
export declare const PRODUCT_IDS: [string, ...string[]];
|
|
377
|
+
export declare const TOPIC_IDS: [string, ...string[]];
|
|
378
|
+
export declare const DOC_TYPE_IDS: [string, ...string[]];
|
|
255
379
|
export declare const SELECTORS: {
|
|
256
380
|
readonly CONTENT: "article, .article-content, main article, #content";
|
|
257
381
|
readonly TITLE: "h1";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,CAkBR;AASD,eAAO,MAAM,WAAW,+RAA+R,CAAC;AAKxT,eAAO,MAAM,cAAc,QAAc,CAAC;AAG1C,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,YAAY,8BAA8B,CAAC;AAGxD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHhB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,aAAa,CAAC;AAGnD,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAGD,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAOD,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAGX,eAAO,MAAM,iBAAiB,QAAoD,CAAC;AAiCnF,eAAO,MAAM,SAAS,QAAyB,CAAC;AAGhD,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAGX,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkMd,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,WAAW,CAAC;AAG/C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,SAAS,CAAC;AAG/C,eAAO,MAAM,WAAW,EAAiC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAC/E,eAAO,MAAM,SAAS,EAA+B,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAC3E,eAAO,MAAM,YAAY,EAA6B,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAG5E,eAAO,MAAM,SAAS;;;;;;;CAcZ,CAAC"}
|