Skip to content

Commit 744596c

Browse files
committed
feat(options)!: pf-4119 programmatic, CLI, experimental registry
* index, annotations, pass experimental options for setOptions * options, registry driven options for programmatic, CLI, experimental * options.parser, breakout CLI and programmatic parsers * options.context, confirm experimental options * options.defaults, experimental options list for use tracking * options.helpers, kebabToCamel helper * server, log warnings for experimental option use * e2e, minor typing, parser imports
1 parent ad97803 commit 744596c

19 files changed

Lines changed: 1250 additions & 685 deletions

docs/development.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ Complete guide to using the PatternFly MCP Server for development including CLI
3131
| `--verbose` | Shortcut for `--log-level debug` | `false` |
3232

3333
#### Notes
34-
- **HTTP transport mode** - By default, the server uses `stdio`. Use the `--http` flag to enable HTTP transport.
34+
- **HTTP transport mode** - By default, the server uses `stdio`. Use the `--http` flag to enable HTTP transport. Sub-flags like `--port`, `--host`, etc. only apply when `--http` is set.
3535
- **Logging** - The server uses a `diagnostics_channel`-based logger that keeps stdout pure by default.
3636
- **Programmatic API** - The server can also be used programmatically with options. See [Programmatic usage](#programmatic-usage) for more details.
3737
- **Tool plugins** - The server can load external tool plugins at startup. See [MCP tool plugins](#mcp-tool-plugins) for more details.
3838
- **Test Mode** - When `--mode test` is used, the server redirects resource requests to the URL provided by `--mode-test-url`, enabling E2E testing without local filesystem access.
39+
- **Experimental options** - When an option is registered as experimental, use `--experimental-<lorem-ipsum>` on the CLI; for programmatic options use `experimental<LoremIpsum>`.
3940

4041
### Basic use scenarios
4142

@@ -120,6 +121,9 @@ The `start()` function accepts an optional `PfMcpOptions` object for programmati
120121
| `modeOptions.test.baseUrl` | `string` | Base URL for fixture/mock servers in `test` mode. | `undefined` |
121122
| `docsPaths` | `string[]` | Whitelist of local documentation directories resolved by `documentation:` slug. When empty (default), the slug is dormant. | `[]` |
122123

124+
#### Notes
125+
- **Experimental options** - When an option is registered as experimental use `experimental<LoremIpsum>` for programmatic options; for CLI options use `--experimental-<lorem-ipsum>`.
126+
123127
#### Example usage
124128

125129
```typescript

src/__tests__/__snapshots__/options.defaults.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`options defaults should return specific properties: defaults 1`] = `
66
"contextUrl": "file:///",
77
"docsPathSlug": "documentation:",
88
"docsPaths": [],
9+
"experimental": [],
910
"http": {
1011
"allowedHosts": [],
1112
"allowedOrigins": [],

src/__tests__/__snapshots__/options.test.ts.snap

Lines changed: 0 additions & 335 deletions
This file was deleted.

0 commit comments

Comments
 (0)