clast-ai 0.2.2 → 0.2.4
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +112 -0
- package/README.md +313 -418
- package/dist/cli.js +11 -1
- package/dist/cli.js.map +1 -1
- package/dist/indexer/scan.d.ts +10 -1
- package/dist/indexer/scan.js +28 -5
- package/dist/indexer/scan.js.map +1 -1
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/dist/tools/explore.js +5 -1
- package/dist/tools/explore.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/skills/audit/SKILL.md +18 -25
- package/skills/deadcode/SKILL.md +12 -25
- package/skills/explore/SKILL.md +24 -43
- package/skills/impact/SKILL.md +10 -16
- package/skills/status/SKILL.md +2 -5
- package/src/cli.ts +12 -1
- package/src/indexer/scan.ts +29 -5
- package/src/server/index.ts +2 -1
- package/src/tools/explore.ts +6 -1
- package/src/version.ts +1 -1
package/skills/audit/SKILL.md
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit
|
|
3
|
-
description:
|
|
3
|
+
description: Factual inventory of a code base for due diligence or onboarding - size, structure, endpoints, database access, dependencies, dead code.
|
|
4
4
|
argument-hint: "[path]"
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
allowed-tools: mcp__plugin_clast_clast__clast_stats, mcp__plugin_clast_clast__clast_overview, mcp__plugin_clast_clast__clast_unused, mcp__plugin_clast_clast__clast_file_summary, mcp__plugin_clast_clast__clast_grep, Grep, Read, Glob
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`path` to every call below).
|
|
9
|
+
Scope: `$ARGUMENTS` (empty = whole project). Pass it as `path` to every call.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Issue these calls together:
|
|
13
12
|
|
|
14
|
-
- `clast_stats` what=inventory
|
|
15
|
-
|
|
16
|
-
- `
|
|
17
|
-
- `clast_stats` what=
|
|
18
|
-
|
|
19
|
-
- `
|
|
20
|
-
- `clast_stats` what=imports: external dependencies by how many files use them.
|
|
21
|
-
- `clast_unused` with the default limit: only the totals and the largest files matter here.
|
|
13
|
+
- `clast_stats` what=inventory
|
|
14
|
+
- `clast_overview`
|
|
15
|
+
- `clast_stats` what=endpoints
|
|
16
|
+
- `clast_stats` what=database
|
|
17
|
+
- `clast_stats` what=imports
|
|
18
|
+
- `clast_unused` (totals and largest files only)
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Report:
|
|
24
21
|
|
|
25
|
-
1.
|
|
26
|
-
2.
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
by tests, the amount of unused code.
|
|
33
|
-
7. **Caveats**: endpoint and database figures come from pattern matching; dead code is judged by name.
|
|
34
|
-
Spot-check one figure from each of sections 3 and 4 with a Grep and state whether it matched.
|
|
22
|
+
1. Size and shape: lines and files per language, share of tests, vendored or generated code.
|
|
23
|
+
2. Structure: top-level areas, one line each.
|
|
24
|
+
3. Interfaces: endpoints by framework and area, outbound calls.
|
|
25
|
+
4. Data: tables or models, migrations, where queries are issued, most-used models.
|
|
26
|
+
5. Dependencies: most-used packages, duplicates for the same job.
|
|
27
|
+
6. Maintainability: longest functions, largest files, code used only by tests, unused code.
|
|
28
|
+
7. Caveats: endpoint and database figures are pattern-based, dead code is judged by name. Spot-check one figure from sections 3 and 4 with Grep and state the result.
|
|
35
29
|
|
|
36
|
-
Use exact numbers
|
|
37
|
-
opinions on quality that the numbers do not support.
|
|
30
|
+
Use exact tool numbers. No estimates. No quality opinions beyond the numbers.
|
package/skills/deadcode/SKILL.md
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deadcode
|
|
3
|
-
description: Find dead code
|
|
3
|
+
description: Find dead code in the project or under a path, verify it, remove what the user confirms.
|
|
4
4
|
argument-hint: "[path]"
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
allowed-tools: mcp__plugin_clast_clast__clast_unused, mcp__plugin_clast_clast__clast_call_graph, mcp__plugin_clast_clast__clast_references, mcp__plugin_clast_clast__clast_grep, Grep, Read
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Scope: `$ARGUMENTS` (empty = whole project).
|
|
10
10
|
|
|
11
|
-
1. Call `clast_unused` with `path`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- symbols marked `exported`: unused inside this project. In an application that is dead code; in a
|
|
22
|
-
library it may be public API. Say which case applies here (look for a published package, a
|
|
23
|
-
public header directory, or an API surface file).
|
|
24
|
-
3. Verify before you present: for the candidates you intend to recommend (at most about 15), run one
|
|
25
|
-
Grep for the bare name across the repository and drop any that turn up in build files, scripts,
|
|
26
|
-
generated code or documentation that shows it is an entry point.
|
|
27
|
-
4. Report as a short table grouped by file: symbol, lines, size, and why it is considered unused. Give
|
|
28
|
-
the total number of removable lines. State the limits in one sentence: the check is by name, so
|
|
29
|
-
members with common names (`get`, `run`) are never listed, and code reached only through reflection
|
|
30
|
-
can be listed wrongly.
|
|
31
|
-
5. Do not delete anything yet. Ask which of the candidates to remove. When the user confirms, delete
|
|
32
|
-
them (and helpers that only they used), then build or run the tests the project has to confirm
|
|
33
|
-
nothing broke, and report the result.
|
|
11
|
+
1. Call `clast_unused` with `path` = scope.
|
|
12
|
+
2. Treat each group:
|
|
13
|
+
- unused: strong candidates.
|
|
14
|
+
- probably unused: confirm each with `clast_call_graph`.
|
|
15
|
+
- used only by tests: report only.
|
|
16
|
+
- name in a string, config or template: open the cited location, state what it is.
|
|
17
|
+
- `exported`: dead in an application, possibly public API in a library. State which applies.
|
|
18
|
+
3. For up to 15 candidates, Grep the bare name repo-wide. Drop any found in build files, scripts or generated code.
|
|
19
|
+
4. Report a table by file: symbol, lines, size, reason. Give total removable lines. State once: judged by name, common member names are never listed, reflection can cause false entries.
|
|
20
|
+
5. Delete nothing until the user selects. Then delete the selection and helpers only it used, run the build or tests, report the result.
|
package/skills/explore/SKILL.md
CHANGED
|
@@ -1,54 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explore
|
|
3
|
-
description:
|
|
4
|
-
How to get the most out of the clast code index: which tool answers which question, and the habits
|
|
5
|
-
that save round trips. Use when navigating, reviewing or about to change code in a repository that
|
|
6
|
-
has the clast MCP tools, especially for multi-step questions (call chains, subclasses, impact, counts,
|
|
7
|
-
dead code) or code described by behaviour instead of by name.
|
|
3
|
+
description: Which clast tool answers which question, and when to skip clast. Use when navigating, reviewing or about to change code in a repository that has the clast MCP tools.
|
|
8
4
|
---
|
|
9
5
|
|
|
10
|
-
#
|
|
6
|
+
# clast
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
take several hops, on counting, on dead code and on finding code by what it does; simple lookups are a
|
|
15
|
-
tie. Use it where it wins.
|
|
16
|
-
|
|
17
|
-
## Pick the tool by question
|
|
8
|
+
Use clast for multi-hop questions, counts, dead code and code described by behaviour.
|
|
9
|
+
Skip clast for one exact name (Grep) and for mechanical edits.
|
|
18
10
|
|
|
19
11
|
| Question | Tool |
|
|
20
12
|
|----------|------|
|
|
21
|
-
| What is in this repo / directory / file? | `clast_overview`,
|
|
22
|
-
| Where is the code that does X (no name known)? | `clast_search` with a short description
|
|
23
|
-
| Show
|
|
24
|
-
| Who calls X,
|
|
13
|
+
| What is in this repo / directory / file? | `clast_overview`, `clast_file_summary` |
|
|
14
|
+
| Where is the code that does X (no name known)? | `clast_search` with a short description |
|
|
15
|
+
| Show X before editing | `clast_get_context` |
|
|
16
|
+
| Who calls X, N levels up? | `clast_call_graph` (`depth`, `within`) |
|
|
25
17
|
| What implements / extends / overrides X? | `clast_hierarchy` |
|
|
26
|
-
| What
|
|
27
|
-
| How many X?
|
|
28
|
-
| What is unused?
|
|
29
|
-
| What did
|
|
30
|
-
| Every use of an identifier
|
|
31
|
-
|
|
32
|
-
## Habits that save round trips
|
|
18
|
+
| What changes with X, which tests run? | `clast_impact` |
|
|
19
|
+
| How many X? Endpoints, database access, dependencies? | `clast_stats` |
|
|
20
|
+
| What is unused? | `clast_unused` |
|
|
21
|
+
| What did the diff touch? | `clast_changes` |
|
|
22
|
+
| Every use of an identifier / a string or config key | `clast_references` / `clast_grep` |
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
and `clast_hierarchy` take a `depth`.
|
|
36
|
-
- Address symbols precisely: `Class.method`, `path/file.ext:name`, `path/file.ext:123`. A bare name
|
|
37
|
-
with several definitions returns the candidates; pick one, do not guess.
|
|
38
|
-
- Read the symbol, not the file: `clast_get_context` returns exactly the definition's lines.
|
|
39
|
-
- An edge marked `?` was matched by name only (the receiver's type is unknown). Verify it with a quick
|
|
40
|
-
Grep or Read before you rely on it; unmarked edges are resolved through types and imports.
|
|
41
|
-
- Callers of a method include calls through its interface or base class, not calls bound to an override
|
|
42
|
-
in a subclass. For every implementation's callers ask for the interface or base method.
|
|
43
|
-
- Before a signature change: `clast_impact` lists the overrides and declarations that change with it,
|
|
44
|
-
the callers by file and line, and the tests that reach it even when none names it.
|
|
45
|
-
- `clast_unused` lists candidates judged by name. Members with common names (`get`, `run`) are never
|
|
46
|
-
listed, and reflection or framework wiring can keep a listed symbol alive: confirm with the compiler
|
|
47
|
-
or the tests before deleting.
|
|
48
|
-
- Narrow with `path` (and `within` for call graphs) on large repositories; results and run time shrink.
|
|
49
|
-
- The index follows file changes, including your own edits. There is no need to reindex.
|
|
50
|
-
- If a tool says a name is not defined in the project, it is external or built at run time:
|
|
51
|
-
`clast_references` and `clast_grep` still find its uses.
|
|
24
|
+
Rules:
|
|
52
25
|
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
- Batch: `clast_search` and `clast_get_context` take arrays. Use `depth` instead of repeated calls.
|
|
27
|
+
- Address symbols as `Class.method`, `path/file.ext:name` or `path/file.ext:123`. If candidates are listed, pick one.
|
|
28
|
+
- `?` on an edge = name-only match. Verify it before use.
|
|
29
|
+
- Callers of a method include calls through its interface or base type, not calls bound to a subclass override.
|
|
30
|
+
- Rename or signature change of a distinctive name: no clast. Grep the name, then edit.
|
|
31
|
+
- `clast_impact` before a change only if the name is common (`get`, `run`), overrides must change too, or tests must be chosen.
|
|
32
|
+
- `clast_unused` results are candidates. Common member names are never listed. Confirm with the compiler or tests before deletion.
|
|
33
|
+
- Narrow large repositories with `path` / `within`.
|
|
34
|
+
- Never reindex. The index follows edits.
|
|
35
|
+
- "Not defined in the project" = external or built at run time. `clast_references` and `clast_grep` still find uses.
|
package/skills/impact/SKILL.md
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: impact
|
|
3
|
-
description: Show what a change to one
|
|
3
|
+
description: Show what a change to one symbol affects - what changes with it, every caller, the tests to run.
|
|
4
4
|
argument-hint: "<symbol>"
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
allowed-tools: mcp__plugin_clast_clast__clast_impact, mcp__plugin_clast_clast__clast_search, mcp__plugin_clast_clast__clast_get_context, mcp__plugin_clast_clast__clast_call_graph, mcp__plugin_clast_clast__clast_hierarchy, Grep, Read
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Symbol: `$ARGUMENTS`. If empty, ask. If ambiguous, pick the candidate the user means and address it as `Container.name` or `path/file.ext:name`.
|
|
10
10
|
|
|
11
|
-
1.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
- **Reach**: how many functions in how many files depend on it indirectly, by area.
|
|
20
|
-
- **Tests to run**: the test files, split into those that call it directly and those that reach it
|
|
21
|
-
through callers. Give the project's command to run exactly those tests if you can tell what it is.
|
|
22
|
-
- If no test reaches it, say so plainly: that is the main risk of the change.
|
|
23
|
-
4. End with a one-line verdict on the size of the change (local, moderate, wide) and what to edit
|
|
24
|
-
first. Do not start editing unless the user asks.
|
|
11
|
+
1. Call `clast_impact`.
|
|
12
|
+
2. Report in this order:
|
|
13
|
+
- Changes together: declarations, overrides, implementations, overloads.
|
|
14
|
+
- Direct callers by file and line. Read each `?` caller and state if it is real.
|
|
15
|
+
- Reach: indirect callers, count by area.
|
|
16
|
+
- Tests to run: direct, then through callers. Give the command to run them if known.
|
|
17
|
+
- If no test reaches it, state that as the main risk.
|
|
18
|
+
3. End with one line: size of the change (local, moderate, wide) and what to edit first. Do not edit unless asked.
|
package/skills/status/SKILL.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: status
|
|
3
|
-
description: Show the state of the clast index for this project
|
|
3
|
+
description: Show the state of the clast index for this project.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
allowed-tools: mcp__plugin_clast_clast__clast_status, mcp__plugin_clast_clast__clast_reindex
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Call `clast_status
|
|
9
|
-
is up to date or still building, and where the database is. If the index is still building, say how
|
|
10
|
-
far it is. If the status shows a problem (no files, a failed run), say so and offer to run
|
|
11
|
-
`clast_reindex`; do not reindex unasked.
|
|
8
|
+
Call `clast_status`. Report files, symbols, languages, up to date or building (with progress), database location. If it shows a problem, state it and offer `clast_reindex`. Do not reindex unasked.
|
package/src/cli.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
process.env.UV_THREADPOOL_SIZE ??= '16';
|
|
5
5
|
|
|
6
6
|
import { readFileSync } from 'node:fs';
|
|
7
|
-
import { resolve } from 'node:path';
|
|
7
|
+
import { dirname, join, resolve } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
8
9
|
import { Clast } from './engine.js';
|
|
9
10
|
import { SourceParser } from './parser/index.js';
|
|
10
11
|
import { ToolContext } from './tools/context.js';
|
|
@@ -35,6 +36,7 @@ usage: clast-ai [command] [args] [--root <dir>]
|
|
|
35
36
|
unused [path] dead code [--kind k] [--lang l] [--limit n] [--no-exported]
|
|
36
37
|
stats [what] [name] exact counts: inventory | symbols | subtypes | calls | text | imports | endpoints | database
|
|
37
38
|
[--kind k] [--on receiver] [--path p] [--lang l] [--group-by g] [--depth n] [--limit n] [--tests]
|
|
39
|
+
guide print the usage guide for agents (append it to AGENTS.md, GEMINI.md or a rules file)
|
|
38
40
|
migrate [--apply] find (and with --apply remove) what older installs left behind: duplicate
|
|
39
41
|
MCP registrations next to the plugin, the v0.1 index file
|
|
40
42
|
parse <file> [--json] debug: show what the extractor produces for a file
|
|
@@ -107,6 +109,15 @@ async function main(): Promise<void> {
|
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
111
|
|
|
112
|
+
if (cmd === 'guide') {
|
|
113
|
+
// The usage guide the Claude Code plugin ships as a skill, as plain Markdown for agents that take
|
|
114
|
+
// their instructions from a file: `clast-ai guide >> AGENTS.md`.
|
|
115
|
+
const file = join(dirname(fileURLToPath(import.meta.url)), '..', 'skills', 'explore', 'SKILL.md');
|
|
116
|
+
const text = readFileSync(file, 'utf-8').replace(/\r\n/g, '\n');
|
|
117
|
+
const body = text.replace(/^---\n[\s\S]*?\n---\n+/, '').replace(/\nSlash commands in this plugin:[\s\S]*$/, '\n');
|
|
118
|
+
return void console.log(body.trimEnd());
|
|
119
|
+
}
|
|
120
|
+
|
|
110
121
|
if (cmd === 'migrate') {
|
|
111
122
|
const { migrate } = await import('./migrate.js');
|
|
112
123
|
const out = await migrate({ apply: flags.has('apply'), auto: flags.has('auto'), force: flags.has('force'), cwd: str('root') });
|
package/src/indexer/scan.ts
CHANGED
|
@@ -5,6 +5,9 @@ import { extname, join } from 'node:path';
|
|
|
5
5
|
import type { ClastConfig } from '../config/index.js';
|
|
6
6
|
import { supportedExtensions } from '../parser/registry.js';
|
|
7
7
|
|
|
8
|
+
/** A project has thousands of directories; a home, temp or system directory has hundreds of thousands. */
|
|
9
|
+
const MAX_DIRS = 150_000;
|
|
10
|
+
|
|
8
11
|
// `ignore` is CJS; under NodeNext the default import may be the module object.
|
|
9
12
|
const createIgnore: () => Ignore =
|
|
10
13
|
(ignoreFactory as unknown as { default?: () => Ignore }).default ?? (ignoreFactory as unknown as () => Ignore);
|
|
@@ -119,8 +122,12 @@ export class IgnoreRules {
|
|
|
119
122
|
|
|
120
123
|
/** Files skipped by the last scan because they exceed maxFileSize. */
|
|
121
124
|
skippedLarge = 0;
|
|
122
|
-
/** True when the last scan stopped at the maxFiles cap. */
|
|
125
|
+
/** True when the last scan stopped at the maxFiles cap or the directory cap. */
|
|
123
126
|
truncated = false;
|
|
127
|
+
/** True when the last scan stopped because the tree has more directories than a project plausibly has. */
|
|
128
|
+
tooBroad = false;
|
|
129
|
+
private dirsWalked = 0;
|
|
130
|
+
private sliceStart = 0;
|
|
124
131
|
private readonly maxFiles: number;
|
|
125
132
|
|
|
126
133
|
/**
|
|
@@ -166,8 +173,11 @@ export class IgnoreRules {
|
|
|
166
173
|
const candidates: string[] = [];
|
|
167
174
|
this.skippedLarge = 0;
|
|
168
175
|
this.truncated = false;
|
|
176
|
+
this.tooBroad = false;
|
|
177
|
+
this.dirsWalked = 0;
|
|
178
|
+
this.sliceStart = performance.now();
|
|
169
179
|
const rules: Rule[] = [this.rootRule];
|
|
170
|
-
this.walk('', rules, candidates, 0);
|
|
180
|
+
await this.walk('', rules, candidates, 0);
|
|
171
181
|
|
|
172
182
|
// stat() dominates a warm start (especially on Windows); run it on the
|
|
173
183
|
// libuv thread pool instead of serially on the main thread.
|
|
@@ -191,12 +201,26 @@ export class IgnoreRules {
|
|
|
191
201
|
return out.filter(Boolean);
|
|
192
202
|
}
|
|
193
203
|
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Reads directories synchronously (fastest for a normal project) but hands the event loop back every
|
|
206
|
+
* few milliseconds: the walk starts right after the server connects, and a client that gets no answer
|
|
207
|
+
* to its first request gives up. A tree far larger than a project (a home or temp directory) is cut off.
|
|
208
|
+
*/
|
|
209
|
+
private async walk(dirRel: string, parentRules: Rule[], out: string[], depth: number): Promise<void> {
|
|
210
|
+
if (depth > 40 || this.truncated) return;
|
|
196
211
|
if (out.length >= this.maxFiles) {
|
|
197
212
|
this.truncated = true;
|
|
198
213
|
return;
|
|
199
214
|
}
|
|
215
|
+
if (++this.dirsWalked > MAX_DIRS) {
|
|
216
|
+
this.truncated = true;
|
|
217
|
+
this.tooBroad = true;
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (performance.now() - this.sliceStart > 15) {
|
|
221
|
+
await new Promise<void>(done => setImmediate(done));
|
|
222
|
+
this.sliceStart = performance.now();
|
|
223
|
+
}
|
|
200
224
|
const rule = this.ruleFor(dirRel);
|
|
201
225
|
const rules = rule ? [...parentRules, rule] : parentRules;
|
|
202
226
|
|
|
@@ -213,7 +237,7 @@ export class IgnoreRules {
|
|
|
213
237
|
if (name.startsWith('.')) continue;
|
|
214
238
|
const rel = dirRel + name;
|
|
215
239
|
if (IgnoreRules.test(rules, rel, true)) continue;
|
|
216
|
-
this.walk(rel + '/', rules, out, depth + 1);
|
|
240
|
+
await this.walk(rel + '/', rules, out, depth + 1);
|
|
217
241
|
} else if (e.isFile()) {
|
|
218
242
|
if (!this.extensions.has(extname(name).toLowerCase())) continue;
|
|
219
243
|
const rel = dirRel + name;
|
package/src/server/index.ts
CHANGED
|
@@ -28,7 +28,8 @@ const INSTRUCTIONS = `Clast is a pre-built, always-fresh code index for this rep
|
|
|
28
28
|
- How many X, how big, what is it made of -> clast_stats (exact totals; do not count search results by hand).
|
|
29
29
|
- Strings, comments, config keys -> clast_grep. After a change -> clast_changes (touched symbols, affected callers, tests).
|
|
30
30
|
|
|
31
|
-
When
|
|
31
|
+
When adding something new (a subclass, a handler, a provider): find the siblings with clast_hierarchy or clast_search and read one with clast_get_context.
|
|
32
|
+
When renaming a symbol or changing a signature: if the name is distinctive, do NOT use clast - one Grep for the name lists every site, then edit. Use clast_impact first only when the name is common (get, run, close) so that Grep would drown in unrelated hits, when overrides or interface implementations must change with it, or to choose the tests to run.
|
|
32
33
|
Most tools take several names at once (arrays). Symbols: name, Container.name, or path/to/file.ext:name. "?" marks a name-based guess. The index follows file changes, including your own edits.`;
|
|
33
34
|
|
|
34
35
|
const text = (t: string) => ({ content: [{ type: 'text' as const, text: t }] });
|
package/src/tools/explore.ts
CHANGED
|
@@ -829,7 +829,12 @@ export async function status(ctx: ToolContext, watcher?: { isActive: boolean; pe
|
|
|
829
829
|
if (ctx.indexer.rules.skippedLarge) {
|
|
830
830
|
out.push(`skipped: ${plural(ctx.indexer.rules.skippedLarge, 'file')} larger than ${ctx.clast.config.maxFileSize} bytes (maxFileSize)`);
|
|
831
831
|
}
|
|
832
|
-
if (ctx.indexer.rules.
|
|
832
|
+
if (ctx.indexer.rules.tooBroad) {
|
|
833
|
+
out.push(
|
|
834
|
+
`warning: ${ctx.clast.root} has more directories than a project (the scan stopped). ` +
|
|
835
|
+
`Start the agent inside a project, or set CLAST_PROJECT_DIR to one.`
|
|
836
|
+
);
|
|
837
|
+
} else if (ctx.indexer.rules.truncated) {
|
|
833
838
|
out.push(
|
|
834
839
|
`warning: stopped at ${ctx.clast.config.maxFiles} source files (maxFiles). Is the project root too broad? ` +
|
|
835
840
|
`Set CLAST_PROJECT_DIR or raise maxFiles in clast.config.json.`
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Package version (keep in sync with package.json; checked by a test). */
|
|
2
|
-
export const VERSION = '0.2.
|
|
2
|
+
export const VERSION = '0.2.4';
|