@quolu/lattice 0.113.2 → 0.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/lattice-mcp.mjs +3 -2
- package/package.json +1 -1
- package/sensor/dist/db/index.d.ts +3 -2
- package/sensor/dist/db/index.d.ts.map +1 -1
- package/sensor/dist/db/index.js +2 -5
- package/sensor/dist/db/index.js.map +1 -1
- package/sensor/dist/directory.d.ts +2 -0
- package/sensor/dist/directory.d.ts.map +1 -1
- package/sensor/dist/directory.js +3 -1
- package/sensor/dist/directory.js.map +1 -1
- package/sensor/dist/mcp/daemon-paths.d.ts +2 -0
- package/sensor/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon-paths.js +3 -1
- package/sensor/dist/mcp/daemon-paths.js.map +1 -1
- package/sensor/dist/mcp/daemon.d.ts +1 -3
- package/sensor/dist/mcp/daemon.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon.js +2 -4
- package/sensor/dist/mcp/daemon.js.map +1 -1
- package/sensor/dist/mcp/handshake-info.d.ts +24 -0
- package/sensor/dist/mcp/handshake-info.d.ts.map +1 -0
- package/sensor/dist/mcp/handshake-info.js +42 -0
- package/sensor/dist/mcp/handshake-info.js.map +1 -0
- package/sensor/dist/mcp/index.d.ts +8 -5
- package/sensor/dist/mcp/index.d.ts.map +1 -1
- package/sensor/dist/mcp/index.js +38 -37
- package/sensor/dist/mcp/index.js.map +1 -1
- package/sensor/dist/mcp/proxy.d.ts +6 -4
- package/sensor/dist/mcp/proxy.d.ts.map +1 -1
- package/sensor/dist/mcp/proxy.js +46 -25
- package/sensor/dist/mcp/proxy.js.map +1 -1
- package/sensor/dist/mcp/session.d.ts +2 -23
- package/sensor/dist/mcp/session.d.ts.map +1 -1
- package/sensor/dist/mcp/session.js +8 -36
- package/sensor/dist/mcp/session.js.map +1 -1
- package/sensor/dist/mcp/tool-definitions.d.ts +82 -0
- package/sensor/dist/mcp/tool-definitions.d.ts.map +1 -0
- package/sensor/dist/mcp/tool-definitions.js +281 -0
- package/sensor/dist/mcp/tool-definitions.js.map +1 -0
- package/sensor/dist/mcp/tools.d.ts +2 -68
- package/sensor/dist/mcp/tools.d.ts.map +1 -1
- package/sensor/dist/mcp/tools.js +8 -274
- package/sensor/dist/mcp/tools.js.map +1 -1
- package/src/cli-help.mjs +2 -2
- package/src/mcp-startup-receipt.mjs +43 -14
- package/src/todo-cli.mjs +6 -1
- package/src/todo-store-view.mjs +10 -6
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type LatticeSensor from '../index';
|
|
7
7
|
import type { QueryPool } from './query-pool';
|
|
8
|
+
import { type ToolDefinition } from './tool-definitions';
|
|
9
|
+
export { tools, getStaticTools, type ToolDefinition, type ToolAnnotations } from './tool-definitions';
|
|
8
10
|
import { WslSharedIndexError } from '../db/wsl-shared-index';
|
|
9
11
|
export declare function __setLoadLatticeSensorForTests(cls: typeof import('../index').default | null): void;
|
|
10
12
|
import type { PendingFile } from '../sync';
|
|
@@ -497,57 +499,6 @@ export declare function formatStaleFooter(stale: PendingFile[]): string;
|
|
|
497
499
|
export declare function formatDegradedBanner(reason: string | null): string;
|
|
498
500
|
/** Re-armed watches are not proof of freshness until their full scan commits. */
|
|
499
501
|
export declare function formatRecoveringBanner(): string;
|
|
500
|
-
/**
|
|
501
|
-
* MCP Tool definition
|
|
502
|
-
*/
|
|
503
|
-
export interface ToolDefinition {
|
|
504
|
-
name: string;
|
|
505
|
-
description: string;
|
|
506
|
-
inputSchema: {
|
|
507
|
-
type: 'object';
|
|
508
|
-
properties: Record<string, PropertySchema>;
|
|
509
|
-
required?: string[];
|
|
510
|
-
};
|
|
511
|
-
/** Behavioral hints for clients (see {@link ToolAnnotations}). */
|
|
512
|
-
annotations?: ToolAnnotations;
|
|
513
|
-
/**
|
|
514
|
-
* MCP `_meta` on the tool definition. `anthropic/alwaysLoad: true` makes
|
|
515
|
-
* Claude Code load the tool at session start instead of deferring it behind
|
|
516
|
-
* its tool search (https://code.claude.com/docs/en/mcp#exempt-a-server-from-deferral).
|
|
517
|
-
*/
|
|
518
|
-
_meta?: Record<string, unknown>;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* MCP ToolAnnotations — behavioral hints a client MAY use to decide how, or
|
|
522
|
-
* whether, to run a tool (introduced in the 2025-03-26 spec, carried in
|
|
523
|
-
* 2025-06-18). They are advisory and never to be trusted for security, but
|
|
524
|
-
* clients gate on them: Cursor's Ask mode, for one, refuses any MCP tool that
|
|
525
|
-
* doesn't advertise `readOnlyHint: true` (issue #1018).
|
|
526
|
-
*
|
|
527
|
-
* The field is purely additive — a client that predates annotations ignores it
|
|
528
|
-
* — so lattice sensor advertises these even though `initialize` still negotiates the
|
|
529
|
-
* 2024-11-05 protocol version.
|
|
530
|
-
*
|
|
531
|
-
* https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations
|
|
532
|
-
*/
|
|
533
|
-
export interface ToolAnnotations {
|
|
534
|
-
/** Human-readable title for the tool. */
|
|
535
|
-
title?: string;
|
|
536
|
-
/** If true, the tool does not modify its environment. Default (unset): false. */
|
|
537
|
-
readOnlyHint?: boolean;
|
|
538
|
-
/** Meaningful only when NOT read-only: may the tool perform destructive updates? */
|
|
539
|
-
destructiveHint?: boolean;
|
|
540
|
-
/** If true, repeat calls with the same arguments have no additional effect. */
|
|
541
|
-
idempotentHint?: boolean;
|
|
542
|
-
/** If true, the tool interacts with an open world of external entities. */
|
|
543
|
-
openWorldHint?: boolean;
|
|
544
|
-
}
|
|
545
|
-
interface PropertySchema {
|
|
546
|
-
type: string;
|
|
547
|
-
description: string;
|
|
548
|
-
enum?: string[];
|
|
549
|
-
default?: unknown;
|
|
550
|
-
}
|
|
551
502
|
/**
|
|
552
503
|
* Tool execution result
|
|
553
504
|
*/
|
|
@@ -570,23 +521,6 @@ export interface ToolResult {
|
|
|
570
521
|
_cgAnswerFiles?: AnswerFile[];
|
|
571
522
|
structuredContent?: Record<string, unknown>;
|
|
572
523
|
}
|
|
573
|
-
/**
|
|
574
|
-
* All LatticeSensor MCP tools
|
|
575
|
-
*
|
|
576
|
-
* Designed for minimal context usage - use lattice_sensor_explore as the primary tool
|
|
577
|
-
* (one call usually answers the whole question), and only use other tools for
|
|
578
|
-
* targeted follow-up queries.
|
|
579
|
-
*
|
|
580
|
-
* All tools support cross-project queries via the optional `projectPath` parameter.
|
|
581
|
-
*/
|
|
582
|
-
export declare const tools: ToolDefinition[];
|
|
583
|
-
/**
|
|
584
|
-
* Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
|
|
585
|
-
* proxy answers `tools/list` with before any project is open. Mirrors
|
|
586
|
-
* `ToolHandler.getTools()` in the no-LatticeSensor case (the dynamic per-repo budget
|
|
587
|
-
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
588
|
-
*/
|
|
589
|
-
export declare function getStaticTools(): ToolDefinition[];
|
|
590
524
|
/**
|
|
591
525
|
* How many explicit-`projectPath` projects a handler keeps open at once
|
|
592
526
|
* (#1835). Each cached project may hold a file watcher, a writer lock and a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,aAAa,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAc7D,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,cAAc,UAAU,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAElG;AAOD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA0B3C,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAGL,mBAAmB,EAGnB,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EAC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AEG;YACW,YAAY;IAmJ1B;;OAEG;YACW,WAAW;IA2DzB;;OAEG;IACH,OAAO,CAAC,WAAW;IAUnB;;OAEG;IACH,OAAO,CAAC,eAAe;IAcvB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;OAEG;IACH,OAAO,CAAC,eAAe;IA4EvB;;;OAGG;IACH;;;OAGG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IAkDzB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,cAAc;IAgBtB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,YAAY;IA4BpB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,WAAW;CAMpB"}
|
package/sensor/dist/mcp/tools.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Defines the tools exposed by the LatticeSensor MCP server.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ToolHandler = exports.MAX_CACHED_PROJECTS = exports.
|
|
8
|
+
exports.ToolHandler = exports.MAX_CACHED_PROJECTS = exports.EXPLORE_FALLBACK_NOTES = exports.EXPLORE_ALLOCATION = exports.RELEVANCE_KIND_WEIGHT = exports.IndexOpenError = exports.PathRefusalError = exports.NotIndexedError = exports.getStaticTools = exports.tools = void 0;
|
|
9
9
|
exports.__setLoadLatticeSensorForTests = __setLoadLatticeSensorForTests;
|
|
10
10
|
exports.normalizeQuerySpelling = normalizeQuerySpelling;
|
|
11
11
|
exports.getExploreBudget = getExploreBudget;
|
|
@@ -24,9 +24,13 @@ exports.formatStaleBanner = formatStaleBanner;
|
|
|
24
24
|
exports.formatStaleFooter = formatStaleFooter;
|
|
25
25
|
exports.formatDegradedBanner = formatDegradedBanner;
|
|
26
26
|
exports.formatRecoveringBanner = formatRecoveringBanner;
|
|
27
|
-
exports.getStaticTools = getStaticTools;
|
|
28
27
|
const directory_1 = require("../directory");
|
|
29
28
|
const version_1 = require("./version");
|
|
29
|
+
const tool_definitions_1 = require("./tool-definitions");
|
|
30
|
+
// Re-exported: callers and tests import the tool surface from this module.
|
|
31
|
+
var tool_definitions_2 = require("./tool-definitions");
|
|
32
|
+
Object.defineProperty(exports, "tools", { enumerable: true, get: function () { return tool_definitions_2.tools; } });
|
|
33
|
+
Object.defineProperty(exports, "getStaticTools", { enumerable: true, get: function () { return tool_definitions_2.getStaticTools; } });
|
|
30
34
|
const writer_lock_1 = require("./writer-lock");
|
|
31
35
|
const wsl_shared_index_1 = require("../db/wsl-shared-index");
|
|
32
36
|
// Lazy-load the heavy LatticeSensor chain off the MCP startup path — see the same
|
|
@@ -1285,254 +1289,6 @@ function formatRecoveringBanner() {
|
|
|
1285
1289
|
'but the full index catch-up has not completed. Read files directly to confirm ' +
|
|
1286
1290
|
'current content before relying on these results.');
|
|
1287
1291
|
}
|
|
1288
|
-
/**
|
|
1289
|
-
* Common projectPath property for cross-project queries
|
|
1290
|
-
*/
|
|
1291
|
-
const projectPathProperty = {
|
|
1292
|
-
type: 'string',
|
|
1293
|
-
description: 'Absolute path to the project to query (or any directory inside it) — lattice sensor uses the nearest .lattice/sensor/ index at or above that path. Omit to use this session\'s default project. Pass it to query a second codebase, or when the server root has no index of its own (e.g. a monorepo where only sub-projects are indexed, so there is no default project).',
|
|
1294
|
-
};
|
|
1295
|
-
/**
|
|
1296
|
-
* EVERY lattice sensor MCP tool is query-only: it reads the pre-built index and never
|
|
1297
|
-
* mutates the workspace. An agent may separately choose to invoke the explicit
|
|
1298
|
-
* `lattice sensor init` CLI when its host grants workspace writes and shell execution.
|
|
1299
|
-
* Advertising this MCP-tool read-only contract lets clients that gate on it run
|
|
1300
|
-
* the tools where a possibly-mutating tool would be blocked — most concretely,
|
|
1301
|
-
* Cursor's Ask mode, which rejects any MCP tool lacking `readOnlyHint: true`
|
|
1302
|
-
* (issue #1018). `idempotentHint`: a repeated query has no additional effect.
|
|
1303
|
-
* `openWorldHint: false`: the domain is the closed local index, not an open
|
|
1304
|
-
* external world. Shared so the contract is declared once; a hypothetical
|
|
1305
|
-
* mutating tool would simply not reference it.
|
|
1306
|
-
*/
|
|
1307
|
-
const READ_ONLY_ANNOTATIONS = {
|
|
1308
|
-
readOnlyHint: true,
|
|
1309
|
-
destructiveHint: false,
|
|
1310
|
-
idempotentHint: true,
|
|
1311
|
-
openWorldHint: false,
|
|
1312
|
-
};
|
|
1313
|
-
/**
|
|
1314
|
-
* All LatticeSensor MCP tools
|
|
1315
|
-
*
|
|
1316
|
-
* Designed for minimal context usage - use lattice_sensor_explore as the primary tool
|
|
1317
|
-
* (one call usually answers the whole question), and only use other tools for
|
|
1318
|
-
* targeted follow-up queries.
|
|
1319
|
-
*
|
|
1320
|
-
* All tools support cross-project queries via the optional `projectPath` parameter.
|
|
1321
|
-
*/
|
|
1322
|
-
exports.tools = [
|
|
1323
|
-
{
|
|
1324
|
-
name: 'lattice_sensor_search',
|
|
1325
|
-
description: 'Quick symbol search by name. Returns locations only (no code). Use lattice_sensor_explore instead to get the actual source / understand an area in one call.',
|
|
1326
|
-
inputSchema: {
|
|
1327
|
-
type: 'object',
|
|
1328
|
-
properties: {
|
|
1329
|
-
query: {
|
|
1330
|
-
type: 'string',
|
|
1331
|
-
description: 'Symbol name or partial name (e.g., "auth", "signIn", "UserService")',
|
|
1332
|
-
},
|
|
1333
|
-
kind: {
|
|
1334
|
-
type: 'string',
|
|
1335
|
-
description: 'Filter by node kind',
|
|
1336
|
-
enum: ['function', 'method', 'class', 'interface', 'type', 'variable', 'route', 'component'],
|
|
1337
|
-
},
|
|
1338
|
-
limit: {
|
|
1339
|
-
type: 'number',
|
|
1340
|
-
description: 'Maximum results (default: 10)',
|
|
1341
|
-
default: 10,
|
|
1342
|
-
},
|
|
1343
|
-
projectPath: projectPathProperty,
|
|
1344
|
-
},
|
|
1345
|
-
required: ['query'],
|
|
1346
|
-
},
|
|
1347
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1348
|
-
},
|
|
1349
|
-
{
|
|
1350
|
-
name: 'lattice_sensor_callers',
|
|
1351
|
-
description: 'List functions that call <symbol>. For the full flow, use lattice_sensor_explore.',
|
|
1352
|
-
inputSchema: {
|
|
1353
|
-
type: 'object',
|
|
1354
|
-
properties: {
|
|
1355
|
-
symbol: {
|
|
1356
|
-
type: 'string',
|
|
1357
|
-
description: 'Name of the function, method, or class to find callers for',
|
|
1358
|
-
},
|
|
1359
|
-
file: {
|
|
1360
|
-
type: 'string',
|
|
1361
|
-
description: 'Narrow to the definition in this file (path or suffix) when several same-named symbols exist (e.g. one UserService per app in a monorepo)',
|
|
1362
|
-
},
|
|
1363
|
-
limit: {
|
|
1364
|
-
type: 'number',
|
|
1365
|
-
description: 'Maximum number of callers to return (default: 20)',
|
|
1366
|
-
default: 20,
|
|
1367
|
-
},
|
|
1368
|
-
projectPath: projectPathProperty,
|
|
1369
|
-
},
|
|
1370
|
-
required: ['symbol'],
|
|
1371
|
-
},
|
|
1372
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1373
|
-
},
|
|
1374
|
-
{
|
|
1375
|
-
name: 'lattice_sensor_callees',
|
|
1376
|
-
description: 'List functions that <symbol> calls. For the full flow, use lattice_sensor_explore.',
|
|
1377
|
-
inputSchema: {
|
|
1378
|
-
type: 'object',
|
|
1379
|
-
properties: {
|
|
1380
|
-
symbol: {
|
|
1381
|
-
type: 'string',
|
|
1382
|
-
description: 'Name of the function, method, or class to find callees for',
|
|
1383
|
-
},
|
|
1384
|
-
file: {
|
|
1385
|
-
type: 'string',
|
|
1386
|
-
description: 'Narrow to the definition in this file (path or suffix) when several same-named symbols exist',
|
|
1387
|
-
},
|
|
1388
|
-
limit: {
|
|
1389
|
-
type: 'number',
|
|
1390
|
-
description: 'Maximum number of callees to return (default: 20)',
|
|
1391
|
-
default: 20,
|
|
1392
|
-
},
|
|
1393
|
-
projectPath: projectPathProperty,
|
|
1394
|
-
},
|
|
1395
|
-
required: ['symbol'],
|
|
1396
|
-
},
|
|
1397
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
name: 'lattice_sensor_impact',
|
|
1401
|
-
description: 'List symbols affected by changing <symbol>. Use before a refactor.',
|
|
1402
|
-
inputSchema: {
|
|
1403
|
-
type: 'object',
|
|
1404
|
-
properties: {
|
|
1405
|
-
symbol: {
|
|
1406
|
-
type: 'string',
|
|
1407
|
-
description: 'Name of the symbol to analyze impact for',
|
|
1408
|
-
},
|
|
1409
|
-
file: {
|
|
1410
|
-
type: 'string',
|
|
1411
|
-
description: 'Narrow to the definition in this file (path or suffix) when several same-named symbols exist',
|
|
1412
|
-
},
|
|
1413
|
-
depth: {
|
|
1414
|
-
type: 'number',
|
|
1415
|
-
description: 'How many levels of dependencies to traverse (default: 2)',
|
|
1416
|
-
default: 2,
|
|
1417
|
-
},
|
|
1418
|
-
projectPath: projectPathProperty,
|
|
1419
|
-
},
|
|
1420
|
-
required: ['symbol'],
|
|
1421
|
-
},
|
|
1422
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1423
|
-
},
|
|
1424
|
-
{
|
|
1425
|
-
name: 'lattice_sensor_node',
|
|
1426
|
-
description: 'Two modes. (1) READ A FILE — use INSTEAD of the Read tool: pass `file` (a path or basename) with no `symbol` and it returns that file\'s current on-disk source with line numbers, exactly the shape Read gives you (`<n>\\t<line>`, safe to Edit from), narrowable with `offset`/`limit` just like Read — PLUS a one-line note of which files depend on it. Same bytes as Read, faster (served from the index), with the blast radius attached. Use it whenever you would Read a source file. (2) ONE SYMBOL you can name — its location, signature, verbatim source (includeCode=true) and caller/callee trail in one call, so before changing it you see what calls it and what your edit would break. For an AMBIGUOUS name it returns EVERY matching definition\'s body in one call (so you never Read a file to find the right overload); pass `file`/`line` to pin one. Use lattice_sensor_explore for several related symbols or the full flow.',
|
|
1427
|
-
inputSchema: {
|
|
1428
|
-
type: 'object',
|
|
1429
|
-
properties: {
|
|
1430
|
-
symbol: {
|
|
1431
|
-
type: 'string',
|
|
1432
|
-
description: 'Name of the symbol to read (symbol mode). Omit it and pass `file` alone to read a whole file like Read.',
|
|
1433
|
-
},
|
|
1434
|
-
includeCode: {
|
|
1435
|
-
type: 'boolean',
|
|
1436
|
-
description: 'Symbol mode: include the symbol\'s full body (default: false). Ignored in file mode, which always returns source unless `symbolsOnly` is set.',
|
|
1437
|
-
default: false,
|
|
1438
|
-
},
|
|
1439
|
-
file: {
|
|
1440
|
-
type: 'string',
|
|
1441
|
-
description: 'A file path or basename (e.g. "harness.rs", "src/auth/session.ts"). Pass it ALONE (no symbol) to READ the file like the Read tool — its full source with line numbers + which files depend on it. Or pass it WITH a symbol to disambiguate an overloaded name to the definition in this file.',
|
|
1442
|
-
},
|
|
1443
|
-
offset: {
|
|
1444
|
-
type: 'number',
|
|
1445
|
-
description: 'File mode: 1-based line to start reading from, exactly like Read\'s offset. Defaults to the start of the file.',
|
|
1446
|
-
},
|
|
1447
|
-
limit: {
|
|
1448
|
-
type: 'number',
|
|
1449
|
-
description: 'File mode: maximum number of lines to return, exactly like Read\'s limit. Defaults to the whole file (capped at 2000 lines, like Read).',
|
|
1450
|
-
},
|
|
1451
|
-
symbolsOnly: {
|
|
1452
|
-
type: 'boolean',
|
|
1453
|
-
description: 'File mode: return just the file\'s symbol map + dependents (a cheap structural overview) instead of its source.',
|
|
1454
|
-
default: false,
|
|
1455
|
-
},
|
|
1456
|
-
line: {
|
|
1457
|
-
type: 'number',
|
|
1458
|
-
description: 'Symbol mode only: disambiguate to the definition at/around this line (use with the file:line a trail showed you).',
|
|
1459
|
-
},
|
|
1460
|
-
projectPath: projectPathProperty,
|
|
1461
|
-
},
|
|
1462
|
-
required: [],
|
|
1463
|
-
},
|
|
1464
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
name: 'lattice_sensor_explore',
|
|
1468
|
-
description: 'PRIMARY TOOL — call FIRST for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or the symbols you are about to change. Returns the verbatim source of the relevant symbols grouped by file in ONE capped call (Read-equivalent — treat the shown source as already Read; do NOT re-open those files), plus the call path among them. Query can be a natural-language question OR a bag of symbol/file names. Usually the ONLY call you need — more accurate context, in far fewer tokens and round-trips than a search/Read/Grep loop.',
|
|
1469
|
-
inputSchema: {
|
|
1470
|
-
type: 'object',
|
|
1471
|
-
properties: {
|
|
1472
|
-
query: {
|
|
1473
|
-
type: 'string',
|
|
1474
|
-
description: 'Symbol names, file names, or short code terms to explore (e.g., "AuthService loginUser session-manager", "GraphTraverser BFS impact traversal.ts"). For a flow question, name the symbols spanning the flow (e.g. "mutateElement renderScene"). A natural-language question works too — no prior lattice_sensor_search needed.',
|
|
1475
|
-
},
|
|
1476
|
-
maxFiles: {
|
|
1477
|
-
type: 'number',
|
|
1478
|
-
description: 'Maximum number of files to include source code from (default: 12)',
|
|
1479
|
-
default: 12,
|
|
1480
|
-
},
|
|
1481
|
-
projectPath: projectPathProperty,
|
|
1482
|
-
},
|
|
1483
|
-
required: ['query'],
|
|
1484
|
-
},
|
|
1485
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1486
|
-
// Loaded from the first prompt in Claude Code, which otherwise defers every
|
|
1487
|
-
// MCP tool behind a ToolSearch step (#1696).
|
|
1488
|
-
_meta: { 'anthropic/alwaysLoad': true },
|
|
1489
|
-
},
|
|
1490
|
-
{
|
|
1491
|
-
name: 'lattice_sensor_status',
|
|
1492
|
-
description: 'Index health check (files, nodes, edges, last indexed time, and added/modified/removed counts) AND the version/execution-mode declaration surface: reports the running Lattice sensor version, the index schema stats, and a machine-readable `mode: daemon|direct` + `reason` field describing how this session is served (see ADR 0049). Skip unless debugging.',
|
|
1493
|
-
inputSchema: {
|
|
1494
|
-
type: 'object',
|
|
1495
|
-
properties: {
|
|
1496
|
-
projectPath: projectPathProperty,
|
|
1497
|
-
},
|
|
1498
|
-
},
|
|
1499
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1500
|
-
},
|
|
1501
|
-
{
|
|
1502
|
-
name: 'lattice_sensor_files',
|
|
1503
|
-
description: 'Indexed file tree with language + symbol counts. Faster than Glob for project layout.',
|
|
1504
|
-
inputSchema: {
|
|
1505
|
-
type: 'object',
|
|
1506
|
-
properties: {
|
|
1507
|
-
path: {
|
|
1508
|
-
type: 'string',
|
|
1509
|
-
description: 'Filter to files under this directory path (e.g., "src/components"). Returns all files if not specified.',
|
|
1510
|
-
},
|
|
1511
|
-
pattern: {
|
|
1512
|
-
type: 'string',
|
|
1513
|
-
description: 'Filter files matching this glob pattern (e.g., "*.tsx", "**/*.test.ts")',
|
|
1514
|
-
},
|
|
1515
|
-
format: {
|
|
1516
|
-
type: 'string',
|
|
1517
|
-
description: 'Output format: "tree" (hierarchical, default), "flat" (simple list), "grouped" (by language)',
|
|
1518
|
-
enum: ['tree', 'flat', 'grouped'],
|
|
1519
|
-
default: 'tree',
|
|
1520
|
-
},
|
|
1521
|
-
includeMetadata: {
|
|
1522
|
-
type: 'boolean',
|
|
1523
|
-
description: 'Include file metadata like language and symbol count (default: true)',
|
|
1524
|
-
default: true,
|
|
1525
|
-
},
|
|
1526
|
-
maxDepth: {
|
|
1527
|
-
type: 'number',
|
|
1528
|
-
description: 'Maximum directory depth to show (default: unlimited)',
|
|
1529
|
-
},
|
|
1530
|
-
projectPath: projectPathProperty,
|
|
1531
|
-
},
|
|
1532
|
-
},
|
|
1533
|
-
annotations: READ_ONLY_ANNOTATIONS,
|
|
1534
|
-
},
|
|
1535
|
-
];
|
|
1536
1292
|
/**
|
|
1537
1293
|
* Return `defs` with `projectPath` marked `required` in each tool's inputSchema.
|
|
1538
1294
|
*
|
|
@@ -1564,28 +1320,6 @@ function withRequiredProjectPath(defs) {
|
|
|
1564
1320
|
};
|
|
1565
1321
|
});
|
|
1566
1322
|
}
|
|
1567
|
-
/**
|
|
1568
|
-
* Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
|
|
1569
|
-
* proxy answers `tools/list` with before any project is open. Mirrors
|
|
1570
|
-
* `ToolHandler.getTools()` in the no-LatticeSensor case (the dynamic per-repo budget
|
|
1571
|
-
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
1572
|
-
*/
|
|
1573
|
-
function getStaticTools() {
|
|
1574
|
-
const raw = process.env.LATTICE_SENSOR_MCP_TOOLS;
|
|
1575
|
-
if (!raw || !raw.trim()) {
|
|
1576
|
-
return exports.tools.filter(t => DEFAULT_MCP_TOOLS.has(t.name.replace(/^lattice_sensor_/, '')));
|
|
1577
|
-
}
|
|
1578
|
-
const allow = new Set(raw.split(',').map(s => s.trim().replace(/^lattice_sensor_/, '')).filter(Boolean));
|
|
1579
|
-
return allow.size ? exports.tools.filter(t => allow.has(t.name.replace(/^lattice_sensor_/, ''))) : exports.tools;
|
|
1580
|
-
}
|
|
1581
|
-
/**
|
|
1582
|
-
* ADR 0049 / 0059: Lattice MCP v1 publishes exactly these eight compatibility
|
|
1583
|
-
* tool names. The provider is Lattice; narrowing the default based on repo size
|
|
1584
|
-
* would silently remove contracted surfaces and make host acceptance ambiguous.
|
|
1585
|
-
*/
|
|
1586
|
-
const DEFAULT_MCP_TOOLS = new Set([
|
|
1587
|
-
'search', 'callers', 'callees', 'impact', 'node', 'explore', 'status', 'files',
|
|
1588
|
-
]);
|
|
1589
1323
|
/** realpath when the path exists, the path itself otherwise — never throws. */
|
|
1590
1324
|
function canonicalPath(p) {
|
|
1591
1325
|
try {
|
|
@@ -1870,8 +1604,8 @@ class ToolHandler {
|
|
|
1870
1604
|
// DEFAULT_MCP_TOOLS for the evidence). An allowlist replaces the
|
|
1871
1605
|
// default entirely, so any defined tool can be re-enabled.
|
|
1872
1606
|
let visible = allow
|
|
1873
|
-
?
|
|
1874
|
-
:
|
|
1607
|
+
? tool_definitions_1.tools.filter(t => allow.has(t.name.replace(/^lattice_sensor_/, '')))
|
|
1608
|
+
: tool_definitions_1.tools.filter(t => tool_definitions_1.DEFAULT_MCP_TOOLS.has(t.name.replace(/^lattice_sensor_/, '')));
|
|
1875
1609
|
// No default project loaded → no-root-index case (#993): a gateway server
|
|
1876
1610
|
// started outside any repo, or a monorepo root whose indexes live in
|
|
1877
1611
|
// sub-projects. With nothing to fall back to, EVERY call needs an explicit
|