@wrongstack/tools 0.296.2 → 0.296.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/read.d.ts CHANGED
@@ -1,9 +1,34 @@
1
1
  import { type Tool } from '@wrongstack/core/types';
2
+ import type { SymbolKind } from './codebase-index/schema.js';
2
3
  interface ReadInput {
3
4
  path: string;
4
5
  offset?: number | undefined;
5
6
  limit?: number | undefined;
6
7
  mode?: 'content' | 'summary' | undefined;
8
+ /**
9
+ * When true, include the codebase-index symbol list for this file
10
+ * as a structured `symbols` field in the result. Overrides the
11
+ * advanced-mode meta flag (`ctx.meta['tools.read.advancedMode']`)
12
+ * per-call when explicitly set. When omitted, the meta flag governs.
13
+ */
14
+ includeSymbols?: boolean | undefined;
15
+ }
16
+ /**
17
+ * A single indexed code symbol returned alongside file content when
18
+ * advanced mode is on or `includeSymbols` is set. The LLM must treat
19
+ * this as a symbol listing — not as file content.
20
+ */
21
+ interface SymbolEntry {
22
+ /** Symbol name (e.g. myFunction, MyClass). */
23
+ name: string;
24
+ /** Kind of symbol (function, class, interface, const, etc.). */
25
+ kind: SymbolKind;
26
+ /** 1-based declaration line in the file. */
27
+ line: number;
28
+ /** 0-based column offset. */
29
+ col: number;
30
+ /** Full signature or declaration text. */
31
+ signature: string;
7
32
  }
8
33
  interface ReadOutput {
9
34
  text: string;
@@ -12,6 +37,12 @@ interface ReadOutput {
12
37
  truncated: boolean;
13
38
  cached?: boolean | undefined;
14
39
  note?: string | undefined;
40
+ /**
41
+ * Codebase-index symbols for this file, included when advanced mode
42
+ * is active or `includeSymbols` is set. One entry per indexed symbol,
43
+ * sorted by line number. This is a symbol listing — NOT file content.
44
+ */
45
+ symbols?: SymbolEntry[] | undefined;
15
46
  }
16
47
  export declare const readTool: Tool<ReadInput, ReadOutput>;
17
48
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAC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