@dxos/introspect-tools 0.8.4-main.4f23b4e393 → 0.8.4-main.765dc60934

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/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -106,6 +106,18 @@ var ListSurfacesInput = PluginIdFilter;
106
106
  var ListCapabilitiesInput = PluginIdFilter;
107
107
  var ListOperationsInput = PluginIdFilter;
108
108
  var ListSchemasInput = PluginIdFilter;
109
+ var IdiomHostKindEnum = Schema.Literal("story", "test", "symbol");
110
+ var ListIdiomsInput = Schema.Struct({
111
+ slug: Schema.optional(Schema.String).annotations({
112
+ title: "Slug filter",
113
+ description: "Substring of the idiom slug (case-insensitive). Omit to list every idiom."
114
+ }),
115
+ hostKind: Schema.optional(IdiomHostKindEnum).annotations({
116
+ title: "Host kind",
117
+ description: "Filter idioms by their host site: `symbol` (production code), `story`, or `test`."
118
+ }),
119
+ ...ListOptionsInput.fields
120
+ });
109
121
 
110
122
  // src/metadata.ts
111
123
  var TOOL_METADATA = {
@@ -199,6 +211,18 @@ var TOOL_METADATA = {
199
211
  Filter by \`id\` (plugin id, e.g. "org.dxos.plugin.markdown") to scope to a single plugin's schemas.
200
212
  `,
201
213
  inputSchema: ListSchemasInput
214
+ },
215
+ list_idioms: {
216
+ title: "List idioms",
217
+ description: trim2`
218
+ List idioms catalogued across the monorepo. An *idiom* is a JSDoc-tagged
219
+ reference example (\`@idiom <slug>\`) that pins the canonical way to use a
220
+ symbol — applicability, anti-pattern, and links to related idioms. Use this
221
+ to discover how a feature is meant to be used, or to find a worked example
222
+ before writing new code. Filter by \`slug\` substring or by \`hostKind\`
223
+ (\`symbol\`, \`story\`, \`test\`).
224
+ `,
225
+ inputSchema: ListIdiomsInput
202
226
  }
203
227
  };
204
228
  var inputSchemaToZod = (struct) => effectFieldsToZod(struct);
@@ -307,13 +331,43 @@ var PluginDetailSchema = Schema2.Struct({
307
331
  operations: Schema2.Array(OperationSchema),
308
332
  schemas: Schema2.Array(SchemaSchema)
309
333
  });
334
+ var IdiomHostKindSchema = Schema2.Literal("story", "test", "symbol");
335
+ var IdiomHostSchema = Schema2.Struct({
336
+ /** Path relative to the scan root. */
337
+ file: Schema2.String,
338
+ /** 1-indexed line where the JSDoc opens. */
339
+ line: Schema2.Number,
340
+ /** Best-effort name of the export immediately following the JSDoc. */
341
+ symbol: Schema2.optional(Schema2.String),
342
+ /** Detected host kind based on file location and symbol shape. */
343
+ kind: IdiomHostKindSchema
344
+ });
345
+ var IdiomSchema = Schema2.Struct({
346
+ /** Globally unique AT Protocol NSID (https://atproto.com/specs/nsid). */
347
+ slug: Schema2.String,
348
+ /** Leading JSDoc paragraph (rationale). */
349
+ summary: Schema2.optional(Schema2.String),
350
+ /** Applicability (required field per IDIOMS.md). */
351
+ applies: Schema2.String,
352
+ /** Anti-pattern this replaces. */
353
+ insteadOf: Schema2.optional(Schema2.String),
354
+ /** Raw {@link …} targets named under `uses:`. */
355
+ uses: Schema2.Array(Schema2.String),
356
+ /** Slugs of related idioms. */
357
+ related: Schema2.Array(Schema2.String),
358
+ host: IdiomHostSchema
359
+ });
310
360
  export {
311
361
  CapabilitySchema,
312
362
  DEFAULT_LIST_LIMIT,
313
363
  FindSymbolInput,
314
364
  GetPackageInput,
315
365
  GetSymbolInput,
366
+ IdiomHostKindSchema,
367
+ IdiomHostSchema,
368
+ IdiomSchema,
316
369
  ListCapabilitiesInput,
370
+ ListIdiomsInput,
317
371
  ListOperationsInput,
318
372
  ListOptionsInput,
319
373
  ListPackagesInput,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/limits.ts", "../../../src/metadata.ts", "../../../src/schemas.ts", "../../../src/output-schemas.ts"],
4
- "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// 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 FindSymbolInput,\n GetPackageInput,\n GetSymbolInput,\n ListCapabilitiesInput,\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/**\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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", "//\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// 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;\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"],
5
- "mappings": ";;;AAWO,IAAMA,qBAAqB;AAO3B,IAAMC,iBAAiB;;;ACH9B,SAASC,yBAAyB;AAClC,SAASC,QAAAA,aAAY;;;ACFrB,YAAYC,YAAY;AAGxB,SAASC,YAAY;AAcd,IAAMC,qBAAqB;AAI3B,IAAMC,YAAY,CAACC,QACvBA,IAAIC,YAAwCH,kBAAAA;AAUxC,IAAMI,mBAA0BC,cAAO;EAC5CC,OAAcC,gBACLC,cAAOC,KAAYC,WAAG,GAAWC,gBAAQ,GAAWC,yBAAkBC,cAAAA,CAAAA,CAAAA,EAC7EV,YAAY;IACZW,OAAO;IACPC,aAAaC;yCACwBC,kBAAAA,SAA2BJ,cAAAA;;EAElE,CAAA;EACAK,SAAgBX,gBAAgBY,cAAO,EAAEhB,YAAY;IACnDW,OAAO;IACPC,aAAaC;;;;EAIf,CAAA;AACF,CAAA;AAEA,IAAMI,iBAAwBC,eAAQ,YAAY,SAAS,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UAAU/B;AACZ,CAAA;AAGO,IAAM2C,mBAA0B1C,eAAO;EAC5CwC,UAAUlC;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM6C,kBAAyB5C,eAAO;EAC3CwC,UAAUlC;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM8C,eAAsB7C,eAAO;EACxCwC,UAAUlC;;EAEVE,MAAaN;;EAEb4C,UAAiBhC,iBAAgBZ,cAAM;EACvC4B,UAAU/B;AACZ,CAAA;AAGO,IAAMgD,qBAA4B/C,eAAO;EAC9C,GAAGgC,aAAahB;EAChBgC,UAAiB9B,cAAMqB,aAAAA;EACvBU,cAAqB/B,cAAMwB,gBAAAA;EAC3BQ,YAAmBhC,cAAM0B,eAAAA;EACzBO,SAAgBjC,cAAM2B,YAAAA;AACxB,CAAA;",
6
- "names": ["DEFAULT_LIST_LIMIT", "MAX_LIST_LIMIT", "effectFieldsToZod", "trim", "Schema", "trim", "PickerAnnotationId", "getPicker", "ast", "annotations", "ListOptionsInput", "Struct", "limit", "optional", "Number", "pipe", "int", "positive", "lessThanOrEqualTo", "MAX_LIST_LIMIT", "title", "description", "trim", "DEFAULT_LIST_LIMIT", "compact", "Boolean", "SymbolKindEnum", "Literal", "IncludeEnum", "ListPackagesInput", "name", "String", "pathPrefix", "privateOnly", "fields", "GetPackageInput", "ListSymbolsInput", "package", "kind", "FindSymbolInput", "query", "GetSymbolInput", "ref", "include", "Array", "ListPluginsInput", "id", "PluginIdFilter", "ListSurfacesInput", "ListCapabilitiesInput", "ListOperationsInput", "ListSchemasInput", "TOOL_METADATA", "list_packages", "title", "description", "trim", "inputSchema", "ListPackagesInput", "get_package", "GetPackageInput", "list_symbols", "ListSymbolsInput", "find_symbol", "FindSymbolInput", "get_symbol", "GetSymbolInput", "list_plugins", "ListPluginsInput", "list_surfaces", "ListSurfacesInput", "list_capabilities", "ListCapabilitiesInput", "list_operations", "ListOperationsInput", "list_schemas", "ListSchemasInput", "inputSchemaToZod", "struct", "effectFieldsToZod", "Schema", "SymbolKindSchema", "Literal", "SymbolIncludeSchema", "SourceLocationSchema", "Struct", "file", "String", "line", "Number", "column", "PluginIdSchema", "PackageSchema", "name", "version", "private", "Boolean", "path", "description", "optional", "PackageDetailSchema", "fields", "workspaceDependencies", "Array", "externalDependencies", "entryPoints", "exportCount", "SymbolMatchSchema", "ref", "package", "kind", "summary", "SymbolDetailSchema", "signature", "jsdoc", "location", "source", "PluginSchema", "id", "icon", "iconHue", "tags", "dependsOn", "metaLocation", "SurfaceSchema", "pluginId", "role", "CapabilitySchema", "type", "OperationSchema", "SchemaSchema", "typename", "PluginDetailSchema", "surfaces", "capabilities", "operations", "schemas"]
4
+ "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// 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 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/**\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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", "//\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// 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"],
5
+ "mappings": ";;;AAWO,IAAMA,qBAAqB;AAO3B,IAAMC,iBAAiB;;;ACH9B,SAASC,yBAAyB;AAClC,SAASC,QAAAA,aAAY;;;ACFrB,YAAYC,YAAY;AAGxB,SAASC,YAAY;AAcd,IAAMC,qBAAqB;AAI3B,IAAMC,YAAY,C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eAAAA;EACzBO,SAAgBjC,cAAM2B,YAAAA;AACxB,CAAA;AAOO,IAAMO,sBAA6BvD,gBAAQ,SAAS,QAAQ,QAAA;AAG5D,IAAMwD,kBAAyBrD,eAAO;;EAE3CC,MAAaC;;EAEbC,MAAaC;;EAEbkD,QAAexC,iBAAgBZ,cAAM;;EAErCuB,MAAM2B;AACR,CAAA;AAGO,IAAMG,cAAqBvD,eAAO;;EAEvCwD,MAAatD;;EAEbwB,SAAgBZ,iBAAgBZ,cAAM;;EAEtCuD,SAAgBvD;;EAEhBwD,WAAkB5C,iBAAgBZ,cAAM;;EAExCyD,MAAazC,cAAahB,cAAM;;EAEhC0D,SAAgB1C,cAAahB,cAAM;EACnC2D,MAAMR;AACR,CAAA;",
6
+ "names": ["DEFAULT_LIST_LIMIT", "MAX_LIST_LIMIT", "effectFieldsToZod", "trim", "Schema", "trim", "PickerAnnotationId", "getPicker", "ast", "annotations", "ListOptionsInput", "Struct", "limit", "optional", "Number", "pipe", "int", "positive", "lessThanOrEqualTo", "MAX_LIST_LIMIT", "title", "description", "trim", "DEFAULT_LIST_LIMIT", "compact", "Boolean", "SymbolKindEnum", "Literal", "IncludeEnum", "ListPackagesInput", "name", "String", "pathPrefix", "privateOnly", "fields", "GetPackageInput", "ListSymbolsInput", "package", "kind", "FindSymbolInput", "query", "GetSymbolInput", "ref", "include", "Array", "ListPluginsInput", "id", "PluginIdFilter", "ListSurfacesInput", "ListCapabilitiesInput", "ListOperationsInput", "ListSchemasInput", "IdiomHostKindEnum", "ListIdiomsInput", "slug", "hostKind", "TOOL_METADATA", "list_packages", "title", "description", "trim", "inputSchema", "ListPackagesInput", "get_package", "GetPackageInput", "list_symbols", "ListSymbolsInput", "find_symbol", "FindSymbolInput", "get_symbol", "GetSymbolInput", "list_plugins", "ListPluginsInput", "list_surfaces", "ListSurfacesInput", "list_capabilities", "ListCapabilitiesInput", "list_operations", "ListOperationsInput", "list_schemas", "ListSchemasInput", "list_idioms", "ListIdiomsInput", "inputSchemaToZod", "struct", "effectFieldsToZod", "Schema", "SymbolKindSchema", "Literal", "SymbolIncludeSchema", "SourceLocationSchema", "Struct", "file", "String", "line", "Number", "column", "PluginIdSchema", "PackageSchema", "name", "version", "private", "Boolean", "path", "description", "optional", "PackageDetailSchema", "fields", "workspaceDependencies", "Array", "externalDependencies", "entryPoints", "exportCount", "SymbolMatchSchema", "ref", "package", "kind", "summary", "SymbolDetailSchema", "signature", "jsdoc", "location", "source", "PluginSchema", "id", "icon", "iconHue", "tags", "dependsOn", "metaLocation", "SurfaceSchema", "pluginId", "role", "CapabilitySchema", "type", "OperationSchema", "SchemaSchema", "typename", "PluginDetailSchema", "surfaces", "capabilities", "operations", "schemas", "IdiomHostKindSchema", "IdiomHostSchema", "symbol", "IdiomSchema", "slug", "applies", "insteadOf", "uses", "related", "host"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/limits.ts":{"bytes":3000,"imports":[],"format":"esm"},"src/schemas.ts":{"bytes":19124,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/limits.ts","kind":"import-statement","original":"./limits"}],"format":"esm"},"src/metadata.ts":{"bytes":17520,"imports":[{"path":"@dxos/effect-zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/schemas.ts","kind":"import-statement","original":"./schemas"}],"format":"esm"},"src/output-schemas.ts":{"bytes":16899,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":4750,"imports":[{"path":"src/limits.ts","kind":"import-statement","original":"./limits"},{"path":"src/metadata.ts","kind":"import-statement","original":"./metadata"},{"path":"src/output-schemas.ts","kind":"import-statement","original":"./output-schemas"},{"path":"src/schemas.ts","kind":"import-statement","original":"./schemas"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26862},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/effect-zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["CapabilitySchema","DEFAULT_LIST_LIMIT","FindSymbolInput","GetPackageInput","GetSymbolInput","ListCapabilitiesInput","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"],"entryPoint":"src/index.ts","inputs":{"src/limits.ts":{"bytesInOutput":55},"src/index.ts":{"bytesInOutput":0},"src/metadata.ts":{"bytesInOutput":4372},"src/schemas.ts":{"bytesInOutput":3575},"src/output-schemas.ts":{"bytesInOutput":3898}},"bytes":12698}}}
1
+ {"inputs":{"src/limits.ts":{"bytes":3000,"imports":[],"format":"esm"},"src/schemas.ts":{"bytes":21017,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/limits.ts","kind":"import-statement","original":"./limits"}],"format":"esm"},"src/metadata.ts":{"bytes":19089,"imports":[{"path":"@dxos/effect-zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/schemas.ts","kind":"import-statement","original":"./schemas"}],"format":"esm"},"src/output-schemas.ts":{"bytes":20735,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":5194,"imports":[{"path":"src/limits.ts","kind":"import-statement","original":"./limits"},{"path":"src/metadata.ts","kind":"import-statement","original":"./metadata"},{"path":"src/output-schemas.ts","kind":"import-statement","original":"./output-schemas"},{"path":"src/schemas.ts","kind":"import-statement","original":"./schemas"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":30234},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/effect-zod","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["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"],"entryPoint":"src/index.ts","inputs":{"src/limits.ts":{"bytesInOutput":55},"src/index.ts":{"bytesInOutput":0},"src/metadata.ts":{"bytesInOutput":4929},"src/schemas.ts":{"bytesInOutput":4083},"src/output-schemas.ts":{"bytesInOutput":4950}},"bytes":14891}}}
@@ -106,6 +106,18 @@ var ListSurfacesInput = PluginIdFilter;
106
106
  var ListCapabilitiesInput = PluginIdFilter;
107
107
  var ListOperationsInput = PluginIdFilter;
108
108
  var ListSchemasInput = PluginIdFilter;
109
+ var IdiomHostKindEnum = Schema.Literal("story", "test", "symbol");
110
+ var ListIdiomsInput = Schema.Struct({
111
+ slug: Schema.optional(Schema.String).annotations({
112
+ title: "Slug filter",
113
+ description: "Substring of the idiom slug (case-insensitive). Omit to list every idiom."
114
+ }),
115
+ hostKind: Schema.optional(IdiomHostKindEnum).annotations({
116
+ title: "Host kind",
117
+ description: "Filter idioms by their host site: `symbol` (production code), `story`, or `test`."
118
+ }),
119
+ ...ListOptionsInput.fields
120
+ });
109
121
 
110
122
  // src/metadata.ts
111
123
  var TOOL_METADATA = {
@@ -199,6 +211,18 @@ var TOOL_METADATA = {
199
211
  Filter by \`id\` (plugin id, e.g. "org.dxos.plugin.markdown") to scope to a single plugin's schemas.
200
212
  `,
201
213
  inputSchema: ListSchemasInput
214
+ },
215
+ list_idioms: {
216
+ title: "List idioms",
217
+ description: trim2`
218
+ List idioms catalogued across the monorepo. An *idiom* is a JSDoc-tagged
219
+ reference example (\`@idiom <slug>\`) that pins the canonical way to use a
220
+ symbol — applicability, anti-pattern, and links to related idioms. Use this
221
+ to discover how a feature is meant to be used, or to find a worked example
222
+ before writing new code. Filter by \`slug\` substring or by \`hostKind\`
223
+ (\`symbol\`, \`story\`, \`test\`).
224
+ `,
225
+ inputSchema: ListIdiomsInput
202
226
  }
203
227
  };
204
228
  var inputSchemaToZod = (struct) => effectFieldsToZod(struct);
@@ -307,13 +331,43 @@ var PluginDetailSchema = Schema2.Struct({
307
331
  operations: Schema2.Array(OperationSchema),
308
332
  schemas: Schema2.Array(SchemaSchema)
309
333
  });
334
+ var IdiomHostKindSchema = Schema2.Literal("story", "test", "symbol");
335
+ var IdiomHostSchema = Schema2.Struct({
336
+ /** Path relative to the scan root. */
337
+ file: Schema2.String,
338
+ /** 1-indexed line where the JSDoc opens. */
339
+ line: Schema2.Number,
340
+ /** Best-effort name of the export immediately following the JSDoc. */
341
+ symbol: Schema2.optional(Schema2.String),
342
+ /** Detected host kind based on file location and symbol shape. */
343
+ kind: IdiomHostKindSchema
344
+ });
345
+ var IdiomSchema = Schema2.Struct({
346
+ /** Globally unique AT Protocol NSID (https://atproto.com/specs/nsid). */
347
+ slug: Schema2.String,
348
+ /** Leading JSDoc paragraph (rationale). */
349
+ summary: Schema2.optional(Schema2.String),
350
+ /** Applicability (required field per IDIOMS.md). */
351
+ applies: Schema2.String,
352
+ /** Anti-pattern this replaces. */
353
+ insteadOf: Schema2.optional(Schema2.String),
354
+ /** Raw {@link …} targets named under `uses:`. */
355
+ uses: Schema2.Array(Schema2.String),
356
+ /** Slugs of related idioms. */
357
+ related: Schema2.Array(Schema2.String),
358
+ host: IdiomHostSchema
359
+ });
310
360
  export {
311
361
  CapabilitySchema,
312
362
  DEFAULT_LIST_LIMIT,
313
363
  FindSymbolInput,
314
364
  GetPackageInput,
315
365
  GetSymbolInput,
366
+ IdiomHostKindSchema,
367
+ IdiomHostSchema,
368
+ IdiomSchema,
316
369
  ListCapabilitiesInput,
370
+ ListIdiomsInput,
317
371
  ListOperationsInput,
318
372
  ListOptionsInput,
319
373
  ListPackagesInput,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/limits.ts", "../../../src/metadata.ts", "../../../src/schemas.ts", "../../../src/output-schemas.ts"],
4
- "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// 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 FindSymbolInput,\n GetPackageInput,\n GetSymbolInput,\n ListCapabilitiesInput,\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/**\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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", "//\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// 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;\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"],
5
- "mappings": ";;;AAWO,IAAMA,qBAAqB;AAO3B,IAAMC,iBAAiB;;;ACH9B,SAASC,yBAAyB;AAClC,SAASC,QAAAA,aAAY;;;ACFrB,YAAYC,YAAY;AAGxB,SAASC,YAAY;AAcd,IAAMC,qB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ACvC,CAAA;AAOO,IAAM8B,eAAsBhC,eAAO;;EAExCiC,IAAI3B;;EAEJkB,SAAgBtB;EAChBM,MAAaM,iBAAgBZ,cAAM;EACnCW,aAAoBC,iBAAgBZ,cAAM;EAC1CgC,MAAapB,iBAAgBZ,cAAM;EACnCiC,SAAgBrB,iBAAgBZ,cAAM;;EAEtCkC,MAAalB,cAAahB,cAAM;;;;;;EAMhCmC,WAAkBnB,cAAMZ,cAAAA;;EAExBgC,cAAcvC;AAChB,CAAA;AAGO,IAAMwC,gBAAuBvC,eAAO;EACzCwC,UAAUlC;;EAEV2B,IAAW/B;;EAEXuC,MAAavB,cAAahB,cAAM;EAChC4B,UAAU/B;AACZ,CAAA;AAGO,IAAM2C,mBAA0B1C,eAAO;EAC5CwC,UAAUlC;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM6C,kBAAyB5C,eAAO;EAC3CwC,UAAUlC;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM8C,eAAsB7C,eAAO;EACxCwC,UAAUlC;;EAEVE,MAAaN;;EAEb4C,UAAiBhC,iBAAgBZ,cAAM;EACvC4B,UAAU/B;AACZ,CAAA;AAGO,IAAMgD,qBAA4B/C,eAAO;EAC9C,GAAGgC,aAAahB;EAChBgC,UAAiB9B,cAAMqB,aAAAA;EACvBU,cAAqB/B,cAAMwB,gBAAAA;EAC3BQ,YAAmBhC,cAAM0B,eAAAA;EACzBO,SAAgBjC,cAAM2B,YAAAA;AACxB,CAAA;",
6
- "names": ["DEFAULT_LIST_LIMIT", "MAX_LIST_LIMIT", "effectFieldsToZod", "trim", "Schema", "trim", "PickerAnnotationId", "getPicker", "ast", "annotations", "ListOptionsInput", "Struct", "limit", "optional", "Number", "pipe", "int", "positive", "lessThanOrEqualTo", "MAX_LIST_LIMIT", "title", "description", "trim", "DEFAULT_LIST_LIMIT", "compact", "Boolean", "SymbolKindEnum", "Literal", "IncludeEnum", "ListPackagesInput", "name", "String", "pathPrefix", "privateOnly", "fields", "GetPackageInput", "ListSymbolsInput", "package", "kind", "FindSymbolInput", "query", "GetSymbolInput", "ref", "include", "Array", "ListPluginsInput", "id", "PluginIdFilter", "ListSurfacesInput", "ListCapabilitiesInput", "ListOperationsInput", "ListSchemasInput", "TOOL_METADATA", "list_packages", "title", "description", "trim", "inputSchema", "ListPackagesInput", "get_package", "GetPackageInput", "list_symbols", "ListSymbolsInput", "find_symbol", "FindSymbolInput", "get_symbol", "GetSymbolInput", "list_plugins", "ListPluginsInput", "list_surfaces", "ListSurfacesInput", "list_capabilities", "ListCapabilitiesInput", "list_operations", "ListOperationsInput", "list_schemas", "ListSchemasInput", "inputSchemaToZod", "struct", "effectFieldsToZod", "Schema", "SymbolKindSchema", "Literal", "SymbolIncludeSchema", "SourceLocationSchema", "Struct", "file", "String", "line", "Number", "column", "PluginIdSchema", "PackageSchema", "name", "version", "private", "Boolean", "path", "description", "optional", "PackageDetailSchema", "fields", "workspaceDependencies", "Array", "externalDependencies", "entryPoints", "exportCount", "SymbolMatchSchema", "ref", "package", "kind", "summary", "SymbolDetailSchema", "signature", "jsdoc", "location", "source", "PluginSchema", "id", "icon", "iconHue", "tags", "dependsOn", "metaLocation", "SurfaceSchema", "pluginId", "role", "CapabilitySchema", "type", "OperationSchema", "SchemaSchema", "typename", "PluginDetailSchema", "surfaces", "capabilities", "operations", "schemas"]
4
+ "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// 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 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/**\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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", "//\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// 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"],
5
+ "mappings": ";;;AAWO,IAAMA,qBAAqB;AAO3B,IAAMC,iBAAiB;;;ACH9B,SAASC,yBAAyB;AAClC,SAASC,QAAAA,aAAY;;;ACFrB,YAAYC,YAAY;AAGxB,SAASC,YAAY;AAcd,IAAMC,qBAAqB;AAI3B,IAAMC,YAAY,CAACC,QACvBA,IAAIC,YAAwCH,kBAAAA;AAUxC,IAAMI,mBAA0BC,cAAO;EAC5CC,OAAcC,gBACLC,cAAOC,KAAYC,WAAG,GAAWC,gBAAQ,GAAWC,yBAAkBC,cAAAA,CAAAA,CAAAA,EAC7EV,YAAY;IACZW,OAAO;IACPC,aAAaC;yCACwBC,kBAAAA,SAA2BJ,cAAAA;;EAElE,CAAA;EACAK,SAAgBX,gBAAgBY,cAAO,EAAEhB,YAAY;IACnDW,OAAO;IACPC,aAAaC;;;;EAIf,CAAA;AACF,CAAA;AAEA,IAAMI,iBAAwBC,eAAQ,YAAY,SAAS,aAAa,QAAQ,QAAQ,YAAY,WAAA;AAEpG,IAAMC,cAAqBD,eAAQ,UAAU,OAAA;AAMtC,IAAME,oBAA2BlB,cAAO;EAC7CmB,MAAajB,gBAAgBkB,aAAM,EAAEtB,YAAY;IAC/CW,OAAO;IACPC,aAAa;IACb,CAACf,kBAAAA,GAAqB;EACxB,CAAA;EACA0B,YAAmBnB,gBAAgBkB,aAAM,EAAEtB,YAAY;IACrDW,OAAO;EACT,CAAA;EACAa,aAAoBpB,gBAAgBY,cAAO,EAAEhB,YAAY;IACvDW,OAAO;IACPC,aAAa;EACf,CAAA;EACA,GAAGX,iBAAiBwB;AACtB,CAAA;AAEO,IAAMC,kBAA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C;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM6C,kBAAyB5C,eAAO;EAC3CwC,UAAUlC;;EAEVqC,MAAazC;EACb4B,UAAU/B;AACZ,CAAA;AAGO,IAAM8C,eAAsB7C,eAAO;EACxCwC,UAAUlC;;EAEVE,MAAaN;;EAEb4C,UAAiBhC,iBAAgBZ,cAAM;EACvC4B,UAAU/B;AACZ,CAAA;AAGO,IAAMgD,qBAA4B/C,eAAO;EAC9C,GAAGgC,aAAahB;EAChBgC,UAAiB9B,cAAMqB,aAAAA;EACvBU,cAAqB/B,cAAMwB,gBAAAA;EAC3BQ,YAAmBhC,cAAM0B,eAAAA;EACzBO,SAAgBjC,cAAM2B,YAAAA;AACxB,CAAA;AAOO,IAAMO,sBAA6BvD,gBAAQ,SAAS,QAAQ,QAAA;AAG5D,IAAMwD,kBAAyBrD,eAAO;;EAE3CC,MAAaC;;EAEbC,MAAaC;;EAEbkD,QAAexC,iBAAgBZ,cAAM;;EAErCuB,MAAM2B;AACR,CAAA;AAGO,IAAMG,cAAqBvD,eAAO;;EAEvCwD,MAAatD;;EAEbwB,SAAgBZ,iBAAgBZ,cAAM;;EAEtCuD,SAAgBvD;;EAEhBwD,WAAkB5C,iBAAgBZ,cAAM;;EAExCyD,MAAazC,cAAahB,cAAM;;EAEhC0D,SAAgB1C,cAAahB,cAAM;EACnC2D,MAAMR;AACR,CAAA;",
6
+ "names": ["DEFAULT_LIST_LIMIT", "MAX_LIST_LIMIT", "effectFieldsToZod", "trim", "Schema", "trim", "PickerAnnotationId", "getPicker", "ast", "annotations", "ListOptionsInput", "Struct", "limit", "optional", "Number", "pipe", "int", "positive", "lessThanOrEqualTo", "MAX_LIST_LIMIT", "title", "description", "trim", "DEFAULT_LIST_LIMIT", "compact", "Boolean", "SymbolKindEnum", "Literal", "IncludeEnum", "ListPackagesInput", "name", "String", "pathPrefix", "privateOnly", "fields", "GetPackageInput", "ListSymbolsInput", "package", "kind", "FindSymbolInput", "query", "GetSymbolInput", "ref", "include", "Array", "ListPluginsInput", "id", "PluginIdFilter", "ListSurfacesInput", "ListCapabilitiesInput", "ListOperationsInput", "ListSchemasInput", "IdiomHostKindEnum", "ListIdiomsInput", "slug", "hostKind", "TOOL_METADATA", "list_packages", "title", "description", "trim", "inputSchema", "ListPackagesInput", "get_package", "GetPackageInput", "list_symbols", "ListSymbolsInput", "find_symbol", "FindSymbolInput", "get_symbol", "GetSymbolInput", "list_plugins", "ListPluginsInput", "list_surfaces", "ListSurfacesInput", "list_capabilities", "ListCapabilitiesInput", "list_operations", "ListOperationsInput", "list_schemas", "ListSchemasInput", "list_idioms", "ListIdiomsInput", "inputSchemaToZod", "struct", "effectFieldsToZod", "Schema", "SymbolKindSchema", "Literal", "SymbolIncludeSchema", "SourceLocationSchema", "Struct", "file", "String", "line", "Number", "column", "PluginIdSchema", "PackageSchema", "name", "version", "private", "Boolean", "path", "description", "optional", "PackageDetailSchema", "fields", "workspaceDependencies", "Array", "externalDependencies", "entryPoints", "exportCount", "SymbolMatchSchema", "ref", "package", "kind", "summary", "SymbolDetailSchema", "signature", "jsdoc", "location", "source", "PluginSchema", "id", "icon", "iconHue", "tags", "dependsOn", "metaLocation", "SurfaceSchema", "pluginId", "role", "CapabilitySchema", "type", "OperationSchema", "SchemaSchema", "typename", "PluginDetailSchema", "surfaces", "capabilities", "operations", "schemas", "IdiomHostKindSchema", "IdiomHostSchema", "symbol", "IdiomSchema", "slug", "applies", "insteadOf", "uses", "related", "host"]
7
7
  }