@dxos/introspect-mcp 0.8.4-main.dfabb4ec29 → 0.8.4-main.f466a3d56e
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 +102 -5
- package/dist/lib/node-esm/{chunk-A3LNEW4B.mjs → chunk-RWYFJ2XT.mjs} +41 -1
- package/dist/lib/node-esm/chunk-RWYFJ2XT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/tools/index.mjs +1 -1
- package/dist/types/src/tools/shaping.d.ts +2 -1
- package/dist/types/src/tools/shaping.d.ts.map +1 -1
- package/dist/types/src/tools/tools.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/server/http.test.ts +2 -1
- package/src/server/server.test.ts +1 -0
- package/src/server/stdio.test.ts +1 -0
- package/src/tools/shaping.ts +30 -0
- package/src/tools/tools.test.ts +2 -1
- package/src/tools/tools.ts +12 -0
- package/dist/lib/node-esm/chunk-A3LNEW4B.mjs.map +0 -7
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
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.
|
|
@@ -186,6 +186,29 @@ var shapeListSchemas = (all, opts = {}) => shapeList(all, opts, {
|
|
|
186
186
|
}),
|
|
187
187
|
truncationHint: "raise `limit` (max 200) or filter by plugin `id`."
|
|
188
188
|
});
|
|
189
|
+
var shapeListIdioms = (all, opts = {}) => shapeList(all, opts, {
|
|
190
|
+
full: (idiom) => ({
|
|
191
|
+
slug: idiom.slug,
|
|
192
|
+
summary: idiom.summary,
|
|
193
|
+
applies: idiom.applies,
|
|
194
|
+
insteadOf: idiom.insteadOf,
|
|
195
|
+
uses: idiom.uses,
|
|
196
|
+
related: idiom.related,
|
|
197
|
+
host: {
|
|
198
|
+
file: idiom.host.file,
|
|
199
|
+
line: idiom.host.line,
|
|
200
|
+
symbol: idiom.host.symbol,
|
|
201
|
+
kind: idiom.host.kind
|
|
202
|
+
}
|
|
203
|
+
}),
|
|
204
|
+
compact: (idiom) => ({
|
|
205
|
+
slug: idiom.slug,
|
|
206
|
+
kind: idiom.host.kind,
|
|
207
|
+
file: idiom.host.file,
|
|
208
|
+
symbol: idiom.host.symbol
|
|
209
|
+
}),
|
|
210
|
+
truncationHint: "raise `limit` (max 200), refine with `slug`, or filter by `hostKind`."
|
|
211
|
+
});
|
|
189
212
|
|
|
190
213
|
// src/tools/tools.ts
|
|
191
214
|
var pickListOptions = (args) => ({
|
|
@@ -346,6 +369,23 @@ var createToolDefinitions = (introspector, log) => ({
|
|
|
346
369
|
});
|
|
347
370
|
return shaped;
|
|
348
371
|
}
|
|
372
|
+
},
|
|
373
|
+
list_idioms: {
|
|
374
|
+
...TOOL_METADATA.list_idioms,
|
|
375
|
+
handler: (args) => {
|
|
376
|
+
const result = introspector.listIdioms({
|
|
377
|
+
slug: args.slug,
|
|
378
|
+
hostKind: args.hostKind
|
|
379
|
+
});
|
|
380
|
+
const shaped = shapeListIdioms(result, pickListOptions(args));
|
|
381
|
+
log({
|
|
382
|
+
tool: "list_idioms",
|
|
383
|
+
args,
|
|
384
|
+
count: result.length,
|
|
385
|
+
truncated: shaped.truncated
|
|
386
|
+
});
|
|
387
|
+
return shaped;
|
|
388
|
+
}
|
|
349
389
|
}
|
|
350
390
|
});
|
|
351
391
|
|
|
@@ -401,4 +441,4 @@ export {
|
|
|
401
441
|
registerLogger,
|
|
402
442
|
fileLogger
|
|
403
443
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
444
|
+
//# sourceMappingURL=chunk-RWYFJ2XT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/tools/tools.ts", "../../../src/tools/shaping.ts", "../../../src/tools/logger.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\n// Tool definitions — the metadata + handler body for every MCP tool the\n// introspect-mcp server exposes.\n//\n// Centralizing this map gives us:\n//\n// - One place to read when wondering \"what tools does this server expose?\"\n// - A simple shape for `server.ts` to iterate when registering tools, so the\n// server's only job is wiring (transport, error handling, readiness gate).\n// - A natural surface to extend without touching server-construction logic\n// — adding a tool is a single new entry in this map.\n//\n// Input schemas are authored in Effect Schema (see `@dxos/introspect-tools`)\n// so that downstream consumers like `react-ui-form` can render forms from\n// the same definitions. The MCP SDK requires zod, so the server converts at\n// registration time via `inputSchemaToZod` from `@dxos/introspect-tools`.\n//\n// Each handler returns a `ToolResult` (data + optional note + optional\n// truncated marker); the server wraps that in the MCP `content` envelope.\n// Handlers DO NOT call `await introspector.ready` themselves — the server\n// applies that gate uniformly via `withReady`, so a future tool can't\n// accidentally skip it.\n\nimport type * as Schema from 'effect/Schema';\n\nimport type { Introspector } from '@dxos/introspect';\nimport {\n TOOL_METADATA,\n type FindSymbolArgs,\n type GetPackageArgs,\n type GetSymbolArgs,\n type ListCapabilitiesArgs,\n type ListIdiomsArgs,\n type ListOperationsArgs,\n type ListOptions,\n type ListPackagesArgs,\n type ListPluginsArgs,\n type ListSchemasArgs,\n type ListSurfacesArgs,\n type ListSymbolsArgs,\n} from '@dxos/introspect-tools';\n\nimport type { ToolLogger } from './logger';\nimport {\n shapeFindSymbol,\n shapeGetPackage,\n shapeGetSymbol,\n shapeListCapabilities,\n shapeListIdioms,\n shapeListOperations,\n shapeListPackages,\n shapeListPlugins,\n shapeListSchemas,\n shapeListSurfaces,\n type ToolResult,\n} from './shaping';\n\n/** Pull the list-options bag out of an args object before forwarding to a shaper. */\nconst pickListOptions = (args: { limit?: number; compact?: boolean }): ListOptions => ({\n limit: args.limit,\n compact: args.compact,\n});\n\n/**\n * A single MCP tool — metadata + handler. The `inputSchema` field is the\n * Effect `Schema.Struct` that defines the input shape; the server converts\n * it to zod at registration via `effectFieldsToZod`. Authoring in Effect\n * Schema gives `react-ui-form` and other downstream consumers a single\n * source of truth.\n */\nexport type ToolDefinition<TArgs = Record<string, unknown>> = {\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. The server converts\n * to zod for the MCP SDK; downstream consumers (react-ui-form, etc.) can\n * use this directly.\n */\n inputSchema: Schema.Struct<any>;\n\n /** Tool body. Must NOT await `introspector.ready` — the server gates that uniformly. */\n handler: (args: TArgs) => ToolResult | Promise<ToolResult>;\n};\n\n/**\n * Build the tool map for a given introspector. Returning a map (rather than a\n * static const) lets the handlers close over the introspector instance and\n * the per-process logger. Title / description / inputSchema all come from the\n * shared `TOOL_METADATA` map in `@dxos/introspect-tools` so the contract is\n * authored once and consumed by both server (here) and browser callers.\n */\nexport const createToolDefinitions = (\n introspector: Introspector,\n log: ToolLogger,\n): Record<string, ToolDefinition<any>> => ({\n list_packages: {\n ...TOOL_METADATA.list_packages,\n handler: (args: ListPackagesArgs) => {\n const result = introspector.listPackages({\n name: args.name,\n pathPrefix: args.pathPrefix,\n privateOnly: args.privateOnly,\n });\n const shaped = shapeListPackages(result, pickListOptions(args));\n log({ tool: 'list_packages', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListPackagesArgs>,\n\n get_package: {\n ...TOOL_METADATA.get_package,\n handler: (args: GetPackageArgs) => {\n const detail = introspector.getPackage(args.name);\n log({ tool: 'get_package', args, found: detail !== null });\n if (!detail) {\n return { data: null, note: `No package named ${args.name}` };\n }\n return shapeGetPackage(detail);\n },\n } satisfies ToolDefinition<GetPackageArgs>,\n\n list_symbols: {\n ...TOOL_METADATA.list_symbols,\n handler: (args: ListSymbolsArgs) => {\n const matches = introspector.listSymbols(args.package, args.kind);\n const shaped = shapeFindSymbol(matches, pickListOptions(args));\n log({ tool: 'list_symbols', args, count: matches.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListSymbolsArgs>,\n\n find_symbol: {\n ...TOOL_METADATA.find_symbol,\n handler: (args: FindSymbolArgs) => {\n const matches = introspector.findSymbol(args.query, args.kind);\n const shaped = shapeFindSymbol(matches, pickListOptions(args));\n log({ tool: 'find_symbol', args, count: matches.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<FindSymbolArgs>,\n\n get_symbol: {\n ...TOOL_METADATA.get_symbol,\n handler: (args: GetSymbolArgs) => {\n const detail = introspector.getSymbol(args.ref, args.include as Array<'source' | 'jsdoc'> | undefined);\n log({ tool: 'get_symbol', args, found: detail !== null });\n if (!detail) {\n return { data: null, note: `No symbol with ref ${args.ref}` };\n }\n return shapeGetSymbol(detail);\n },\n } satisfies ToolDefinition<GetSymbolArgs>,\n\n list_plugins: {\n ...TOOL_METADATA.list_plugins,\n handler: (args: ListPluginsArgs) => {\n const result = introspector.listPlugins(args.id !== undefined ? { id: args.id } : undefined);\n const shaped = shapeListPlugins(result, pickListOptions(args));\n log({ tool: 'list_plugins', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListPluginsArgs>,\n\n list_surfaces: {\n ...TOOL_METADATA.list_surfaces,\n handler: (args: ListSurfacesArgs) => {\n const result = introspector.listSurfaces(args.id);\n const shaped = shapeListSurfaces(result, pickListOptions(args));\n log({ tool: 'list_surfaces', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListSurfacesArgs>,\n\n list_capabilities: {\n ...TOOL_METADATA.list_capabilities,\n handler: (args: ListCapabilitiesArgs) => {\n const result = introspector.listCapabilities(args.id);\n const shaped = shapeListCapabilities(result, pickListOptions(args));\n log({ tool: 'list_capabilities', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListCapabilitiesArgs>,\n\n list_operations: {\n ...TOOL_METADATA.list_operations,\n handler: (args: ListOperationsArgs) => {\n const result = introspector.listOperations(args.id);\n const shaped = shapeListOperations(result, pickListOptions(args));\n log({ tool: 'list_operations', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListOperationsArgs>,\n\n list_schemas: {\n ...TOOL_METADATA.list_schemas,\n handler: (args: ListSchemasArgs) => {\n const result = introspector.listSchemas(args.id);\n const shaped = shapeListSchemas(result, pickListOptions(args));\n log({ tool: 'list_schemas', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListSchemasArgs>,\n\n list_idioms: {\n ...TOOL_METADATA.list_idioms,\n handler: (args: ListIdiomsArgs) => {\n const result = introspector.listIdioms({ slug: args.slug, hostKind: args.hostKind });\n const shaped = shapeListIdioms(result, pickListOptions(args));\n log({ tool: 'list_idioms', args, count: result.length, truncated: shaped.truncated });\n return shaped;\n },\n } satisfies ToolDefinition<ListIdiomsArgs>,\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// Response shaping for token budgets.\n//\n// Tool responses target a sane default size for the LLM context (~30 list\n// items, single-record fetches kept compact via `include` opt-ins). Callers\n// that legitimately need a longer list pass `limit`; callers in \"discovery\n// mode\" (just want to see what exists) pass `compact: true` for a refs/ids-\n// only projection at roughly 1/4 the wire size.\n\nimport type {\n Capability,\n Idiom,\n Operation,\n Package,\n PackageDetail,\n Plugin,\n PluginDetail,\n Schema,\n Surface,\n SymbolDetail,\n SymbolMatch,\n} from '@dxos/introspect';\nimport { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT, type ListOptions } from '@dxos/introspect-tools';\n\nconst SOURCE_PREVIEW = 1200;\nconst JSDOC_PREVIEW = 600;\n\nexport type ToolResult = {\n data: unknown;\n note?: string;\n truncated?: string;\n};\n\ntype ShapeListConfig<T> = {\n /** Full projection — what an LLM gets when `compact` is false/omitted. */\n full: (item: T) => Record<string, unknown>;\n /** Compact projection — ids / typenames / names only. */\n compact: (item: T) => Record<string, unknown>;\n /** Suffix for the `truncated` note: \"<N> more results — <hint>\". */\n truncationHint: string;\n};\n\nconst shapeList = <T>(all: readonly T[], opts: ListOptions, config: ShapeListConfig<T>): ToolResult => {\n const requested = opts.limit ?? DEFAULT_LIST_LIMIT;\n const limit = Math.min(Math.max(0, Math.floor(requested)), MAX_LIST_LIMIT);\n const project = opts.compact ? config.compact : config.full;\n const data = all.slice(0, limit).map(project);\n if (all.length > limit) {\n return {\n data,\n truncated: `${all.length - limit} more results — ${config.truncationHint}`,\n };\n }\n return { data };\n};\n\n//\n// Packages\n//\n\nexport const shapeListPackages = (all: Package[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (p) => ({\n name: p.name,\n version: p.version,\n private: p.private,\n path: p.path,\n description: p.description,\n }),\n compact: (p) => ({ name: p.name, path: p.path }),\n truncationHint: 'raise `limit` (max 200), refine with `name`/`pathPrefix`, or call get_package directly.',\n });\n\nexport const shapeGetPackage = (detail: PackageDetail): ToolResult => ({\n data: {\n name: detail.name,\n version: detail.version,\n private: detail.private,\n path: detail.path,\n description: detail.description,\n workspaceDependencies: detail.workspaceDependencies,\n externalDependencies: detail.externalDependencies,\n entryPoints: detail.entryPoints,\n // Surfaced so callers can decide whether to call find_symbol against this package.\n exportCount: detail.exportCount,\n },\n});\n\n//\n// Symbols\n//\n\nexport const shapeFindSymbol = (matches: SymbolMatch[], opts: ListOptions = {}): ToolResult =>\n shapeList(matches, opts, {\n full: (m) => ({ ref: m.ref, name: m.name, package: m.package, kind: m.kind, summary: m.summary }),\n compact: (m) => ({ ref: m.ref, name: m.name }),\n truncationHint: 'raise `limit` (max 200), refine the query, or filter by `kind`.',\n });\n\nexport const shapeGetSymbol = (detail: SymbolDetail): ToolResult => {\n const result: Record<string, unknown> = {\n ref: detail.ref,\n package: detail.package,\n name: detail.name,\n kind: detail.kind,\n signature: detail.signature,\n summary: detail.summary,\n location: detail.location,\n };\n if (detail.jsdoc) {\n result.jsdoc = truncate(detail.jsdoc, JSDOC_PREVIEW);\n }\n if (detail.source !== undefined) {\n result.source = truncate(detail.source, SOURCE_PREVIEW);\n }\n return { data: result };\n};\n\nconst truncate = (s: string, limit: number): string => {\n if (s.length <= limit) {\n return s;\n }\n return `${s.slice(0, limit)}\\n... (truncated, ${s.length - limit} more chars)`;\n};\n\n//\n// Plugin / surface / capability / operation / schema (main's flatter types)\n//\n\nexport const shapeListPlugins = (all: Plugin[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (p) => ({\n id: p.id,\n package: p.package,\n name: p.name,\n description: p.description,\n icon: p.icon,\n iconHue: p.iconHue,\n tags: p.tags,\n dependsOn: p.dependsOn,\n }),\n compact: (p) => ({ id: p.id, name: p.name }),\n truncationHint: 'raise `limit` (max 200) or filter with `id` substring.',\n });\n\n/**\n * `PluginDetail` is the same shape as `Plugin` plus arrays of contributions.\n * Returned by what would be `get_plugin` if the introspector exposed it; we\n * synthesize this on the MCP side by combining `listPlugins` + the per-id\n * `listSurfaces` / `listCapabilities` / `listOperations` / `listSchemas` calls.\n */\nexport const shapePluginDetail = (detail: PluginDetail): ToolResult => ({\n data: {\n id: detail.id,\n package: detail.package,\n name: detail.name,\n description: detail.description,\n icon: detail.icon,\n iconHue: detail.iconHue,\n tags: detail.tags,\n dependsOn: detail.dependsOn,\n metaLocation: detail.metaLocation,\n surfaces: detail.surfaces.map((s) => ({ id: s.id, role: s.role })),\n capabilities: detail.capabilities.map((c) => ({ type: c.type })),\n operations: detail.operations.map((o) => ({ type: o.type })),\n schemas: detail.schemas.map((s) => ({ name: s.name, typename: s.typename })),\n },\n});\n\nexport const shapeListSurfaces = (all: Surface[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (s) => ({ pluginId: s.pluginId, id: s.id, role: s.role, location: s.location }),\n compact: (s) => ({ pluginId: s.pluginId, id: s.id }),\n truncationHint: 'raise `limit` (max 200) or filter by plugin `id`.',\n });\n\nexport const shapeListCapabilities = (all: Capability[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (c) => ({ pluginId: c.pluginId, type: c.type, location: c.location }),\n compact: (c) => ({ pluginId: c.pluginId, type: c.type }),\n truncationHint: 'raise `limit` (max 200) or filter by plugin `id`.',\n });\n\nexport const shapeListOperations = (all: Operation[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (o) => ({ pluginId: o.pluginId, type: o.type, location: o.location }),\n compact: (o) => ({ pluginId: o.pluginId, type: o.type }),\n truncationHint: 'raise `limit` (max 200) or filter by plugin `id`.',\n });\n\nexport const shapeListSchemas = (all: Schema[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (s) => ({ pluginId: s.pluginId, name: s.name, typename: s.typename, location: s.location }),\n compact: (s) => ({ pluginId: s.pluginId, name: s.name, typename: s.typename }),\n truncationHint: 'raise `limit` (max 200) or filter by plugin `id`.',\n });\n\n//\n// Idioms\n//\n\nexport const shapeListIdioms = (all: Idiom[], opts: ListOptions = {}): ToolResult =>\n shapeList(all, opts, {\n full: (idiom) => ({\n slug: idiom.slug,\n summary: idiom.summary,\n applies: idiom.applies,\n insteadOf: idiom.insteadOf,\n uses: idiom.uses,\n related: idiom.related,\n host: {\n file: idiom.host.file,\n line: idiom.host.line,\n symbol: idiom.host.symbol,\n kind: idiom.host.kind,\n },\n }),\n compact: (idiom) => ({\n slug: idiom.slug,\n kind: idiom.host.kind,\n file: idiom.host.file,\n symbol: idiom.host.symbol,\n }),\n truncationHint: 'raise `limit` (max 200), refine with `slug`, or filter by `hostKind`.',\n });\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// Tool-call logging — drives future tool prioritization.\n//\n// Every tool call is logged; failed structured queries that fall through to\n// search_code (when added in a later phase) get logged separately. This is\n// intentionally minimal — appending JSONL is enough for the analysis we want\n// to do later, and keeps the runtime dependency surface small.\n\nimport { appendFile, mkdir } from 'node:fs/promises';\nimport { dirname } from 'node:path';\n\nexport type ToolLogEntry = {\n tool: string;\n args?: unknown;\n count?: number;\n found?: boolean;\n truncated?: string;\n};\n\nexport type ToolLogger = (entry: ToolLogEntry) => void;\n\nexport const noopLogger: ToolLogger = () => {};\n\n/**\n * Wrap a logger so failures inside it never throw into the caller. Returns the\n * wrapped logger; if `inner` is undefined, returns a no-op. Timestamp injection\n * is the responsibility of concrete sinks (see `fileLogger`).\n */\nexport const registerLogger = (inner?: ToolLogger): ToolLogger => {\n if (!inner) {\n return noopLogger;\n }\n return (entry) => {\n try {\n inner(entry);\n } catch {\n // Logger failures must not break tool calls.\n }\n };\n};\n\n/**\n * Append-only JSONL logger. Creates the parent directory on first write.\n */\nexport const fileLogger = (path: string): ToolLogger => {\n let ensured = false;\n return (entry) => {\n const line = `${JSON.stringify({ ts: new Date().toISOString(), ...entry })}\\n`;\n void (async () => {\n if (!ensured) {\n await mkdir(dirname(path), { recursive: true });\n ensured = true;\n }\n await appendFile(path, line, 'utf8');\n })().catch(() => undefined);\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;AA6BA,SACEA,qBAaK;;;AClBP,SAASC,oBAAoBC,sBAAwC;AAErE,IAAMC,iBAAiB;AACvB,IAAMC,gBAAgB;AAiBtB,IAAMC,YAAY,CAAIC,KAAmBC,MAAmBC,WAAAA;AAC1D,QAAMC,YAAYF,KAAKG,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MC,aAAa,CAACC,SAAAA;AACzB,MAAIC,UAAU;AACd,SAAO,CAACH,UAAAA;AACN,UAAMI,OAAO,GAAGC,KAAKC,UAAU;MAAEC,KAAI,oBAAIC,KAAAA,GAAOC,YAAW;MAAI,GAAGT;IAAM,CAAA,CAAA;;AACxE,UAAM,YAAA;AACJ,UAAI,CAACG,SAAS;AACZ,cAAMR,MAAMC,QAAQM,IAAAA,GAAO;UAAEQ,WAAW;QAAK,CAAA;AAC7CP,kBAAU;MACZ;AACA,YAAMT,WAAWQ,MAAME,MAAM,MAAA;IAC/B,GAAA,EAAKO,MAAM,MAAMC,MAAAA;EACnB;AACF;",
|
|
6
|
+
"names": ["TOOL_METADATA", "DEFAULT_LIST_LIMIT", "MAX_LIST_LIMIT", "SOURCE_PREVIEW", "JSDOC_PREVIEW", "shapeList", "all", "opts", "config", "requested", "limit", "Math", "min", "max", "floor", "project", "compact", "full", "data", "slice", "map", "length", "truncated", "truncationHint", "shapeListPackages", "p", "name", "version", "private", "path", "description", "shapeGetPackage", "detail", "workspaceDependencies", "externalDependencies", "entryPoints", "exportCount", "shapeFindSymbol", "matches", "m", "ref", "package", "kind", "summary", "shapeGetSymbol", "result", "signature", "location", "jsdoc", "truncate", "source", "undefined", "s", "shapeListPlugins", "id", "icon", "iconHue", "tags", "dependsOn", "shapePluginDetail", "metaLocation", "surfaces", "role", "capabilities", "c", "type", "operations", "o", "schemas", "typename", "shapeListSurfaces", "pluginId", "shapeListCapabilities", "shapeListOperations", "shapeListSchemas", "shapeListIdioms", "idiom", "slug", "applies", "insteadOf", "uses", "related", "host", "file", "line", "symbol", "pickListOptions", "args", "limit", "compact", "createToolDefinitions", "introspector", "log", "list_packages", "TOOL_METADATA", "handler", "result", "listPackages", "name", "pathPrefix", "privateOnly", "shaped", "shapeListPackages", "tool", "count", "length", "truncated", "get_package", "detail", "getPackage", "found", "data", "note", "shapeGetPackage", "list_symbols", "matches", "listSymbols", "package", "kind", "shapeFindSymbol", "find_symbol", "findSymbol", "query", "get_symbol", "getSymbol", "ref", "include", "shapeGetSymbol", "list_plugins", "listPlugins", "id", "undefined", "shapeListPlugins", "list_surfaces", "listSurfaces", "shapeListSurfaces", "list_capabilities", "listCapabilities", "shapeListCapabilities", "list_operations", "listOperations", "shapeListOperations", "list_schemas", "listSchemas", "shapeListSchemas", "list_idioms", "listIdioms", "slug", "hostKind", "shapeListIdioms", "appendFile", "mkdir", "dirname", "noopLogger", "registerLogger", "inner", "entry", "fileLogger", "path", "ensured", "line", "JSON", "stringify", "ts", "Date", "toISOString", "recursive", "catch", "undefined"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/tools/shaping.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/tools/shaping.ts":{"bytes":26891,"imports":[{"path":"@dxos/introspect-tools","kind":"import-statement","external":true}],"format":"esm"},"src/tools/tools.ts":{"bytes":26103,"imports":[{"path":"@dxos/introspect-tools","kind":"import-statement","external":true},{"path":"src/tools/shaping.ts","kind":"import-statement","original":"./shaping"}],"format":"esm"},"src/tools/logger.ts":{"bytes":5297,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/tools/index.ts":{"bytes":3017,"imports":[{"path":"src/tools/tools.ts","kind":"import-statement","original":"./tools"},{"path":"src/tools/shaping.ts","kind":"import-statement","original":"./shaping"},{"path":"src/tools/logger.ts","kind":"import-statement","original":"./logger"}],"format":"esm"},"src/server/server.ts":{"bytes":8259,"imports":[{"path":"@modelcontextprotocol/sdk/server/mcp.js","kind":"import-statement","external":true},{"path":"@dxos/introspect-tools","kind":"import-statement","external":true},{"path":"src/tools/index.ts","kind":"import-statement","original":"../tools"}],"format":"esm"},"src/server/main.ts":{"bytes":32633,"imports":[{"path":"@modelcontextprotocol/sdk/server/stdio.js","kind":"import-statement","external":true},{"path":"@modelcontextprotocol/sdk/server/streamableHttp.js","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:http","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/introspect","kind":"import-statement","external":true},{"path":"src/tools/index.ts","kind":"import-statement","original":"../tools"},{"path":"src/server/server.ts","kind":"import-statement","original":"./server"}],"format":"esm"},"src/server/index.ts":{"bytes":1169,"imports":[{"path":"src/server/server.ts","kind":"import-statement","original":"./server"},{"path":"src/server/main.ts","kind":"import-statement","original":"./main"}],"format":"esm"},"src/index.ts":{"bytes":1334,"imports":[{"path":"src/server/index.ts","kind":"import-statement","original":"./server"},{"path":"src/tools/index.ts","kind":"import-statement","original":"./tools"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20227},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-RWYFJ2XT.mjs","kind":"import-statement"},{"path":"@modelcontextprotocol/sdk/server/mcp.js","kind":"import-statement","external":true},{"path":"@dxos/introspect-tools","kind":"import-statement","external":true},{"path":"@modelcontextprotocol/sdk/server/stdio.js","kind":"import-statement","external":true},{"path":"@modelcontextprotocol/sdk/server/streamableHttp.js","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:http","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/introspect","kind":"import-statement","external":true}],"exports":["createServer","fileLogger","main","noopLogger"],"entryPoint":"src/index.ts","inputs":{"src/server/server.ts":{"bytesInOutput":1190},"src/server/index.ts":{"bytesInOutput":0},"src/server/main.ts":{"bytesInOutput":6736},"src/index.ts":{"bytesInOutput":0}},"bytes":8274},"dist/lib/node-esm/tools/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/tools/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-RWYFJ2XT.mjs","kind":"import-statement"}],"exports":["createToolDefinitions","fileLogger","noopLogger","registerLogger","shapeFindSymbol","shapeGetPackage","shapeGetSymbol","shapeListCapabilities","shapeListOperations","shapeListPackages","shapeListPlugins","shapeListSchemas","shapeListSurfaces","shapePluginDetail"],"entryPoint":"src/tools/index.ts","inputs":{},"bytes":734},"dist/lib/node-esm/chunk-RWYFJ2XT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":28449},"dist/lib/node-esm/chunk-RWYFJ2XT.mjs":{"imports":[{"path":"@dxos/introspect-tools","kind":"import-statement","external":true},{"path":"@dxos/introspect-tools","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":["createToolDefinitions","fileLogger","noopLogger","registerLogger","shapeFindSymbol","shapeGetPackage","shapeGetSymbol","shapeListCapabilities","shapeListOperations","shapeListPackages","shapeListPlugins","shapeListSchemas","shapeListSurfaces","shapePluginDetail"],"inputs":{"src/tools/tools.ts":{"bytesInOutput":4616},"src/tools/shaping.ts":{"bytesInOutput":5370},"src/tools/index.ts":{"bytesInOutput":0},"src/tools/logger.ts":{"bytesInOutput":702}},"bytes":11209}}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Capability, Operation, Package, PackageDetail, Plugin, PluginDetail, Schema, Surface, SymbolDetail, SymbolMatch } from '@dxos/introspect';
|
|
1
|
+
import type { Capability, Idiom, Operation, Package, PackageDetail, Plugin, PluginDetail, Schema, Surface, SymbolDetail, SymbolMatch } from '@dxos/introspect';
|
|
2
2
|
import { type ListOptions } from '@dxos/introspect-tools';
|
|
3
3
|
export type ToolResult = {
|
|
4
4
|
data: unknown;
|
|
@@ -21,4 +21,5 @@ export declare const shapeListSurfaces: (all: Surface[], opts?: ListOptions) =>
|
|
|
21
21
|
export declare const shapeListCapabilities: (all: Capability[], opts?: ListOptions) => ToolResult;
|
|
22
22
|
export declare const shapeListOperations: (all: Operation[], opts?: ListOptions) => ToolResult;
|
|
23
23
|
export declare const shapeListSchemas: (all: Schema[], opts?: ListOptions) => ToolResult;
|
|
24
|
+
export declare const shapeListIdioms: (all: Idiom[], opts?: ListOptions) => ToolResult;
|
|
24
25
|
//# sourceMappingURL=shaping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaping.d.ts","sourceRoot":"","sources":["../../../../src/tools/shaping.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,EACZ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAK9F,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA6BF,eAAO,MAAM,iBAAiB,QAAS,OAAO,EAAE,SAAQ,WAAW,KAAQ,UAWvE,CAAC;AAEL,eAAO,MAAM,eAAe,WAAY,aAAa,KAAG,UAatD,CAAC;AAMH,eAAO,MAAM,eAAe,YAAa,WAAW,EAAE,SAAQ,WAAW,KAAQ,UAK7E,CAAC;AAEL,eAAO,MAAM,cAAc,WAAY,YAAY,KAAG,UAiBrD,CAAC;AAaF,eAAO,MAAM,gBAAgB,QAAS,MAAM,EAAE,SAAQ,WAAW,KAAQ,UAcrE,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,WAAY,YAAY,KAAG,UAgBvD,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAAS,OAAO,EAAE,SAAQ,WAAW,KAAQ,UAKvE,CAAC;AAEL,eAAO,MAAM,qBAAqB,QAAS,UAAU,EAAE,SAAQ,WAAW,KAAQ,UAK9E,CAAC;AAEL,eAAO,MAAM,mBAAmB,QAAS,SAAS,EAAE,SAA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M,gBAAgB,QAAS,MAAM,EAAE,SAAQ,WAAW,KAAQ,UAKrE,CAAC;AAML,eAAO,MAAM,eAAe,QAAS,KAAK,EAAE,SAAQ,WAAW,KAAQ,UAuBnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/tools/tools.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/tools/tools.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAiBrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAWL,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAQnB;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC5D,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAEhC,wFAAwF;IACxF,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,iBAClB,YAAY,OACrB,UAAU,KACd,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,CAAC,CAsHnC,CAAC"}
|