Skip to content

Commit 97f855a

Browse files
authored
feat(tools-host): creators, child validation for tools-as-plugins (#62)
* options.defaults, plugin host defaults, timeout * options.tools, tool options subset for creators * server.schema, minor guard, annotation fix * server.toolsHost, normalize tools-as-plugins, errors * server.toolsHostCreator, tools-as-plugins default-export resolver * server.toolsIpc, message guards, IPC contracts
1 parent 55df65e commit 97f855a

14 files changed

+2905
-3
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ exports[`options defaults should return specific properties: defaults 1`] = `
3232
"pfExternalExamplesComponents": "https://raw.githubusercontent.com/patternfly/patternfly-react/refs/tags/v6.4.0/packages/react-core/src/components",
3333
"pfExternalExamplesLayouts": "https://raw.githubusercontent.com/patternfly/patternfly-react/refs/tags/v6.4.0/packages/react-core/src/layouts",
3434
"pfExternalExamplesTable": "https://raw.githubusercontent.com/patternfly/patternfly-react/refs/tags/v6.4.0/packages/react-table/src/components",
35+
"pluginHost": {
36+
"gracePeriodMs": 2000,
37+
"invokeTimeoutMs": 10000,
38+
"loadTimeoutMs": 5000,
39+
},
3540
"repoName": "patternfly-mcp",
3641
"resourceMemoOptions": {
3742
"default": {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2+
3+
exports[`setToolOptions should set a subset of options for tools, default 1`] = `
4+
{
5+
"nodeMajor": "22",
6+
"repoName": "dolor-sit-amet",
7+
"serverName": "lorem ipsum",
8+
"serverVersion": "1.2.3",
9+
}
10+
`;
11+
12+
exports[`setToolOptions should set a subset of options for tools, random keys 1`] = `
13+
{
14+
"nodeMajor": undefined,
15+
"repoName": undefined,
16+
"serverName": undefined,
17+
"serverVersion": undefined,
18+
}
19+
`;

0 commit comments

Comments
 (0)