@dxos/introspect-tools 0.0.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/dist/lib/browser/index.mjs +215 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +215 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/limits.d.ts +23 -0
- package/dist/types/src/limits.d.ts.map +1 -0
- package/dist/types/src/metadata.d.ts +41 -0
- package/dist/types/src/metadata.d.ts.map +1 -0
- package/dist/types/src/schemas.d.ts +75 -0
- package/dist/types/src/schemas.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +42 -0
- package/src/index.ts +33 -0
- package/src/limits.ts +34 -0
- package/src/metadata.ts +165 -0
- package/src/schemas.ts +159 -0
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dxos/introspect-tools",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Tool definitions (Effect Schema inputs + metadata) shared between the introspect-mcp server and downstream consumers (react-ui-introspect, etc.). Browser-safe — no Node-only dependencies.",
|
|
5
|
+
"homepage": "https://dxos.org",
|
|
6
|
+
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "info@dxos.org",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
18
|
+
"types": "./dist/types/src/index.d.ts",
|
|
19
|
+
"browser": "./dist/lib/browser/index.mjs",
|
|
20
|
+
"node": "./dist/lib/node-esm/index.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"types": "dist/types/src/index.d.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"src"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@dxos/effect-zod": "workspace:*",
|
|
30
|
+
"@dxos/util": "workspace:*",
|
|
31
|
+
"effect": "catalog:",
|
|
32
|
+
"zod": "catalog:"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "catalog:",
|
|
36
|
+
"typescript": "catalog:",
|
|
37
|
+
"vitest": "catalog:"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Browser-safe tool contract — Effect Schema input definitions, static
|
|
6
|
+
// metadata, and the zod adapter the MCP SDK needs. No node:fs, no ts-morph,
|
|
7
|
+
// no MCP transport machinery — those live in @dxos/introspect-mcp.
|
|
8
|
+
|
|
9
|
+
export { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT, type ListOptions } from './limits';
|
|
10
|
+
export { TOOL_METADATA, inputSchemaToZod, type ToolMetadata } from './metadata';
|
|
11
|
+
export {
|
|
12
|
+
FindSymbolInput,
|
|
13
|
+
GetPackageInput,
|
|
14
|
+
GetSymbolInput,
|
|
15
|
+
ListCapabilitiesInput,
|
|
16
|
+
ListOperationsInput,
|
|
17
|
+
ListOptionsInput,
|
|
18
|
+
ListPackagesInput,
|
|
19
|
+
ListPluginsInput,
|
|
20
|
+
ListSchemasInput,
|
|
21
|
+
ListSurfacesInput,
|
|
22
|
+
ListSymbolsInput,
|
|
23
|
+
type FindSymbolArgs,
|
|
24
|
+
type GetPackageArgs,
|
|
25
|
+
type GetSymbolArgs,
|
|
26
|
+
type ListCapabilitiesArgs,
|
|
27
|
+
type ListOperationsArgs,
|
|
28
|
+
type ListPackagesArgs,
|
|
29
|
+
type ListPluginsArgs,
|
|
30
|
+
type ListSchemasArgs,
|
|
31
|
+
type ListSurfacesArgs,
|
|
32
|
+
type ListSymbolsArgs,
|
|
33
|
+
} from './schemas';
|
package/src/limits.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Shared list-pagination constants used by both the schema definitions
|
|
6
|
+
// (`Schema.lessThanOrEqualTo(MAX_LIST_LIMIT)` on every list tool's `limit`
|
|
7
|
+
// field) and by the server-side response shapers in @dxos/introspect-mcp.
|
|
8
|
+
// Lives here so the contract surface (introspect-tools) doesn't have to
|
|
9
|
+
// import from the runtime package.
|
|
10
|
+
|
|
11
|
+
/** Default number of items returned by list-style tools when no `limit` is passed. */
|
|
12
|
+
export const DEFAULT_LIST_LIMIT = 30;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Hard ceiling on `limit`. A runaway tool call shouldn't be able to dump every
|
|
16
|
+
* symbol in the monorepo (~thousands) into the model's context. Callers who
|
|
17
|
+
* truly need everything should iterate via filters (pluginId, package, etc.).
|
|
18
|
+
*/
|
|
19
|
+
export const MAX_LIST_LIMIT = 200;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Per-call options every list-style tool accepts. Both fields are optional
|
|
23
|
+
* — the defaults match `DEFAULT_LIST_LIMIT` items, full projection.
|
|
24
|
+
*/
|
|
25
|
+
export type ListOptions = {
|
|
26
|
+
/** Override the default `DEFAULT_LIST_LIMIT`. Capped at `MAX_LIST_LIMIT`. */
|
|
27
|
+
limit?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Return only the most-essential identifying fields (ref/id/name) instead
|
|
30
|
+
* of the full record. Use when discovering what exists before drilling in
|
|
31
|
+
* with a `get_*` call. Roughly 1/4 the token cost.
|
|
32
|
+
*/
|
|
33
|
+
compact?: boolean;
|
|
34
|
+
};
|
package/src/metadata.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Static tool metadata + the Effect Schema → Zod adapter for the MCP SDK.
|
|
6
|
+
//
|
|
7
|
+
// Pure data + a stateless converter — no introspector, no Node-only deps,
|
|
8
|
+
// no MCP SDK. The introspect-mcp server consumes this map at startup to
|
|
9
|
+
// register each tool with a handler closing over its `Introspector`;
|
|
10
|
+
// browser-side consumers (react-ui-introspect, etc.) consume the same map
|
|
11
|
+
// to render forms / lists / docs from a single source of truth.
|
|
12
|
+
|
|
13
|
+
import * as Schema from 'effect/Schema';
|
|
14
|
+
import type { z } from 'zod';
|
|
15
|
+
|
|
16
|
+
import { effectFieldsToZod } from '@dxos/effect-zod';
|
|
17
|
+
import { trim } from '@dxos/util';
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
FindSymbolInput,
|
|
21
|
+
GetPackageInput,
|
|
22
|
+
GetSymbolInput,
|
|
23
|
+
ListCapabilitiesInput,
|
|
24
|
+
ListOperationsInput,
|
|
25
|
+
ListPackagesInput,
|
|
26
|
+
ListPluginsInput,
|
|
27
|
+
ListSchemasInput,
|
|
28
|
+
ListSurfacesInput,
|
|
29
|
+
ListSymbolsInput,
|
|
30
|
+
} from './schemas';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Pure metadata for a single MCP tool — what an MCP client needs to know
|
|
34
|
+
* before invoking it: human-readable title, an LLM-targeted description,
|
|
35
|
+
* and the Effect Schema input contract.
|
|
36
|
+
*/
|
|
37
|
+
export type ToolMetadata = {
|
|
38
|
+
/** Human-readable title surfaced by Inspector / Composer. */
|
|
39
|
+
title: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* LLM-targeted description. Models read this to decide WHEN to call the
|
|
43
|
+
* tool — write it for trigger accuracy, not for human reading. State both
|
|
44
|
+
* what the tool does and the situations it's the right answer for.
|
|
45
|
+
*/
|
|
46
|
+
description: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Effect Schema struct describing the tool's input. Server-side, the
|
|
50
|
+
* MCP SDK requires zod, so the server converts to zod via
|
|
51
|
+
* `inputSchemaToZod` at registration time. Browser consumers
|
|
52
|
+
* (react-ui-form, etc.) use this directly.
|
|
53
|
+
*/
|
|
54
|
+
inputSchema: Schema.Struct<any>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Static metadata for every tool the introspect-mcp server exposes. No
|
|
59
|
+
* introspector or runtime state — safe to import from a browser bundle.
|
|
60
|
+
*
|
|
61
|
+
* Adding a tool means: (1) define its input schema in `./schemas.ts`,
|
|
62
|
+
* (2) add an entry here, (3) add a matching handler in
|
|
63
|
+
* `@dxos/introspect-mcp` that closes over a runtime `Introspector`.
|
|
64
|
+
*/
|
|
65
|
+
export const TOOL_METADATA: Record<string, ToolMetadata> = {
|
|
66
|
+
list_packages: {
|
|
67
|
+
title: 'List monorepo packages',
|
|
68
|
+
description: trim`
|
|
69
|
+
List packages in the DXOS monorepo. Use this to discover what packages exist before drilling into one.
|
|
70
|
+
Supports filtering by name substring, path prefix (e.g. "packages/plugins"), or workspace-private only.
|
|
71
|
+
Returns lightweight rows; call get_package for dependency and entry-point detail.
|
|
72
|
+
`,
|
|
73
|
+
inputSchema: ListPackagesInput,
|
|
74
|
+
},
|
|
75
|
+
get_package: {
|
|
76
|
+
title: 'Get package detail',
|
|
77
|
+
description: trim`
|
|
78
|
+
Fetch the full record for a single package by its name (e.g. "@dxos/echo").
|
|
79
|
+
Returns workspace and external dependencies, entry points, and metadata.
|
|
80
|
+
Use after list_packages or when the user references a package directly.
|
|
81
|
+
`,
|
|
82
|
+
inputSchema: GetPackageInput,
|
|
83
|
+
},
|
|
84
|
+
list_symbols: {
|
|
85
|
+
title: 'List all exported symbols of a package',
|
|
86
|
+
description: trim`
|
|
87
|
+
Enumerate every exported symbol declared by a single package (e.g. all exports of "@dxos/echo-react").
|
|
88
|
+
Use this when the user wants to know what a specific package offers, or to browse a package after get_package.
|
|
89
|
+
Returns lightweight rows with refs you can pass to get_symbol; capped at 30 — refine with \`kind\` or call get_symbol directly.
|
|
90
|
+
`,
|
|
91
|
+
inputSchema: ListSymbolsInput,
|
|
92
|
+
},
|
|
93
|
+
find_symbol: {
|
|
94
|
+
title: 'Find an exported symbol by name',
|
|
95
|
+
description: trim`
|
|
96
|
+
Find an exported symbol (function, class, type, hook, schema) by name or partial name across all DXOS packages.
|
|
97
|
+
Use this when the user references something by name and you need to locate which package owns it before reading more.
|
|
98
|
+
Returns refs you can pass to get_symbol. Ranking: exact match, then prefix, then substring.
|
|
99
|
+
`,
|
|
100
|
+
inputSchema: FindSymbolInput,
|
|
101
|
+
},
|
|
102
|
+
get_symbol: {
|
|
103
|
+
title: 'Get symbol detail',
|
|
104
|
+
description: trim`
|
|
105
|
+
Fetch detail for a single symbol by ref (e.g. "@dxos/echo#Expando").
|
|
106
|
+
Default response is signature + JSDoc summary + source location.
|
|
107
|
+
Pass include=["source"] to expand the full declaration text, include=["jsdoc"] for the full JSDoc body.
|
|
108
|
+
`,
|
|
109
|
+
inputSchema: GetSymbolInput,
|
|
110
|
+
},
|
|
111
|
+
list_plugins: {
|
|
112
|
+
title: 'List Composer plugins',
|
|
113
|
+
description: trim`
|
|
114
|
+
List plugins detected in the monorepo. A plugin is a package whose src/meta.ts exports a \`Plugin.Meta\`.
|
|
115
|
+
Use this to discover what plugins exist before drilling into surfaces / capabilities / operations / schemas.
|
|
116
|
+
Filter by \`id\` substring (e.g. "markdown") to narrow the list.
|
|
117
|
+
`,
|
|
118
|
+
inputSchema: ListPluginsInput,
|
|
119
|
+
},
|
|
120
|
+
list_surfaces: {
|
|
121
|
+
title: 'List surfaces',
|
|
122
|
+
description: trim`
|
|
123
|
+
List Surface.create({ id, role, ... }) contributions across the monorepo. Use this to discover available
|
|
124
|
+
surface ids when wiring a new container, or to check whether a surface name is already taken.
|
|
125
|
+
Filter by \`id\` (plugin id) to scope to a single plugin's surfaces.
|
|
126
|
+
`,
|
|
127
|
+
inputSchema: ListSurfacesInput,
|
|
128
|
+
},
|
|
129
|
+
list_capabilities: {
|
|
130
|
+
title: 'List capability contributions',
|
|
131
|
+
description: trim`
|
|
132
|
+
List Capability.contributes(<key>, ...) calls across the monorepo. Use this to discover which capability
|
|
133
|
+
keys are produced (or required) by which plugins. Filter by \`id\` (plugin id) to scope to a single plugin.
|
|
134
|
+
`,
|
|
135
|
+
inputSchema: ListCapabilitiesInput,
|
|
136
|
+
},
|
|
137
|
+
list_operations: {
|
|
138
|
+
title: 'List operations',
|
|
139
|
+
description: trim`
|
|
140
|
+
List operations contributed by plugins. An *operation* is a serializable
|
|
141
|
+
request (verb + payload) dispatched through the OperationInvoker —
|
|
142
|
+
Composer's equivalent of an action / command. Most plugins contribute
|
|
143
|
+
these via \`Capabilities.OperationHandler\`. Filter by \`id\` (plugin id)
|
|
144
|
+
to scope to a single plugin.
|
|
145
|
+
`,
|
|
146
|
+
inputSchema: ListOperationsInput,
|
|
147
|
+
},
|
|
148
|
+
list_schemas: {
|
|
149
|
+
title: 'List schemas',
|
|
150
|
+
description: trim`
|
|
151
|
+
List ECHO-registered types contributed by plugins (declared via addSchemaModule).
|
|
152
|
+
Use this to discover what data types exist before reading their shape.
|
|
153
|
+
Filter by \`id\` (plugin id, e.g. "org.dxos.plugin.markdown") to scope to a single plugin's schemas.
|
|
154
|
+
`,
|
|
155
|
+
inputSchema: ListSchemasInput,
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Materialize a tool's `inputSchema` (Effect Struct) into the
|
|
161
|
+
* `Record<string, z.ZodTypeAny>` shape the MCP SDK's `registerTool` requires.
|
|
162
|
+
* Called once per tool at server startup; throws with a clear message if a
|
|
163
|
+
* tool's input uses a schema pattern the converter doesn't support.
|
|
164
|
+
*/
|
|
165
|
+
export const inputSchemaToZod = (struct: Schema.Struct<any>): Record<string, z.ZodTypeAny> => effectFieldsToZod(struct);
|
package/src/schemas.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Effect Schema input definitions for every MCP tool.
|
|
6
|
+
//
|
|
7
|
+
// These are the source of truth: `@dxos/introspect-mcp` converts them to zod
|
|
8
|
+
// at registration time (the MCP SDK requires zod), and downstream consumers
|
|
9
|
+
// like `react-ui-form` import them directly to render forms.
|
|
10
|
+
//
|
|
11
|
+
// Convention: every field's description goes on the OUTERMOST wrapper.
|
|
12
|
+
// - Optional fields: `.annotations({ description })` on `Schema.optional(...)`.
|
|
13
|
+
// - Required fields: `.annotations({ description })` on the primitive itself.
|
|
14
|
+
|
|
15
|
+
import * as Schema from 'effect/Schema';
|
|
16
|
+
|
|
17
|
+
import { trim } from '@dxos/util';
|
|
18
|
+
|
|
19
|
+
import { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT } from './limits';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Pagination + projection options shared by every list-style tool. Spread its
|
|
23
|
+
* `.fields` into a tool's `Schema.Struct({...})` so the same pair of knobs
|
|
24
|
+
* appears on every list endpoint without copy-paste.
|
|
25
|
+
*
|
|
26
|
+
* The default behavior (no `limit`, no `compact`) matches the old hard-cap-of-30
|
|
27
|
+
* shape, so callers that don't pass these args see no change.
|
|
28
|
+
*/
|
|
29
|
+
export const ListOptionsInput = Schema.Struct({
|
|
30
|
+
limit: Schema.optional(
|
|
31
|
+
Schema.Number.pipe(Schema.int(), Schema.positive(), Schema.lessThanOrEqualTo(MAX_LIST_LIMIT)),
|
|
32
|
+
).annotations({
|
|
33
|
+
title: 'Limit',
|
|
34
|
+
description: trim`
|
|
35
|
+
Maximum number of items to return. Default ${DEFAULT_LIST_LIMIT}; max ${MAX_LIST_LIMIT}.
|
|
36
|
+
`,
|
|
37
|
+
}),
|
|
38
|
+
compact: Schema.optional(Schema.Boolean).annotations({
|
|
39
|
+
title: 'Compact',
|
|
40
|
+
description: trim`
|
|
41
|
+
If true, returns only the most-essential identifying fields for each item — about 1/4 the response size.
|
|
42
|
+
Use when discovering what exists before drilling in.
|
|
43
|
+
`,
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const SymbolKindEnum = Schema.Literal('function', 'class', 'interface', 'type', 'enum', 'variable', 'namespace');
|
|
48
|
+
|
|
49
|
+
const IncludeEnum = Schema.Literal('source', 'jsdoc');
|
|
50
|
+
|
|
51
|
+
//
|
|
52
|
+
// Packages
|
|
53
|
+
//
|
|
54
|
+
|
|
55
|
+
export const ListPackagesInput = Schema.Struct({
|
|
56
|
+
name: Schema.optional(Schema.String).annotations({
|
|
57
|
+
title: 'Name filter',
|
|
58
|
+
description: 'Substring of the package name (case-insensitive).',
|
|
59
|
+
}),
|
|
60
|
+
pathPrefix: Schema.optional(Schema.String).annotations({
|
|
61
|
+
title: 'Path prefix',
|
|
62
|
+
description: 'Restrict to packages whose path starts with this segment, e.g. "packages/plugins".',
|
|
63
|
+
}),
|
|
64
|
+
privateOnly: Schema.optional(Schema.Boolean).annotations({
|
|
65
|
+
title: 'Private only',
|
|
66
|
+
description: 'If true, only include workspace-private packages.',
|
|
67
|
+
}),
|
|
68
|
+
...ListOptionsInput.fields,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const GetPackageInput = Schema.Struct({
|
|
72
|
+
name: Schema.String.annotations({
|
|
73
|
+
title: 'Package name',
|
|
74
|
+
description: 'Exact package name, e.g. "@dxos/echo".',
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
//
|
|
79
|
+
// Symbols
|
|
80
|
+
//
|
|
81
|
+
|
|
82
|
+
export const ListSymbolsInput = Schema.Struct({
|
|
83
|
+
package: Schema.String.annotations({
|
|
84
|
+
title: 'Package',
|
|
85
|
+
description: 'Exact package name, e.g. "@dxos/ai".',
|
|
86
|
+
}),
|
|
87
|
+
kind: Schema.optional(SymbolKindEnum).annotations({
|
|
88
|
+
title: 'Kind',
|
|
89
|
+
description: 'Optional filter on declaration kind.',
|
|
90
|
+
}),
|
|
91
|
+
...ListOptionsInput.fields,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export const FindSymbolInput = Schema.Struct({
|
|
95
|
+
query: Schema.String.annotations({
|
|
96
|
+
title: 'Query',
|
|
97
|
+
description: 'Symbol name or partial name (case-insensitive).',
|
|
98
|
+
}),
|
|
99
|
+
kind: Schema.optional(SymbolKindEnum).annotations({
|
|
100
|
+
title: 'Kind',
|
|
101
|
+
description: 'Optional filter on declaration kind.',
|
|
102
|
+
}),
|
|
103
|
+
...ListOptionsInput.fields,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export const GetSymbolInput = Schema.Struct({
|
|
107
|
+
ref: Schema.String.annotations({
|
|
108
|
+
title: 'Symbol ref',
|
|
109
|
+
description: 'Symbol ref in the form "<package>#<name>", e.g. "@dxos/echo#Expando".',
|
|
110
|
+
}),
|
|
111
|
+
include: Schema.optional(Schema.Array(IncludeEnum)).annotations({
|
|
112
|
+
title: 'Include',
|
|
113
|
+
description: 'Optional fields to expand; default returns signature + summary only.',
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
//
|
|
118
|
+
// Plugins / surfaces / capabilities / operations / schemas
|
|
119
|
+
//
|
|
120
|
+
// Main's API exposes a single optional `id` filter on each of these — the
|
|
121
|
+
// plugin id (e.g. "org.dxos.plugin.markdown"). `listPlugins` accepts a
|
|
122
|
+
// `PluginFilter` object with `id` for substring matching.
|
|
123
|
+
//
|
|
124
|
+
|
|
125
|
+
export const ListPluginsInput = Schema.Struct({
|
|
126
|
+
id: Schema.optional(Schema.String).annotations({
|
|
127
|
+
title: 'Plugin id',
|
|
128
|
+
description: 'Substring of the plugin id (case-insensitive). Omit to list every plugin.',
|
|
129
|
+
}),
|
|
130
|
+
...ListOptionsInput.fields,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const PluginIdFilter = Schema.Struct({
|
|
134
|
+
id: Schema.optional(Schema.String).annotations({
|
|
135
|
+
title: 'Plugin id',
|
|
136
|
+
description: 'Restrict to contributions from this plugin id (e.g. "org.dxos.plugin.markdown").',
|
|
137
|
+
}),
|
|
138
|
+
...ListOptionsInput.fields,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export const ListSurfacesInput = PluginIdFilter;
|
|
142
|
+
export const ListCapabilitiesInput = PluginIdFilter;
|
|
143
|
+
export const ListOperationsInput = PluginIdFilter;
|
|
144
|
+
export const ListSchemasInput = PluginIdFilter;
|
|
145
|
+
|
|
146
|
+
//
|
|
147
|
+
// Inferred TypeScript types — handy for downstream consumers.
|
|
148
|
+
//
|
|
149
|
+
|
|
150
|
+
export type ListPackagesArgs = typeof ListPackagesInput.Type;
|
|
151
|
+
export type GetPackageArgs = typeof GetPackageInput.Type;
|
|
152
|
+
export type ListSymbolsArgs = typeof ListSymbolsInput.Type;
|
|
153
|
+
export type FindSymbolArgs = typeof FindSymbolInput.Type;
|
|
154
|
+
export type GetSymbolArgs = typeof GetSymbolInput.Type;
|
|
155
|
+
export type ListPluginsArgs = typeof ListPluginsInput.Type;
|
|
156
|
+
export type ListSurfacesArgs = typeof ListSurfacesInput.Type;
|
|
157
|
+
export type ListCapabilitiesArgs = typeof ListCapabilitiesInput.Type;
|
|
158
|
+
export type ListOperationsArgs = typeof ListOperationsInput.Type;
|
|
159
|
+
export type ListSchemasArgs = typeof ListSchemasInput.Type;
|