codestrate 0.2.0 → 0.2.2
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/install.d.ts +13 -3
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +335 -41
- package/dist/install.js.map +1 -1
- package/package.json +1 -1
package/dist/install.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Install script for codestrate — prints MCP configuration instructions
|
|
4
|
+
* and automatically injects an MCP server section into AGENTS.md
|
|
5
|
+
* so coding agents know to use the available tools.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Inject or update the codestrate MCP section in AGENTS.md.
|
|
9
|
+
*
|
|
10
|
+
* Looks for markers `<!-- codestrate-mcp -->` … `<!-- /codestrate-mcp -->`.
|
|
11
|
+
* If found, replaces the content between them. Otherwise appends at end of file.
|
|
12
|
+
*
|
|
13
|
+
* @param agentsPath - Path to AGENTS.md (default: cwd/AGENTS.md)
|
|
14
|
+
* @returns true if the file was modified, false if skipped
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectToAgentsMd(agentsPath?: string): boolean;
|
|
7
17
|
//# sourceMappingURL=install.d.ts.map
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAkQH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAwC7D"}
|
package/dist/install.js
CHANGED
|
@@ -1,57 +1,343 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Install script for codestrate — prints MCP configuration instructions
|
|
4
|
+
* and automatically injects an MCP server section into AGENTS.md
|
|
5
|
+
* so coding agents know to use the available tools.
|
|
5
6
|
*/
|
|
7
|
+
import { readFileSync, writeFileSync } from "fs";
|
|
8
|
+
import { resolve } from "path";
|
|
6
9
|
import { SERVER_NAME, SERVER_VERSION } from "./constants.js";
|
|
7
10
|
const TOOLS = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
{
|
|
12
|
+
name: "ci_get_context",
|
|
13
|
+
description: "Primary context retrieval — finds relevant symbols, files, tests, git history, and past experiences for a natural-language task description, within a token budget.",
|
|
14
|
+
usage: "Call first for any new coding task to gather relevant context before diving in.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "ci_explore",
|
|
18
|
+
description: "Search symbols, files, and patterns using graph FTS5 + symbol index. Returns compressed, relevance-ranked results.",
|
|
19
|
+
usage: "Explore unknown code; find where a symbol is defined or referenced across the codebase.",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "ci_repo_overview",
|
|
23
|
+
description: "Scan repository structure, build system, frameworks, entry points, and available commands (build/test/lint). Returns a Markdown or JSON report.",
|
|
24
|
+
usage: "Understand a new repository's architecture and toolchain on first encounter.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "ci_search_code",
|
|
28
|
+
description: "Full-text code search via ripgrep + BM25 symbol scoring. Supports language filters and pagination.",
|
|
29
|
+
usage: "Find code by content or pattern when you need raw text search across files.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "ci_inspect_symbol",
|
|
33
|
+
description: "Look up a symbol definition, its callers, callees, imports, and related tests.",
|
|
34
|
+
usage: "Understand a specific symbol's role, who calls it, and what it depends on.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "ci_trace_flow",
|
|
38
|
+
description: "Trace the call/import flow for a symbol — finds callers, callees, imports, and dependencies up to a configurable depth.",
|
|
39
|
+
usage: "Follow a call chain across modules to understand execution paths or data flow.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "ci_search_history",
|
|
43
|
+
description: "Search git history for commits matching a query (commit messages, files, authors).",
|
|
44
|
+
usage: "Find when/why something changed; investigate bug introduction or feature history.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "ci_recall_experience",
|
|
48
|
+
description: "Search past experiences and memories semantically similar to the current task. Supports filtering by memory type (episodic, semantic, procedural, negative) and repository.",
|
|
49
|
+
usage: "Check if a similar problem was solved before; learn from past debugging sessions.",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "ci_detect_dead_code",
|
|
53
|
+
description: "Find symbols with zero callers in the graph — potential dead code candidates for removal.",
|
|
54
|
+
usage: "Clean up unused code; identify functions, methods, or variables never referenced elsewhere.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "ci_analyze_impact",
|
|
58
|
+
description: "Analyze the impact of file changes — finds dependents, imports, exports, and related tests to identify affected modules.",
|
|
59
|
+
usage: "Before refactoring or deleting code, check what else would break or need updates.",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "ci_status",
|
|
63
|
+
description: "Report the current repository index state — fingerprint, commit, age, symbol count, relation count, and staleness detection.",
|
|
64
|
+
usage: "Check if the index is up-to-date; verify the server has indexed the repository.",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "ci_run_validation",
|
|
68
|
+
description: "Run validation commands (build, test, lint) against the project to verify code quality. Reports pass/fail per target with output.",
|
|
69
|
+
usage: "After making changes, run validation to confirm nothing is broken.",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "ci_record_experience",
|
|
73
|
+
description: "Save a verified experience to memory. Requires validation evidence: build/test pass, commit SHA, changed files, and the validation command that was run.",
|
|
74
|
+
usage: "After fixing a bug or completing a task, record the experience so future sessions benefit from the knowledge.",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "ci_reindex",
|
|
78
|
+
description: "Rebuild the repository index — rescans files, extracts symbols, and updates relations. Supports incremental (git diff) and full modes.",
|
|
79
|
+
usage: "Trigger re-indexing when the index is stale or after significant codebase changes via git operations.",
|
|
80
|
+
},
|
|
22
81
|
];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
82
|
+
// ─── AGENTS.md section generator ───────────────────────────
|
|
83
|
+
const MARKER_OPEN = "<!-- codestrate-mcp -->";
|
|
84
|
+
const MARKER_CLOSE = "<!-- /codestrate-mcp -->";
|
|
85
|
+
function generateMdSection() {
|
|
86
|
+
const L = (...parts) => lines.push(...parts);
|
|
87
|
+
const lines = [];
|
|
88
|
+
L("");
|
|
89
|
+
L(MARKER_OPEN);
|
|
90
|
+
L("## MCP Servers");
|
|
91
|
+
L("");
|
|
92
|
+
L("The following MCP server is reachable via `stdio` transport. These tools provide code understanding, symbol analysis, repository intelligence, impact assessment, and cross-session memory. **Treat them as a first-class part of your toolset** — they replace guesswork, full-file reads, and manual grep with structured, indexed, and ranked results.");
|
|
93
|
+
L("");
|
|
94
|
+
L("---");
|
|
95
|
+
L("");
|
|
96
|
+
L("### codestrate");
|
|
97
|
+
L("");
|
|
98
|
+
L("- **Package**: `codestrate` on npm");
|
|
99
|
+
L("- **Transport**: stdio");
|
|
100
|
+
L("- **Command**: `npx -y codestrate`");
|
|
101
|
+
L("- **Tool count**: 14 (all prefixed `ci_`)");
|
|
102
|
+
L("- **Index scope**: one repository at a time (the CWD where the server starts)");
|
|
103
|
+
L("");
|
|
104
|
+
L("---");
|
|
105
|
+
L("");
|
|
106
|
+
L("### Tool Obligation Matrix");
|
|
107
|
+
L("");
|
|
108
|
+
L("Every tool is annotated with its obligation level in each scenario:");
|
|
109
|
+
L("");
|
|
110
|
+
L("| Level | Meaning |");
|
|
111
|
+
L("|-------|---------|");
|
|
112
|
+
L("| **MUST** | Required — do not proceed without calling this tool first |");
|
|
113
|
+
L("| **SHOULD** | Strongly recommended — skip only when you have equivalent info from a prior call |");
|
|
114
|
+
L("| **MAY** | Optional — use when the situation specifically calls for it |");
|
|
115
|
+
L("");
|
|
116
|
+
L("---");
|
|
117
|
+
L("");
|
|
118
|
+
L("### Tool Reference");
|
|
119
|
+
L("");
|
|
120
|
+
L("| Tool | Obligation | Description | Trigger / When to Use |");
|
|
121
|
+
L("|------|-----------|-------------|----------------------|");
|
|
122
|
+
L("| `ci_get_context` | **MUST** on every new task | Primary context retrieval. Takes a natural-language task description and returns relevant symbols, files, tests, git history, and past experiences within a configurable token budget. | **Every new task** — before reading any file, making any edit, or writing any code. If you skip this, you are flying blind. Use the task description verbatim as the `task` parameter. |");
|
|
123
|
+
L("| `ci_explore` | **SHOULD** for navigation | Search symbols, files, and patterns via FTS5 + symbol index. Returns compressed, relevance-ranked results with file/line/signature. | **When you need to find something** — a symbol definition, a function location, a pattern across files. Preferred over raw grep because it returns structured results with relevance scoring and avoids loading every file. |");
|
|
124
|
+
L("| `ci_repo_overview` | **MUST** on first encounter with a repo | Scan repository structure, build system, frameworks, entry points, and available build/test/lint commands. Returns a Markdown or JSON report. | **First interaction with this repository in the session** — never assume you know the build system or entry points. Call this once per session to learn project structure, then rely on memory. |");
|
|
125
|
+
L("| `ci_search_code` | **MAY** (fallback for ci_explore) | Full-text code search via ripgrep + BM25 symbol scoring. Supports language filters, scope, and pagination. | **When ci_explore returns nothing useful** — use for raw pattern/text search across file contents. Also useful when you need language-filtered results or paginated output. |");
|
|
126
|
+
L("| `ci_inspect_symbol` | **SHOULD** before editing a symbol | Look up a symbol definition, its callers, callees, imports/exports, and related tests. Returns detailed structured data. | **Before modifying or removing a symbol** — understand who calls it, what it depends on, and what tests cover it. Also use when reviewing a PR to understand what a changed symbol affects. |");
|
|
127
|
+
L("| `ci_trace_flow` | **SHOULD** for call-chain analysis | Trace call/import flow for a symbol up to N depths. Supports forward (callees), backward (callers), or both directions. | **When you need to understand an execution path** — e.g. \"what happens when UserService.login is called?\" or \"what calls this error handler?\". Use 3+ depths for non-trivial flows. |");
|
|
128
|
+
L("| `ci_search_history` | **MAY** (context-dependent) | Search git history for commits matching a query (commit messages, files, authors, diffs). Returns structured commit entries. | **When investigating bugs or regressions** — find when a specific line/feature was introduced or last changed. Also use when you need to understand the rationale behind a past change. |");
|
|
129
|
+
L("| `ci_recall_experience` | **SHOULD** when debugging | Search past debugging experiences and semantic memories similar to the current task. Supports filtering by memory type and repository. | **When debugging a non-trivial issue** — before spending time on root-cause analysis, check if a similar bug was fixed before. Returns quality-scored experiences with solutions, changed files, and evidence. |");
|
|
130
|
+
L("| `ci_detect_dead_code` | **MAY** (cleanup / refactor) | Find symbols with zero incoming edges in the dependency graph — potential dead code. Supports filtering by symbol kind and result limit. | **When cleaning up code or preparing a refactor** — identify functions, methods, or variables that nothing references. Remove with confidence after verifying each result. |");
|
|
131
|
+
L("| `ci_analyze_impact` | **MUST** before any destructive change | Analyze the impact of file changes — finds dependents, imports, exports, and related tests to identify affected modules across the codebase. | **Before deleting, renaming, or significantly refactoring a file or symbol** — answers \"what else will break?\". Call with the files you intend to change; review the affected modules before proceeding. |");
|
|
132
|
+
L("| `ci_status` | **SHOULD** after reindex / on stale suspicion | Report the current index state: fingerprint, commit SHA, branch, symbol count, relation count, staleness flag, and time since last index. | **When you suspect the index is stale** (e.g., after a git pull, branch switch, or if tools return outdated results). Also call after `ci_reindex` to verify completion. |");
|
|
133
|
+
L("| `ci_run_validation` | **SHOULD** after every code change | Run validation commands (build, test, lint) against the project. Returns per-target pass/fail with command output, errors, and duration. | **After making any code change** — run build and test at minimum before presenting a change as complete. Use `all` target for full validation. |");
|
|
134
|
+
L("| `ci_record_experience` | **SHOULD** after every fix / non-trivial task | Save a verified experience to cross-session memory. Requires evidence: commit SHA, build pass, tests pass, changed files list, and the validation command that was run. | **After fixing a bug, implementing a feature, or learning something non-obvious** — future sessions will retrieve this via `ci_recall_experience`. Required evidence gates ensure only verified knowledge is stored. |");
|
|
135
|
+
L("| `ci_reindex` | **MAY** (on demand) | Rebuild the repository index — rescans files, extracts symbols, and updates relations. Supports incremental (git diff, faster) and full (comprehensive) modes. | **When the index is stale** (check with `ci_status` first). Incremental mode is sufficient for most cases after git operations. Use full mode only when incremental produces inconsistent results. |");
|
|
136
|
+
L("");
|
|
137
|
+
L("---");
|
|
138
|
+
L("");
|
|
139
|
+
L("### Workflow Templates");
|
|
140
|
+
L("");
|
|
141
|
+
L("Below are concrete tool-calling sequences for common agent scenarios. Follow these exactly — they represent the optimal order learned from production use.");
|
|
142
|
+
L("");
|
|
143
|
+
L("#### Starting a New Feature / Task");
|
|
144
|
+
L("");
|
|
145
|
+
L("```");
|
|
146
|
+
L("1. ci_get_context(task=\"<user's request verbatim>\") ← MUST: gather all relevant context");
|
|
147
|
+
L("2. ci_explore(query=\"<key symbols from step 1>\") ← SHOULD: locate specific files/symbols");
|
|
148
|
+
L("3. ci_inspect_symbol(symbol=\"<relevant symbol>\") ← SHOULD: understand a key symbol before editing");
|
|
149
|
+
L("4. (make changes)");
|
|
150
|
+
L("5. ci_run_validation(targets=[\"build\",\"test\"]) ← SHOULD: verify nothing is broken");
|
|
151
|
+
L("6. ci_record_experience(...) ← SHOULD: save what you learned");
|
|
152
|
+
L("```");
|
|
153
|
+
L("");
|
|
154
|
+
L("> **Rule**: Never start implementation without steps 1 and 2. The context tool tells you what files matter; the explore tool tells you where the relevant code lives.");
|
|
155
|
+
L("");
|
|
156
|
+
L("#### Debugging a Bug / Incident");
|
|
157
|
+
L("");
|
|
158
|
+
L("```");
|
|
159
|
+
L("1. ci_recall_experience(task=\"<bug description>\") ← SHOULD: check if this was fixed before");
|
|
160
|
+
L("2. ci_get_context(task=\"<bug description>\") ← MUST: understand affected area");
|
|
161
|
+
L("3. ci_search_history(query=\"<related keywords>\") ← MAY: find when/why the bug was introduced");
|
|
162
|
+
L("4. ci_trace_flow(symbol=\"<suspected symbol>\") ← SHOULD: follow the execution path");
|
|
163
|
+
L("5. ci_explore(query=\"<suspected pattern>\") ← SHOULD: find all related locations");
|
|
164
|
+
L("6. (apply fix)");
|
|
165
|
+
L("7. ci_analyze_impact(files=[\"<changed files>\"]) ← MUST: verify nothing else breaks");
|
|
166
|
+
L("8. ci_run_validation(targets=[\"build\",\"test\",\"lint\"]) ← MUST: confirm fix is clean");
|
|
167
|
+
L("9. ci_record_experience(...) ← SHOULD: save the fix for future sessions");
|
|
168
|
+
L("```");
|
|
169
|
+
L("");
|
|
170
|
+
L("> **Rule**: Step 1 is optional but the highest-leverage move — a resolved similar bug saves hours. Steps 7-8 are mandatory before declaring a fix complete.");
|
|
171
|
+
L("");
|
|
172
|
+
L("#### Refactoring / Code Deletion");
|
|
173
|
+
L("");
|
|
174
|
+
L("```");
|
|
175
|
+
L("1. ci_get_context(task=\"<refactor description>\") ← MUST: understand the scope");
|
|
176
|
+
L("2. ci_inspect_symbol(symbol=\"<symbol to change>\") ← MUST: understand callers and dependents");
|
|
177
|
+
L("3. ci_trace_flow(symbol=\"<symbol>\", depth=3) ← SHOULD: follow the full chain");
|
|
178
|
+
L("4. ci_analyze_impact(files=[\"<files to change>\"]) ← MUST: know exactly what depends on this");
|
|
179
|
+
L("5. ci_detect_dead_code() ← MAY: check if anything is already dead");
|
|
180
|
+
L("6. (apply refactor)");
|
|
181
|
+
L("7. ci_run_validation(targets=[\"build\",\"test\"]) ← MUST: verify refactor didn't break anything");
|
|
182
|
+
L("8. ci_record_experience(...) ← SHOULD: save refactoring knowledge");
|
|
183
|
+
L("```");
|
|
184
|
+
L("");
|
|
185
|
+
L("> **Rule**: Skipping ci_analyze_impact before deleting code is the #1 cause of accidental breakage in production.");
|
|
186
|
+
L("");
|
|
187
|
+
L("#### Code Review / Understanding a PR");
|
|
188
|
+
L("");
|
|
189
|
+
L("```");
|
|
190
|
+
L("1. ci_get_context(task=\"<PR description>\") ← MUST: contextualise the change");
|
|
191
|
+
L("2. For each modified symbol:");
|
|
192
|
+
L(" ci_inspect_symbol(symbol=\"<symbol>\") ← SHOULD: understand what each changed symbol does");
|
|
193
|
+
L("3. ci_analyze_impact(files=<changed files from PR>) ← SHOULD: verify the PR doesn't break dependents");
|
|
194
|
+
L("4. ci_run_validation(targets=[\"build\",\"test\"]) ← MAY: verify CI-reported results");
|
|
195
|
+
L("```");
|
|
196
|
+
L("");
|
|
197
|
+
L("---");
|
|
198
|
+
L("");
|
|
199
|
+
L("### Quick Decision Flow");
|
|
200
|
+
L("");
|
|
201
|
+
L("When you need to decide which tool to call, use this priority-ordered checklist:");
|
|
202
|
+
L("");
|
|
203
|
+
L("1. **Brand new task / feature?** → `ci_get_context` (MUST)");
|
|
204
|
+
L("2. **First time seeing this repo in this session?** → `ci_repo_overview` (MUST)");
|
|
205
|
+
L("3. **Need to find something?** → `ci_explore` (SHOULD, faster) → fallback `ci_search_code` (MAY)");
|
|
206
|
+
L("4. **Need to understand a symbol?** → `ci_inspect_symbol` (SHOULD) → `ci_trace_flow` (SHOULD)");
|
|
207
|
+
L("5. **Debugging an issue?** → `ci_recall_experience` (SHOULD) → `ci_search_history` (MAY)");
|
|
208
|
+
L("6. **About to delete / rename code?** → `ci_analyze_impact` (MUST)");
|
|
209
|
+
L("7. **Made changes?** → `ci_run_validation` (SHOULD) → `ci_record_experience` (SHOULD)");
|
|
210
|
+
L("8. **Index seems off?** → `ci_status` (SHOULD) → `ci_reindex` (MAY)");
|
|
211
|
+
L("");
|
|
212
|
+
L("---");
|
|
213
|
+
L("");
|
|
214
|
+
L("### Enforcement Rules");
|
|
215
|
+
L("");
|
|
216
|
+
L("These are non-negotiable rules for agents using this MCP server. Violations cause inconsistent results, wasted tokens, or production breakage.");
|
|
217
|
+
L("");
|
|
218
|
+
L("| # | Rule | Rationale |");
|
|
219
|
+
L("|---|------|----------|");
|
|
220
|
+
L("| 1 | **MUST** call `ci_get_context` before starting any new task | Without context, the agent has no structured understanding of relevant files, symbols, or history. Reading files blind costs more tokens and produces lower quality. |");
|
|
221
|
+
L("| 2 | **MUST** call `ci_repo_overview` at least once per session per repository | Build systems, entry points, and framework assumptions change. Never hardcode assumptions about project structure. |");
|
|
222
|
+
L("| 3 | **MUST** call `ci_analyze_impact` before deleting/renaming any file or symbol | Without impact analysis, you WILL break callers you didn't know existed. The graph-based analysis catches what grep misses. |");
|
|
223
|
+
L("| 4 | **MUST** call `ci_run_validation` after any code change before presenting as complete | Build errors or test failures discovered after delivery erode trust. Always verify, even for \"trivial\" changes. |");
|
|
224
|
+
L("| 5 | **SHOULD** call `ci_recall_experience` when debugging non-trivial issues | Duplicating effort on a solved problem wastes context budget. Previous fixes contain solutions, changed files, and validation commands. |");
|
|
225
|
+
L("| 6 | **SHOULD** call `ci_record_experience` after every fix or non-trivial task | Cross-session memory is the server's primary moat. Without recording, each session starts from zero. |");
|
|
226
|
+
L("| 7 | **SHOULD** prefer `ci_explore` over `ci_search_code` for symbol/definition lookups | The FTS5 + symbol index returns structured (name/kind/file/line/signature), relevance-ranked results. Raw ripgrep is a fallback. |");
|
|
227
|
+
L("| 8 | **MAY** use `ci_search_code` when `ci_explore` returns insufficient results | Pattern-based full-text search complements the symbol index. Use language filters to narrow scope. |");
|
|
228
|
+
L("");
|
|
229
|
+
L("---");
|
|
230
|
+
L("");
|
|
231
|
+
L("### Tool Dependencies & Ordering Constraints");
|
|
232
|
+
L("");
|
|
233
|
+
L("Some tools depend on a populated index. If you call a tool that needs indexing but the index is empty or stale, results will be incomplete or empty.");
|
|
234
|
+
L("");
|
|
235
|
+
L("- `ci_explore`, `ci_inspect_symbol`, `ci_trace_flow`, `ci_detect_dead_code`, `ci_analyze_impact` — all require an indexed symbol graph. If they return empty unexpectedly, check `ci_status` first.");
|
|
236
|
+
L("- `ci_reindex` is the recovery action. The server auto-indexes on startup, but explicit reindex may be needed after large changes.");
|
|
237
|
+
L("- `ci_get_context` and `ci_recall_experience` query memory stores that are independent of the symbol index — they work even when the index is empty.");
|
|
238
|
+
L("- `ci_run_validation` and `ci_repo_overview` require no index at all — they run shell commands or scan the filesystem directly.");
|
|
239
|
+
L("");
|
|
240
|
+
L(MARKER_CLOSE);
|
|
241
|
+
L("");
|
|
242
|
+
return lines.join("\n");
|
|
243
|
+
}
|
|
244
|
+
// ─── Inject into AGENTS.md ──────────────────────────────────
|
|
245
|
+
/**
|
|
246
|
+
* Inject or update the codestrate MCP section in AGENTS.md.
|
|
247
|
+
*
|
|
248
|
+
* Looks for markers `<!-- codestrate-mcp -->` … `<!-- /codestrate-mcp -->`.
|
|
249
|
+
* If found, replaces the content between them. Otherwise appends at end of file.
|
|
250
|
+
*
|
|
251
|
+
* @param agentsPath - Path to AGENTS.md (default: cwd/AGENTS.md)
|
|
252
|
+
* @returns true if the file was modified, false if skipped
|
|
253
|
+
*/
|
|
254
|
+
export function injectToAgentsMd(agentsPath) {
|
|
255
|
+
const path = resolve(agentsPath ?? "AGENTS.md");
|
|
256
|
+
const section = generateMdSection();
|
|
257
|
+
let content;
|
|
258
|
+
let existed = true;
|
|
259
|
+
try {
|
|
260
|
+
content = readFileSync(path, "utf-8");
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
// File doesn't exist — create it with just the section
|
|
264
|
+
content = "# Agent Instructions\n\n";
|
|
265
|
+
existed = false;
|
|
266
|
+
}
|
|
267
|
+
const openIdx = content.indexOf(MARKER_OPEN);
|
|
268
|
+
const closeIdx = content.indexOf(MARKER_CLOSE);
|
|
269
|
+
if (openIdx !== -1 && closeIdx !== -1 && closeIdx > openIdx) {
|
|
270
|
+
// Replace existing section (inclusive of markers)
|
|
271
|
+
const before = content.slice(0, openIdx);
|
|
272
|
+
const after = content.slice(closeIdx + MARKER_CLOSE.length);
|
|
273
|
+
const newContent = before + section.trimStart() + after;
|
|
274
|
+
if (newContent === content) {
|
|
275
|
+
return false; // No change
|
|
276
|
+
}
|
|
277
|
+
writeFileSync(path, newContent, "utf-8");
|
|
278
|
+
console.error(`Updated MCP server section in ${path}`);
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
// Append at end
|
|
282
|
+
const needsNewline = content.endsWith("\n");
|
|
283
|
+
const newContent = content + (needsNewline ? "" : "\n") + section;
|
|
284
|
+
writeFileSync(path, newContent, "utf-8");
|
|
285
|
+
console.error(existed
|
|
286
|
+
? `Appended MCP server section to ${path}`
|
|
287
|
+
: `Created ${path} with MCP server section`);
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
// ─── CLI ────────────────────────────────────────────────────
|
|
291
|
+
function parseArgs() {
|
|
292
|
+
const args = process.argv.slice(2);
|
|
293
|
+
let agentsPath;
|
|
294
|
+
let noInject = false;
|
|
295
|
+
for (let i = 0; i < args.length; i++) {
|
|
296
|
+
const arg = args[i];
|
|
297
|
+
if (arg === "--agents-path" && i + 1 < args.length) {
|
|
298
|
+
agentsPath = args[++i];
|
|
299
|
+
}
|
|
300
|
+
else if (arg === "--no-inject") {
|
|
301
|
+
noInject = true;
|
|
302
|
+
}
|
|
303
|
+
else if (arg === "--help" || arg === "-h") {
|
|
304
|
+
console.log("Usage: npx codestrate [options]");
|
|
305
|
+
console.log("");
|
|
306
|
+
console.log("Options:");
|
|
307
|
+
console.log(" --agents-path <path> Path to AGENTS.md (default: ./AGENTS.md)");
|
|
308
|
+
console.log(" --no-inject Skip injecting into AGENTS.md");
|
|
309
|
+
console.log(" --help, -h Show this help");
|
|
310
|
+
process.exit(0);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return { agentsPath, noInject };
|
|
314
|
+
}
|
|
315
|
+
// ─── Instructions output ───────────────────────────────────
|
|
29
316
|
function separator() {
|
|
30
317
|
return "─".repeat(60);
|
|
31
318
|
}
|
|
32
319
|
function bold(text) {
|
|
33
320
|
return process.stdout.isTTY ? `\x1b[1m${text}\x1b[22m` : text;
|
|
34
321
|
}
|
|
35
|
-
// ─── Main ──────────────────────────────────────────────────
|
|
36
322
|
function printInstructions() {
|
|
323
|
+
const toolNames = TOOLS.map((t) => t.name);
|
|
37
324
|
console.log(`\n${separator()}`);
|
|
38
325
|
console.log(` ${bold(SERVER_NAME)} v${SERVER_VERSION}`);
|
|
39
326
|
console.log(`${separator()}\n`);
|
|
40
|
-
console.log("
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
327
|
+
console.log(" Bin aliases:\n");
|
|
328
|
+
console.log(" • codestrate → dist/index.js");
|
|
329
|
+
console.log(" • ci-mcp → dist/index.js");
|
|
330
|
+
console.log(" • ci-install → dist/install.js");
|
|
44
331
|
console.log(`\n${separator()}`);
|
|
45
|
-
console.log(` ${bold(
|
|
332
|
+
console.log(` ${bold(`Tools (${TOOLS.length})`)}`);
|
|
46
333
|
console.log(`${separator()}\n`);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
console.log(` • ${tool}`);
|
|
334
|
+
for (const t of TOOLS) {
|
|
335
|
+
console.log(` • ${t.name}`);
|
|
50
336
|
}
|
|
51
337
|
console.log(`\n${separator()}`);
|
|
52
|
-
console.log(` ${bold("
|
|
338
|
+
console.log(` ${bold("MCP Configuration — Claude Code")}`);
|
|
53
339
|
console.log(`${separator()}\n`);
|
|
54
|
-
console.log("
|
|
340
|
+
console.log(" Add to Claude Code MCP settings:\n");
|
|
55
341
|
console.log(' {\n'
|
|
56
342
|
+ ' "mcpServers": {\n'
|
|
57
343
|
+ ` "${SERVER_NAME}": {\n`
|
|
@@ -60,16 +346,24 @@ function printInstructions() {
|
|
|
60
346
|
+ ' }\n'
|
|
61
347
|
+ ' }\n'
|
|
62
348
|
+ ' }\n');
|
|
63
|
-
console.log("
|
|
64
|
-
console.log(
|
|
65
|
-
console.log(' args: ["<
|
|
349
|
+
console.log(" Or run locally:\n");
|
|
350
|
+
console.log(' command: node');
|
|
351
|
+
console.log(' args: ["<repo>/dist/index.js"]\n');
|
|
66
352
|
console.log(`${separator()}`);
|
|
67
|
-
console.log(` ${bold("
|
|
353
|
+
console.log(` ${bold("Quick Start")}`);
|
|
68
354
|
console.log(`${separator()}\n`);
|
|
69
|
-
console.log(" 1. Build:
|
|
70
|
-
console.log(" 2.
|
|
71
|
-
console.log(` 3.
|
|
355
|
+
console.log(" 1. Build: npm run build");
|
|
356
|
+
console.log(" 2. Run: npm start");
|
|
357
|
+
console.log(` 3. Test: ask Claude to use ${toolNames[0]}\n`);
|
|
72
358
|
console.log(`${separator()}\n`);
|
|
73
359
|
}
|
|
74
|
-
|
|
360
|
+
// ─── Main ──────────────────────────────────────────────────
|
|
361
|
+
function main() {
|
|
362
|
+
const { agentsPath, noInject } = parseArgs();
|
|
363
|
+
printInstructions();
|
|
364
|
+
if (!noInject) {
|
|
365
|
+
injectToAgentsMd(agentsPath);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
main();
|
|
75
369
|
//# sourceMappingURL=install.js.map
|
package/dist/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,KAAK,GAAG;IACZ,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,YAAY;CACb,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,wCAAwC;IACxC,wCAAwC;IACxC,oDAAoD;CACrD,CAAC;AAEF,8DAA8D;AAE9D,SAAS,SAAS;IAChB,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,IAAI,CAAC,IAAY;IAC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