@dxos/introspect-tools 0.10.0 → 0.11.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.
@@ -0,0 +1,399 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { effectFieldsToZod } from "@dxos/effect-zod";
3
+ import { trim } from "@dxos/util";
4
+ //#region src/limits.ts
5
+ /** Default number of items returned by list-style tools when no `limit` is passed. */
6
+ var DEFAULT_LIST_LIMIT = 30;
7
+ /**
8
+ * Hard ceiling on `limit`. A runaway tool call shouldn't be able to dump every
9
+ * symbol in the monorepo (~thousands) into the model's context. Callers who
10
+ * truly need everything should iterate via filters (pluginId, package, etc.).
11
+ */
12
+ var MAX_LIST_LIMIT = 200;
13
+ //#endregion
14
+ //#region src/output-schemas.ts
15
+ var SymbolKindSchema = Schema.Literal("function", "class", "interface", "type", "enum", "variable", "namespace", "unknown");
16
+ var SymbolIncludeSchema = Schema.Literal("source", "jsdoc");
17
+ var SourceLocationSchema = Schema.Struct({
18
+ file: Schema.String,
19
+ line: Schema.Number,
20
+ column: Schema.Number
21
+ });
22
+ var PluginIdSchema = Schema.String;
23
+ var PackageSchema = Schema.Struct({
24
+ name: Schema.String,
25
+ version: Schema.String,
26
+ private: Schema.Boolean,
27
+ /** Path relative to the monorepo root (no trailing slash). */
28
+ path: Schema.String,
29
+ description: Schema.optional(Schema.String)
30
+ });
31
+ var PackageDetailSchema = Schema.Struct({
32
+ ...PackageSchema.fields,
33
+ /** Workspace dependencies (other packages in the monorepo). */
34
+ workspaceDependencies: Schema.Array(Schema.String),
35
+ /** External (catalog or pinned) dependency names. */
36
+ externalDependencies: Schema.Array(Schema.String),
37
+ /** Resolved entry points (relative to package root). */
38
+ entryPoints: Schema.Array(Schema.String),
39
+ /** Number of exported symbols at the top level. */
40
+ exportCount: Schema.Number
41
+ });
42
+ var SymbolMatchSchema = Schema.Struct({
43
+ ref: Schema.String,
44
+ package: Schema.String,
45
+ name: Schema.String,
46
+ kind: SymbolKindSchema,
47
+ /** One-line summary from JSDoc, if any. */
48
+ summary: Schema.optional(Schema.String)
49
+ });
50
+ var SymbolDetailSchema = Schema.Struct({
51
+ ref: Schema.String,
52
+ package: Schema.String,
53
+ name: Schema.String,
54
+ kind: SymbolKindSchema,
55
+ signature: Schema.String,
56
+ jsdoc: Schema.optional(Schema.String),
57
+ summary: Schema.optional(Schema.String),
58
+ location: SourceLocationSchema,
59
+ /** Source text — only present when `include` requested it. */
60
+ source: Schema.optional(Schema.String)
61
+ });
62
+ var PluginSchema = Schema.Struct({
63
+ /** e.g. `org.dxos.plugin.code`. */
64
+ id: PluginIdSchema,
65
+ /** npm package name, e.g. `@dxos/plugin-code`. */
66
+ package: Schema.String,
67
+ name: Schema.optional(Schema.String),
68
+ description: Schema.optional(Schema.String),
69
+ icon: Schema.optional(Schema.String),
70
+ iconHue: Schema.optional(Schema.String),
71
+ /** Static tags read from `meta.tags` (e.g. `['labs']`). Empty array if absent. */
72
+ tags: Schema.Array(Schema.String),
73
+ /**
74
+ * Ids of other plugins this plugin depends on, derived from its package's
75
+ * `workspace:*` dependencies. Sorted for deterministic output. Empty array
76
+ * if the plugin's package has no dependencies on other plugin packages.
77
+ */
78
+ dependsOn: Schema.Array(PluginIdSchema),
79
+ /** Source location of the `meta` declaration. */
80
+ metaLocation: SourceLocationSchema
81
+ });
82
+ var SurfaceSchema = Schema.Struct({
83
+ pluginId: PluginIdSchema,
84
+ /** Surface id passed to `Surface.create({ id })`. */
85
+ id: Schema.String,
86
+ /** One or more roles the surface answers to. */
87
+ role: Schema.Array(Schema.String),
88
+ location: SourceLocationSchema
89
+ });
90
+ var CapabilitySchema = Schema.Struct({
91
+ pluginId: PluginIdSchema,
92
+ /** Identifier expression as written in source, e.g. `Capabilities.ReactSurface`. */
93
+ type: Schema.String,
94
+ location: SourceLocationSchema
95
+ });
96
+ var OperationSchema = Schema.Struct({
97
+ pluginId: PluginIdSchema,
98
+ /** Operation identifier expression. */
99
+ type: Schema.String,
100
+ location: SourceLocationSchema
101
+ });
102
+ var SchemaSchema = Schema.Struct({
103
+ pluginId: PluginIdSchema,
104
+ /** Identifier expression as written in `addSchemaModule`, e.g. `CodeProject.CodeProject`. */
105
+ name: Schema.String,
106
+ /** Resolved typename (e.g. `org.dxos.type.codeProject`) when statically extractable. */
107
+ typename: Schema.optional(Schema.String),
108
+ location: SourceLocationSchema
109
+ });
110
+ var PluginDetailSchema = Schema.Struct({
111
+ ...PluginSchema.fields,
112
+ surfaces: Schema.Array(SurfaceSchema),
113
+ capabilities: Schema.Array(CapabilitySchema),
114
+ operations: Schema.Array(OperationSchema),
115
+ schemas: Schema.Array(SchemaSchema)
116
+ });
117
+ var IdiomHostKindSchema = Schema.Literal("story", "test", "symbol");
118
+ var IdiomHostSchema = Schema.Struct({
119
+ /** Path relative to the scan root. */
120
+ file: Schema.String,
121
+ /** 1-indexed line where the JSDoc opens. */
122
+ line: Schema.Number,
123
+ /** Best-effort name of the export immediately following the JSDoc. */
124
+ symbol: Schema.optional(Schema.String),
125
+ /** Detected host kind based on file location and symbol shape. */
126
+ kind: IdiomHostKindSchema
127
+ });
128
+ var IdiomSchema = Schema.Struct({
129
+ /** Globally unique AT Protocol NSID (https://atproto.com/specs/nsid). */
130
+ slug: Schema.String,
131
+ /** Leading JSDoc paragraph (rationale). */
132
+ summary: Schema.optional(Schema.String),
133
+ /** Applicability (required field per IDIOMS.md). */
134
+ applies: Schema.String,
135
+ /** Anti-pattern this replaces. */
136
+ insteadOf: Schema.optional(Schema.String),
137
+ /** Raw {@link …} targets named under `uses:`. */
138
+ uses: Schema.Array(Schema.String),
139
+ /** Slugs of related idioms. */
140
+ related: Schema.Array(Schema.String),
141
+ host: IdiomHostSchema
142
+ });
143
+ //#endregion
144
+ //#region src/schemas.ts
145
+ /**
146
+ * Annotation key for fields whose value should be picked from a known
147
+ * enumeration that the MCP server can produce on demand. Consumers
148
+ * (e.g. `@dxos/react-ui-introspect`'s ToolForm) read this annotation off
149
+ * the field's AST and render a Combobox over the matching list.
150
+ *
151
+ * The kind names a domain rather than a specific tool — e.g. `plugin-id`
152
+ * means "any tool that emits plugin ids works" — so adding a new tool
153
+ * doesn't require new picker plumbing.
154
+ */
155
+ var PickerAnnotationId = "@dxos/introspect-tools/picker";
156
+ var getPicker = (ast) => ast.annotations[PickerAnnotationId];
157
+ /**
158
+ * Pagination + projection options shared by every list-style tool. Spread its
159
+ * `.fields` into a tool's `Schema.Struct({...})` so the same pair of knobs
160
+ * appears on every list endpoint without copy-paste.
161
+ *
162
+ * The default behavior (no `limit`, no `compact`) matches the old hard-cap-of-30
163
+ * shape, so callers that don't pass these args see no change.
164
+ */
165
+ var ListOptionsInput = Schema.Struct({
166
+ limit: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive(), Schema.lessThanOrEqualTo(200))).annotations({
167
+ title: "Limit",
168
+ description: trim`
169
+ Maximum number of items. Default ${30}; max ${200}.
170
+ `
171
+ }),
172
+ compact: Schema.optional(Schema.Boolean).annotations({
173
+ title: "Compact",
174
+ description: trim`
175
+ If true, returns only the most-essential identifying fields for each item — about 1/4 the response size.
176
+ Use when discovering what exists before drilling in.
177
+ `
178
+ })
179
+ });
180
+ var SymbolKindEnum = Schema.Literal("function", "class", "interface", "type", "enum", "variable", "namespace");
181
+ var IncludeEnum = Schema.Literal("source", "jsdoc");
182
+ var ListPackagesInput = Schema.Struct({
183
+ name: Schema.optional(Schema.String).annotations({
184
+ title: "Name filter",
185
+ description: "Substring of the package name (case-insensitive).",
186
+ [PickerAnnotationId]: "package-name"
187
+ }),
188
+ pathPrefix: Schema.optional(Schema.String).annotations({ title: "Path prefix" }),
189
+ privateOnly: Schema.optional(Schema.Boolean).annotations({
190
+ title: "Private only",
191
+ description: "If true, only include workspace-private packages."
192
+ }),
193
+ ...ListOptionsInput.fields
194
+ });
195
+ var GetPackageInput = Schema.Struct({ name: Schema.String.annotations({
196
+ title: "Package name",
197
+ description: "Exact package name, e.g. \"@dxos/echo\".",
198
+ [PickerAnnotationId]: "package-name"
199
+ }) });
200
+ var ListSymbolsInput = Schema.Struct({
201
+ package: Schema.String.annotations({
202
+ title: "Package",
203
+ description: "Exact package name, e.g. \"@dxos/ai\".",
204
+ [PickerAnnotationId]: "package-name"
205
+ }),
206
+ kind: Schema.optional(SymbolKindEnum).annotations({
207
+ title: "Kind",
208
+ description: "Optional filter on declaration kind."
209
+ }),
210
+ ...ListOptionsInput.fields
211
+ });
212
+ var FindSymbolInput = Schema.Struct({
213
+ query: Schema.String.annotations({
214
+ title: "Query",
215
+ description: "Symbol name or partial name (case-insensitive)."
216
+ }),
217
+ kind: Schema.optional(SymbolKindEnum).annotations({
218
+ title: "Kind",
219
+ description: "Optional filter on declaration kind."
220
+ }),
221
+ ...ListOptionsInput.fields
222
+ });
223
+ var GetSymbolInput = Schema.Struct({
224
+ ref: Schema.String.annotations({
225
+ title: "Symbol ref",
226
+ description: "Symbol ref in the form \"<package>#<name>\", e.g. \"@dxos/echo#Expando\"."
227
+ }),
228
+ include: Schema.optional(Schema.Array(IncludeEnum)).annotations({
229
+ title: "Include",
230
+ description: "Optional fields to expand; default returns signature + summary only."
231
+ })
232
+ });
233
+ var ListPluginsInput = Schema.Struct({
234
+ id: Schema.optional(Schema.String).annotations({
235
+ title: "Plugin id",
236
+ description: "Substring of the plugin id (case-insensitive). Omit to list every plugin."
237
+ }),
238
+ ...ListOptionsInput.fields
239
+ });
240
+ var PluginIdFilter = Schema.Struct({
241
+ id: Schema.optional(Schema.String).annotations({
242
+ title: "Plugin id",
243
+ [PickerAnnotationId]: "plugin-id"
244
+ }),
245
+ ...ListOptionsInput.fields
246
+ });
247
+ var ListSurfacesInput = PluginIdFilter;
248
+ var ListCapabilitiesInput = PluginIdFilter;
249
+ var ListOperationsInput = PluginIdFilter;
250
+ var ListSchemasInput = PluginIdFilter;
251
+ var IdiomHostKindEnum = Schema.Literal("story", "test", "symbol");
252
+ var ListIdiomsInput = Schema.Struct({
253
+ slug: Schema.optional(Schema.String).annotations({
254
+ title: "Slug filter",
255
+ description: "Substring of the idiom slug (case-insensitive). Omit to list every idiom."
256
+ }),
257
+ hostKind: Schema.optional(IdiomHostKindEnum).annotations({
258
+ title: "Host kind",
259
+ description: "Filter idioms by their host site: `symbol` (production code), `story`, or `test`."
260
+ }),
261
+ ...ListOptionsInput.fields
262
+ });
263
+ //#endregion
264
+ //#region src/metadata.ts
265
+ /**
266
+ * Static metadata for every tool the introspect-mcp server exposes. No
267
+ * introspector or runtime state — safe to import from a browser bundle.
268
+ *
269
+ * Adding a tool means: (1) define its input schema in `./schemas.ts`,
270
+ * (2) add an entry here, (3) add a matching handler in
271
+ * `@dxos/introspect-mcp` that closes over a runtime `Introspector`.
272
+ */
273
+ var TOOL_METADATA = {
274
+ list_packages: {
275
+ title: "List monorepo packages",
276
+ description: trim`
277
+ List packages in the DXOS monorepo. Use this to discover what packages exist before drilling into one.
278
+ Supports filtering by name substring, path prefix (e.g. "packages/plugins"), or workspace-private only.
279
+ Returns lightweight rows; call get_package for dependency and entry-point detail.
280
+ `,
281
+ inputSchema: ListPackagesInput,
282
+ outputSchema: Schema.Struct({ packages: Schema.Array(PackageSchema) })
283
+ },
284
+ get_package: {
285
+ title: "Get package detail",
286
+ description: trim`
287
+ Fetch the full record for a single package by its name (e.g. "@dxos/echo").
288
+ Returns workspace and external dependencies, entry points, and metadata.
289
+ Use after list_packages or when the user references a package directly.
290
+ `,
291
+ inputSchema: GetPackageInput,
292
+ outputSchema: Schema.Struct({ package: Schema.NullOr(PackageSchema) })
293
+ },
294
+ list_symbols: {
295
+ title: "List all exported symbols of a package",
296
+ description: trim`
297
+ Enumerate every exported symbol declared by a single package (e.g. all exports of "@dxos/echo-react").
298
+ Use this when the user wants to know what a specific package offers, or to browse a package after get_package.
299
+ Returns lightweight rows with refs you can pass to get_symbol; capped at 30 — refine with \`kind\` or call get_symbol directly.
300
+ `,
301
+ inputSchema: ListSymbolsInput,
302
+ outputSchema: Schema.Struct({ symbols: Schema.Array(SymbolMatchSchema) })
303
+ },
304
+ find_symbol: {
305
+ title: "Find an exported symbol by name",
306
+ description: trim`
307
+ Find an exported symbol (function, class, type, hook, schema) by name or partial name across all DXOS packages.
308
+ Use this when the user references something by name and you need to locate which package owns it before reading more.
309
+ Returns refs you can pass to get_symbol. Ranking: exact match, then prefix, then substring.
310
+ `,
311
+ inputSchema: FindSymbolInput,
312
+ outputSchema: Schema.Struct({ matches: Schema.Array(SymbolMatchSchema) })
313
+ },
314
+ get_symbol: {
315
+ title: "Get symbol detail",
316
+ description: trim`
317
+ Fetch detail for a single symbol by ref (e.g. "@dxos/echo#Expando").
318
+ Default response is signature + JSDoc summary + source location.
319
+ Pass include=["source"] to expand the full declaration text, include=["jsdoc"] for the full JSDoc body.
320
+ `,
321
+ inputSchema: GetSymbolInput,
322
+ outputSchema: Schema.Struct({ symbol: Schema.NullOr(SymbolDetailSchema) })
323
+ },
324
+ list_plugins: {
325
+ title: "List Composer plugins",
326
+ description: trim`
327
+ List plugins detected in the monorepo. A plugin is a package whose src/meta.ts exports a \`Plugin.Meta\`.
328
+ Use this to discover what plugins exist before drilling into surfaces / capabilities / operations / schemas.
329
+ Filter by \`id\` substring (e.g. "markdown") to narrow the list.
330
+ `,
331
+ inputSchema: ListPluginsInput,
332
+ outputSchema: Schema.Struct({ plugins: Schema.Array(PluginSchema) })
333
+ },
334
+ list_surfaces: {
335
+ title: "List surfaces",
336
+ description: trim`
337
+ List Surface.create({ id, role, ... }) contributions across the monorepo. Use this to discover available
338
+ surface ids when wiring a new container, or to check whether a surface name is already taken.
339
+ Filter by \`id\` (plugin id) to scope to a single plugin's surfaces.
340
+ `,
341
+ inputSchema: ListSurfacesInput,
342
+ outputSchema: Schema.Struct({ surfaces: Schema.Array(SurfaceSchema) })
343
+ },
344
+ list_capabilities: {
345
+ title: "List capability contributions",
346
+ description: trim`
347
+ List Capability.contributes(<key>, ...) calls across the monorepo. Use this to discover which capability
348
+ keys are produced (or required) by which plugins. Filter by \`id\` (plugin id) to scope to a single plugin.
349
+ `,
350
+ inputSchema: ListCapabilitiesInput,
351
+ outputSchema: Schema.Struct({ capabilities: Schema.Array(CapabilitySchema) })
352
+ },
353
+ list_operations: {
354
+ title: "List operations",
355
+ description: trim`
356
+ List operations contributed by plugins. An *operation* is a serializable
357
+ request (verb + payload) dispatched through the OperationInvoker —
358
+ Composer's equivalent of an action / command. Most plugins contribute
359
+ these via \`Capabilities.OperationHandler\`. Filter by \`id\` (plugin id)
360
+ to scope to a single plugin.
361
+ `,
362
+ inputSchema: ListOperationsInput,
363
+ outputSchema: Schema.Struct({ operations: Schema.Array(OperationSchema) })
364
+ },
365
+ list_schemas: {
366
+ title: "List schemas",
367
+ description: trim`
368
+ List ECHO-registered types contributed by plugins (declared via addSchemaModule).
369
+ Use this to discover what data types exist before reading their shape.
370
+ Filter by \`id\` (plugin id, e.g. "org.dxos.plugin.markdown") to scope to a single plugin's schemas.
371
+ `,
372
+ inputSchema: ListSchemasInput,
373
+ outputSchema: Schema.Struct({ schemas: Schema.Array(SchemaSchema) })
374
+ },
375
+ list_idioms: {
376
+ title: "List idioms",
377
+ description: trim`
378
+ List idioms catalogued across the monorepo. An *idiom* is a JSDoc-tagged
379
+ reference example (\`@idiom <slug>\`) that pins the canonical way to use a
380
+ symbol — applicability, anti-pattern, and links to related idioms. Use this
381
+ to discover how a feature is meant to be used, or to find a worked example
382
+ before writing new code. Filter by \`slug\` substring or by \`hostKind\`
383
+ (\`symbol\`, \`story\`, \`test\`).
384
+ `,
385
+ inputSchema: ListIdiomsInput,
386
+ outputSchema: Schema.Struct({ idioms: Schema.Array(IdiomSchema) })
387
+ }
388
+ };
389
+ /**
390
+ * Materialize a tool's `inputSchema` (Effect Struct) into the
391
+ * `Record<string, z.ZodTypeAny>` shape the MCP SDK's `registerTool` requires.
392
+ * Called once per tool at server startup; throws with a clear message if a
393
+ * tool's input uses a schema pattern the converter doesn't support.
394
+ */
395
+ var inputSchemaToZod = (struct) => effectFieldsToZod(struct);
396
+ //#endregion
397
+ export { CapabilitySchema, DEFAULT_LIST_LIMIT, FindSymbolInput, GetPackageInput, GetSymbolInput, IdiomHostKindSchema, IdiomHostSchema, IdiomSchema, ListCapabilitiesInput, ListIdiomsInput, ListOperationsInput, ListOptionsInput, ListPackagesInput, ListPluginsInput, ListSchemasInput, ListSurfacesInput, ListSymbolsInput, MAX_LIST_LIMIT, OperationSchema, PackageDetailSchema, PackageSchema, PickerAnnotationId, PluginDetailSchema, PluginIdSchema, PluginSchema, SchemaSchema, SourceLocationSchema, SurfaceSchema, SymbolDetailSchema, SymbolIncludeSchema, SymbolKindSchema, SymbolMatchSchema, TOOL_METADATA, getPicker, inputSchemaToZod };
398
+
399
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/limits.ts","../../src/output-schemas.ts","../../src/schemas.ts","../../src/metadata.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// Shared list-pagination constants used by both the schema definitions\n// (`Schema.lessThanOrEqualTo(MAX_LIST_LIMIT)` on every list tool's `limit`\n// field) and by the server-side response shapers in @dxos/introspect-mcp.\n// Lives here so the contract surface (introspect-tools) doesn't have to\n// import from the runtime package.\n\n/** Default number of items returned by list-style tools when no `limit` is passed. */\nexport const DEFAULT_LIST_LIMIT = 30;\n\n/**\n * Hard ceiling on `limit`. A runaway tool call shouldn't be able to dump every\n * symbol in the monorepo (~thousands) into the model's context. Callers who\n * truly need everything should iterate via filters (pluginId, package, etc.).\n */\nexport const MAX_LIST_LIMIT = 200;\n\n/**\n * Per-call options every list-style tool accepts. Both fields are optional\n * — the defaults match `DEFAULT_LIST_LIMIT` items, full projection.\n */\nexport type ListOptions = {\n /** Override the default `DEFAULT_LIST_LIMIT`. Capped at `MAX_LIST_LIMIT`. */\n limit?: number;\n /**\n * Return only the most-essential identifying fields (ref/id/name) instead\n * of the full record. Use when discovering what exists before drilling in\n * with a `get_*` call. Roughly 1/4 the token cost.\n */\n compact?: boolean;\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\n// Effect Schema definitions for every introspect tool *result* (output) shape.\n//\n// These are the source of truth for the data returned by `@dxos/introspect`.\n// `@dxos/introspect/src/types.ts` re-derives its TypeScript types from these\n// schemas, and downstream consumers that can't depend on `@dxos/introspect`\n// (browser/worker contexts — `@dxos/introspect` pulls Node-only `ts-morph`\n// and `glob`) import the schemas directly.\n\nimport * as Schema from 'effect/Schema';\n\n//\n// Primitives\n//\n\nexport const SymbolKindSchema = Schema.Literal(\n 'function',\n 'class',\n 'interface',\n 'type',\n 'enum',\n 'variable',\n 'namespace',\n 'unknown',\n);\nexport type SymbolKind = typeof SymbolKindSchema.Type;\n\nexport const SymbolIncludeSchema = Schema.Literal('source', 'jsdoc');\nexport type SymbolInclude = typeof SymbolIncludeSchema.Type;\n\nexport const SourceLocationSchema = Schema.Struct({\n file: Schema.String,\n line: Schema.Number,\n column: Schema.Number,\n});\nexport type SourceLocation = typeof SourceLocationSchema.Type;\n\nexport const PluginIdSchema = Schema.String;\nexport type PluginId = typeof PluginIdSchema.Type;\n\n//\n// Packages\n//\n\nexport const PackageSchema = Schema.Struct({\n name: Schema.String,\n version: Schema.String,\n private: Schema.Boolean,\n /** Path relative to the monorepo root (no trailing slash). */\n path: Schema.String,\n description: Schema.optional(Schema.String),\n});\nexport type Package = typeof PackageSchema.Type;\n\nexport const PackageDetailSchema = Schema.Struct({\n ...PackageSchema.fields,\n /** Workspace dependencies (other packages in the monorepo). */\n workspaceDependencies: Schema.Array(Schema.String),\n /** External (catalog or pinned) dependency names. */\n externalDependencies: Schema.Array(Schema.String),\n /** Resolved entry points (relative to package root). */\n entryPoints: Schema.Array(Schema.String),\n /** Number of exported symbols at the top level. */\n exportCount: Schema.Number,\n});\nexport type PackageDetail = typeof PackageDetailSchema.Type;\n\n//\n// Symbols\n//\n\nexport const SymbolMatchSchema = Schema.Struct({\n ref: Schema.String,\n package: Schema.String,\n name: Schema.String,\n kind: SymbolKindSchema,\n /** One-line summary from JSDoc, if any. */\n summary: Schema.optional(Schema.String),\n});\nexport type SymbolMatch = typeof SymbolMatchSchema.Type;\n\nexport const SymbolDetailSchema = Schema.Struct({\n ref: Schema.String,\n package: Schema.String,\n name: Schema.String,\n kind: SymbolKindSchema,\n signature: Schema.String,\n jsdoc: Schema.optional(Schema.String),\n summary: Schema.optional(Schema.String),\n location: SourceLocationSchema,\n /** Source text — only present when `include` requested it. */\n source: Schema.optional(Schema.String),\n});\nexport type SymbolDetail = typeof SymbolDetailSchema.Type;\n\n//\n// Plugins / surfaces / capabilities / operations / schemas\n//\n\nexport const PluginSchema = Schema.Struct({\n /** e.g. `org.dxos.plugin.code`. */\n id: PluginIdSchema,\n /** npm package name, e.g. `@dxos/plugin-code`. */\n package: Schema.String,\n name: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n icon: Schema.optional(Schema.String),\n iconHue: Schema.optional(Schema.String),\n /** Static tags read from `meta.tags` (e.g. `['labs']`). Empty array if absent. */\n tags: Schema.Array(Schema.String),\n /**\n * Ids of other plugins this plugin depends on, derived from its package's\n * `workspace:*` dependencies. Sorted for deterministic output. Empty array\n * if the plugin's package has no dependencies on other plugin packages.\n */\n dependsOn: Schema.Array(PluginIdSchema),\n /** Source location of the `meta` declaration. */\n metaLocation: SourceLocationSchema,\n});\nexport type Plugin = typeof PluginSchema.Type;\n\nexport const SurfaceSchema = Schema.Struct({\n pluginId: PluginIdSchema,\n /** Surface id passed to `Surface.create({ id })`. */\n id: Schema.String,\n /** One or more roles the surface answers to. */\n role: Schema.Array(Schema.String),\n location: SourceLocationSchema,\n});\nexport type Surface = typeof SurfaceSchema.Type;\n\nexport const CapabilitySchema = Schema.Struct({\n pluginId: PluginIdSchema,\n /** Identifier expression as written in source, e.g. `Capabilities.ReactSurface`. */\n type: Schema.String,\n location: SourceLocationSchema,\n});\nexport type Capability = typeof CapabilitySchema.Type;\n\nexport const OperationSchema = Schema.Struct({\n pluginId: PluginIdSchema,\n /** Operation identifier expression. */\n type: Schema.String,\n location: SourceLocationSchema,\n});\nexport type Operation = typeof OperationSchema.Type;\n\nexport const SchemaSchema = Schema.Struct({\n pluginId: PluginIdSchema,\n /** Identifier expression as written in `addSchemaModule`, e.g. `CodeProject.CodeProject`. */\n name: Schema.String,\n /** Resolved typename (e.g. `org.dxos.type.codeProject`) when statically extractable. */\n typename: Schema.optional(Schema.String),\n location: SourceLocationSchema,\n});\nexport type SchemaContribution = typeof SchemaSchema.Type;\n\nexport const PluginDetailSchema = Schema.Struct({\n ...PluginSchema.fields,\n surfaces: Schema.Array(SurfaceSchema),\n capabilities: Schema.Array(CapabilitySchema),\n operations: Schema.Array(OperationSchema),\n schemas: Schema.Array(SchemaSchema),\n});\nexport type PluginDetail = typeof PluginDetailSchema.Type;\n\n//\n// Idioms\n//\n\nexport const IdiomHostKindSchema = Schema.Literal('story', 'test', 'symbol');\nexport type IdiomHostKind = typeof IdiomHostKindSchema.Type;\n\nexport const IdiomHostSchema = Schema.Struct({\n /** Path relative to the scan root. */\n file: Schema.String,\n /** 1-indexed line where the JSDoc opens. */\n line: Schema.Number,\n /** Best-effort name of the export immediately following the JSDoc. */\n symbol: Schema.optional(Schema.String),\n /** Detected host kind based on file location and symbol shape. */\n kind: IdiomHostKindSchema,\n});\nexport type IdiomHost = typeof IdiomHostSchema.Type;\n\nexport const IdiomSchema = Schema.Struct({\n /** Globally unique AT Protocol NSID (https://atproto.com/specs/nsid). */\n slug: Schema.String,\n /** Leading JSDoc paragraph (rationale). */\n summary: Schema.optional(Schema.String),\n /** Applicability (required field per IDIOMS.md). */\n applies: Schema.String,\n /** Anti-pattern this replaces. */\n insteadOf: Schema.optional(Schema.String),\n /** Raw {@link …} targets named under `uses:`. */\n uses: Schema.Array(Schema.String),\n /** Slugs of related idioms. */\n related: Schema.Array(Schema.String),\n host: IdiomHostSchema,\n});\nexport type Idiom = typeof IdiomSchema.Type;\n\n//\n// Sidecar file format\n//\n\n/**\n * Shape of the `plugins.json` sidecar stored in R2 / written by the cache\n * upload script. Uses plain mutable arrays so callers can work with standard\n * JSON.parse output without readonly friction.\n */\nexport type PluginsFile = {\n version: 1;\n plugins: Plugin[];\n surfaces: Surface[];\n capabilities: Capability[];\n operations: Operation[];\n schemas: SchemaContribution[];\n idioms?: Idiom[];\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\n// Effect Schema input definitions for every MCP tool.\n//\n// These are the source of truth: `@dxos/introspect-mcp` converts them to zod\n// at registration time (the MCP SDK requires zod), and downstream consumers\n// like `react-ui-form` import them directly to render forms.\n//\n// Convention: every field's description goes on the OUTERMOST wrapper.\n// - Optional fields: `.annotations({ description })` on `Schema.optional(...)`.\n// - Required fields: `.annotations({ description })` on the primitive itself.\n\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { trim } from '@dxos/util';\n\nimport { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT } from './limits';\n\n/**\n * Annotation key for fields whose value should be picked from a known\n * enumeration that the MCP server can produce on demand. Consumers\n * (e.g. `@dxos/react-ui-introspect`'s ToolForm) read this annotation off\n * the field's AST and render a Combobox over the matching list.\n *\n * The kind names a domain rather than a specific tool — e.g. `plugin-id`\n * means \"any tool that emits plugin ids works\" — so adding a new tool\n * doesn't require new picker plumbing.\n */\nexport const PickerAnnotationId = '@dxos/introspect-tools/picker';\n\nexport type PickerKind = 'plugin-id' | 'package-name';\n\nexport const getPicker = (ast: SchemaAST.AST): PickerKind | undefined =>\n (ast.annotations as Record<string, unknown>)[PickerAnnotationId] as PickerKind | undefined;\n\n/**\n * Pagination + projection options shared by every list-style tool. Spread its\n * `.fields` into a tool's `Schema.Struct({...})` so the same pair of knobs\n * appears on every list endpoint without copy-paste.\n *\n * The default behavior (no `limit`, no `compact`) matches the old hard-cap-of-30\n * shape, so callers that don't pass these args see no change.\n */\nexport const ListOptionsInput = Schema.Struct({\n limit: Schema.optional(\n Schema.Number.pipe(Schema.int(), Schema.positive(), Schema.lessThanOrEqualTo(MAX_LIST_LIMIT)),\n ).annotations({\n title: 'Limit',\n description: trim`\n Maximum number of items. Default ${DEFAULT_LIST_LIMIT}; max ${MAX_LIST_LIMIT}.\n `,\n }),\n compact: Schema.optional(Schema.Boolean).annotations({\n title: 'Compact',\n description: trim`\n If true, returns only the most-essential identifying fields for each item — about 1/4 the response size.\n Use when discovering what exists before drilling in.\n `,\n }),\n});\n\nconst SymbolKindEnum = Schema.Literal('function', 'class', 'interface', 'type', 'enum', 'variable', 'namespace');\n\nconst IncludeEnum = Schema.Literal('source', 'jsdoc');\n\n//\n// Packages\n//\n\nexport const ListPackagesInput = Schema.Struct({\n name: Schema.optional(Schema.String).annotations({\n title: 'Name filter',\n description: 'Substring of the package name (case-insensitive).',\n [PickerAnnotationId]: 'package-name' satisfies PickerKind,\n }),\n pathPrefix: Schema.optional(Schema.String).annotations({\n title: 'Path prefix',\n }),\n privateOnly: Schema.optional(Schema.Boolean).annotations({\n title: 'Private only',\n description: 'If true, only include workspace-private packages.',\n }),\n ...ListOptionsInput.fields,\n});\n\nexport const GetPackageInput = Schema.Struct({\n name: Schema.String.annotations({\n title: 'Package name',\n description: 'Exact package name, e.g. \"@dxos/echo\".',\n [PickerAnnotationId]: 'package-name' satisfies PickerKind,\n }),\n});\n\n//\n// Symbols\n//\n\nexport const ListSymbolsInput = Schema.Struct({\n package: Schema.String.annotations({\n title: 'Package',\n description: 'Exact package name, e.g. \"@dxos/ai\".',\n [PickerAnnotationId]: 'package-name' satisfies PickerKind,\n }),\n kind: Schema.optional(SymbolKindEnum).annotations({\n title: 'Kind',\n description: 'Optional filter on declaration kind.',\n }),\n ...ListOptionsInput.fields,\n});\n\nexport const FindSymbolInput = Schema.Struct({\n query: Schema.String.annotations({\n title: 'Query',\n description: 'Symbol name or partial name (case-insensitive).',\n }),\n kind: Schema.optional(SymbolKindEnum).annotations({\n title: 'Kind',\n description: 'Optional filter on declaration kind.',\n }),\n ...ListOptionsInput.fields,\n});\n\nexport const GetSymbolInput = Schema.Struct({\n ref: Schema.String.annotations({\n title: 'Symbol ref',\n description: 'Symbol ref in the form \"<package>#<name>\", e.g. \"@dxos/echo#Expando\".',\n }),\n include: Schema.optional(Schema.Array(IncludeEnum)).annotations({\n title: 'Include',\n description: 'Optional fields to expand; default returns signature + summary only.',\n }),\n});\n\n//\n// Plugins / surfaces / capabilities / operations / schemas\n//\n// Main's API exposes a single optional `id` filter on each of these — the\n// plugin id (e.g. \"org.dxos.plugin.markdown\"). `listPlugins` accepts a\n// `PluginFilter` object with `id` for substring matching.\n//\n\nexport const ListPluginsInput = Schema.Struct({\n // No picker annotation — this is a free-form substring filter, not an\n // exact-match selector. Picking from the list of known plugin ids would\n // defeat the purpose of `list_plugins`.\n id: Schema.optional(Schema.String).annotations({\n title: 'Plugin id',\n description: 'Substring of the plugin id (case-insensitive). Omit to list every plugin.',\n }),\n ...ListOptionsInput.fields,\n});\n\nconst PluginIdFilter = Schema.Struct({\n id: Schema.optional(Schema.String).annotations({\n title: 'Plugin id',\n [PickerAnnotationId]: 'plugin-id' satisfies PickerKind,\n }),\n ...ListOptionsInput.fields,\n});\n\nexport const ListSurfacesInput = PluginIdFilter;\nexport const ListCapabilitiesInput = PluginIdFilter;\nexport const ListOperationsInput = PluginIdFilter;\nexport const ListSchemasInput = PluginIdFilter;\n\n//\n// Idioms\n//\n\nconst IdiomHostKindEnum = Schema.Literal('story', 'test', 'symbol');\n\nexport const ListIdiomsInput = Schema.Struct({\n slug: Schema.optional(Schema.String).annotations({\n title: 'Slug filter',\n description: 'Substring of the idiom slug (case-insensitive). Omit to list every idiom.',\n }),\n hostKind: Schema.optional(IdiomHostKindEnum).annotations({\n title: 'Host kind',\n description: 'Filter idioms by their host site: `symbol` (production code), `story`, or `test`.',\n }),\n ...ListOptionsInput.fields,\n});\n\n//\n// Inferred TypeScript types — handy for downstream consumers.\n//\n\nexport type ListPackagesArgs = typeof ListPackagesInput.Type;\nexport type GetPackageArgs = typeof GetPackageInput.Type;\nexport type ListSymbolsArgs = typeof ListSymbolsInput.Type;\nexport type FindSymbolArgs = typeof FindSymbolInput.Type;\nexport type GetSymbolArgs = typeof GetSymbolInput.Type;\nexport type ListPluginsArgs = typeof ListPluginsInput.Type;\nexport type ListSurfacesArgs = typeof ListSurfacesInput.Type;\nexport type ListCapabilitiesArgs = typeof ListCapabilitiesInput.Type;\nexport type ListOperationsArgs = typeof ListOperationsInput.Type;\nexport type ListSchemasArgs = typeof ListSchemasInput.Type;\nexport type ListIdiomsArgs = typeof ListIdiomsInput.Type;\n","//\n// Copyright 2026 DXOS.org\n//\n\n// Static tool metadata + the Effect Schema → Zod adapter for the MCP SDK.\n//\n// Pure data + a stateless converter — no introspector, no Node-only deps,\n// no MCP SDK. The introspect-mcp server consumes this map at startup to\n// register each tool with a handler closing over its `Introspector`;\n// browser-side consumers (react-ui-introspect, etc.) consume the same map\n// to render forms / lists / docs from a single source of truth.\n\nimport * as Schema from 'effect/Schema';\nimport type { z } from 'zod';\n\nimport { effectFieldsToZod } from '@dxos/effect-zod';\nimport { trim } from '@dxos/util';\n\nimport {\n CapabilitySchema,\n IdiomSchema,\n OperationSchema,\n PackageSchema,\n PluginSchema,\n SchemaSchema,\n SurfaceSchema,\n SymbolDetailSchema,\n SymbolMatchSchema,\n} from './output-schemas';\nimport {\n FindSymbolInput,\n GetPackageInput,\n GetSymbolInput,\n ListCapabilitiesInput,\n ListIdiomsInput,\n ListOperationsInput,\n ListPackagesInput,\n ListPluginsInput,\n ListSchemasInput,\n ListSurfacesInput,\n ListSymbolsInput,\n} from './schemas';\n\n/**\n * Pure metadata for a single MCP tool — what an MCP client needs to know\n * before invoking it: human-readable title, an LLM-targeted description,\n * and the Effect Schema input contract.\n */\nexport type ToolMetadata = {\n /** Human-readable title surfaced by Inspector / Composer. */\n title: string;\n\n /**\n * LLM-targeted description. Models read this to decide WHEN to call the\n * tool — write it for trigger accuracy, not for human reading. State both\n * what the tool does and the situations it's the right answer for.\n */\n description: string;\n\n /**\n * Effect Schema struct describing the tool's input. Server-side, the\n * MCP SDK requires zod, so the server converts to zod via\n * `inputSchemaToZod` at registration time. Browser consumers\n * (react-ui-form, etc.) use this directly.\n */\n inputSchema: Schema.Struct<any>;\n\n /**\n * Effect Schema struct describing the tool's success return shape.\n * MCP's `structuredContent` must be a JSON object, so each tool wraps\n * its item(s) under a stable top-level key (e.g. `{ packages: [...] }`,\n * `{ package: null | {...} }`). Consumers building Effect AI Tools can\n * pass this directly as `success` to `Tool.make`.\n */\n outputSchema: Schema.Struct<any>;\n};\n\n/**\n * Static metadata for every tool the introspect-mcp server exposes. No\n * introspector or runtime state — safe to import from a browser bundle.\n *\n * Adding a tool means: (1) define its input schema in `./schemas.ts`,\n * (2) add an entry here, (3) add a matching handler in\n * `@dxos/introspect-mcp` that closes over a runtime `Introspector`.\n */\nexport const TOOL_METADATA: Record<string, ToolMetadata> = {\n list_packages: {\n title: 'List monorepo packages',\n description: trim`\n List packages in the DXOS monorepo. Use this to discover what packages exist before drilling into one.\n Supports filtering by name substring, path prefix (e.g. \"packages/plugins\"), or workspace-private only.\n Returns lightweight rows; call get_package for dependency and entry-point detail.\n `,\n inputSchema: ListPackagesInput,\n outputSchema: Schema.Struct({ packages: Schema.Array(PackageSchema) }),\n },\n get_package: {\n title: 'Get package detail',\n description: trim`\n Fetch the full record for a single package by its name (e.g. \"@dxos/echo\").\n Returns workspace and external dependencies, entry points, and metadata.\n Use after list_packages or when the user references a package directly.\n `,\n inputSchema: GetPackageInput,\n outputSchema: Schema.Struct({ package: Schema.NullOr(PackageSchema) }),\n },\n list_symbols: {\n title: 'List all exported symbols of a package',\n description: trim`\n Enumerate every exported symbol declared by a single package (e.g. all exports of \"@dxos/echo-react\").\n Use this when the user wants to know what a specific package offers, or to browse a package after get_package.\n Returns lightweight rows with refs you can pass to get_symbol; capped at 30 — refine with \\`kind\\` or call get_symbol directly.\n `,\n inputSchema: ListSymbolsInput,\n outputSchema: Schema.Struct({ symbols: Schema.Array(SymbolMatchSchema) }),\n },\n find_symbol: {\n title: 'Find an exported symbol by name',\n description: trim`\n Find an exported symbol (function, class, type, hook, schema) by name or partial name across all DXOS packages.\n Use this when the user references something by name and you need to locate which package owns it before reading more.\n Returns refs you can pass to get_symbol. Ranking: exact match, then prefix, then substring.\n `,\n inputSchema: FindSymbolInput,\n outputSchema: Schema.Struct({ matches: Schema.Array(SymbolMatchSchema) }),\n },\n get_symbol: {\n title: 'Get symbol detail',\n description: trim`\n Fetch detail for a single symbol by ref (e.g. \"@dxos/echo#Expando\").\n Default response is signature + JSDoc summary + source location.\n Pass include=[\"source\"] to expand the full declaration text, include=[\"jsdoc\"] for the full JSDoc body.\n `,\n inputSchema: GetSymbolInput,\n outputSchema: Schema.Struct({ symbol: Schema.NullOr(SymbolDetailSchema) }),\n },\n list_plugins: {\n title: 'List Composer plugins',\n description: trim`\n List plugins detected in the monorepo. A plugin is a package whose src/meta.ts exports a \\`Plugin.Meta\\`.\n Use this to discover what plugins exist before drilling into surfaces / capabilities / operations / schemas.\n Filter by \\`id\\` substring (e.g. \"markdown\") to narrow the list.\n `,\n inputSchema: ListPluginsInput,\n outputSchema: Schema.Struct({ plugins: Schema.Array(PluginSchema) }),\n },\n list_surfaces: {\n title: 'List surfaces',\n description: trim`\n List Surface.create({ id, role, ... }) contributions across the monorepo. Use this to discover available\n surface ids when wiring a new container, or to check whether a surface name is already taken.\n Filter by \\`id\\` (plugin id) to scope to a single plugin's surfaces.\n `,\n inputSchema: ListSurfacesInput,\n outputSchema: Schema.Struct({ surfaces: Schema.Array(SurfaceSchema) }),\n },\n list_capabilities: {\n title: 'List capability contributions',\n description: trim`\n List Capability.contributes(<key>, ...) calls across the monorepo. Use this to discover which capability\n keys are produced (or required) by which plugins. Filter by \\`id\\` (plugin id) to scope to a single plugin.\n `,\n inputSchema: ListCapabilitiesInput,\n outputSchema: Schema.Struct({ capabilities: Schema.Array(CapabilitySchema) }),\n },\n list_operations: {\n title: 'List operations',\n description: trim`\n List operations contributed by plugins. An *operation* is a serializable\n request (verb + payload) dispatched through the OperationInvoker —\n Composer's equivalent of an action / command. Most plugins contribute\n these via \\`Capabilities.OperationHandler\\`. Filter by \\`id\\` (plugin id)\n to scope to a single plugin.\n `,\n inputSchema: ListOperationsInput,\n outputSchema: Schema.Struct({ operations: Schema.Array(OperationSchema) }),\n },\n list_schemas: {\n title: 'List schemas',\n description: trim`\n List ECHO-registered types contributed by plugins (declared via addSchemaModule).\n Use this to discover what data types exist before reading their shape.\n Filter by \\`id\\` (plugin id, e.g. \"org.dxos.plugin.markdown\") to scope to a single plugin's schemas.\n `,\n inputSchema: ListSchemasInput,\n outputSchema: Schema.Struct({ schemas: Schema.Array(SchemaSchema) }),\n },\n list_idioms: {\n title: 'List idioms',\n description: trim`\n List idioms catalogued across the monorepo. An *idiom* is a JSDoc-tagged\n reference example (\\`@idiom <slug>\\`) that pins the canonical way to use a\n symbol — applicability, anti-pattern, and links to related idioms. Use this\n to discover how a feature is meant to be used, or to find a worked example\n before writing new code. Filter by \\`slug\\` substring or by \\`hostKind\\`\n (\\`symbol\\`, \\`story\\`, \\`test\\`).\n `,\n inputSchema: ListIdiomsInput,\n outputSchema: Schema.Struct({ idioms: Schema.Array(IdiomSchema) }),\n },\n};\n\n/**\n * Materialize a tool's `inputSchema` (Effect Struct) into the\n * `Record<string, z.ZodTypeAny>` shape the MCP SDK's `registerTool` requires.\n * Called once per tool at server startup; throws with a clear message if a\n * tool's input uses a schema pattern the converter doesn't support.\n */\nexport const inputSchemaToZod = (struct: Schema.Struct<any>): Record<string, z.ZodTypeAny> => effectFieldsToZod(struct);\n"],"mappings":";;;;;AAWA,IAAa,qBAAqB;;;;;;AAOlC,IAAa,iBAAiB;;;ACA9B,IAAa,mBAAmB,OAAO,QACrC,YACA,SACA,aACA,QACA,QACA,YACA,aACA,SACF;AAGA,IAAa,sBAAsB,OAAO,QAAQ,UAAU,OAAO;AAGnE,IAAa,uBAAuB,OAAO,OAAO;CAChD,MAAM,OAAO;CACb,MAAM,OAAO;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