@colbymchenry/codegraph 0.8.0 → 0.9.1
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/README.md +23 -7
- package/npm-shim.js +43 -0
- package/package.json +13 -51
- package/LICENSE +0 -21
- package/dist/bin/codegraph.d.ts +0 -21
- package/dist/bin/codegraph.d.ts.map +0 -1
- package/dist/bin/codegraph.js +0 -1257
- package/dist/bin/codegraph.js.map +0 -1
- package/dist/bin/node-version-check.d.ts +0 -20
- package/dist/bin/node-version-check.d.ts.map +0 -1
- package/dist/bin/node-version-check.js +0 -42
- package/dist/bin/node-version-check.js.map +0 -1
- package/dist/bin/uninstall.d.ts +0 -14
- package/dist/bin/uninstall.d.ts.map +0 -1
- package/dist/bin/uninstall.js +0 -36
- package/dist/bin/uninstall.js.map +0 -1
- package/dist/config.d.ts +0 -51
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -321
- package/dist/config.js.map +0 -1
- package/dist/context/formatter.d.ts +0 -30
- package/dist/context/formatter.d.ts.map +0 -1
- package/dist/context/formatter.js +0 -244
- package/dist/context/formatter.js.map +0 -1
- package/dist/context/index.d.ts +0 -97
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -1050
- package/dist/context/index.js.map +0 -1
- package/dist/db/index.d.ts +0 -72
- package/dist/db/index.d.ts.map +0 -1
- package/dist/db/index.js +0 -200
- package/dist/db/index.js.map +0 -1
- package/dist/db/migrations.d.ts +0 -44
- package/dist/db/migrations.d.ts.map +0 -1
- package/dist/db/migrations.js +0 -131
- package/dist/db/migrations.js.map +0 -1
- package/dist/db/queries.d.ts +0 -253
- package/dist/db/queries.d.ts.map +0 -1
- package/dist/db/queries.js +0 -1207
- package/dist/db/queries.js.map +0 -1
- package/dist/db/schema.sql +0 -151
- package/dist/db/sqlite-adapter.d.ts +0 -52
- package/dist/db/sqlite-adapter.d.ts.map +0 -1
- package/dist/db/sqlite-adapter.js +0 -237
- package/dist/db/sqlite-adapter.js.map +0 -1
- package/dist/directory.d.ts +0 -57
- package/dist/directory.d.ts.map +0 -1
- package/dist/directory.js +0 -264
- package/dist/directory.js.map +0 -1
- package/dist/errors.d.ts +0 -136
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -219
- package/dist/errors.js.map +0 -1
- package/dist/extraction/dfm-extractor.d.ts +0 -31
- package/dist/extraction/dfm-extractor.d.ts.map +0 -1
- package/dist/extraction/dfm-extractor.js +0 -151
- package/dist/extraction/dfm-extractor.js.map +0 -1
- package/dist/extraction/grammars.d.ts +0 -78
- package/dist/extraction/grammars.d.ts.map +0 -1
- package/dist/extraction/grammars.js +0 -322
- package/dist/extraction/grammars.js.map +0 -1
- package/dist/extraction/index.d.ts +0 -130
- package/dist/extraction/index.d.ts.map +0 -1
- package/dist/extraction/index.js +0 -1305
- package/dist/extraction/index.js.map +0 -1
- package/dist/extraction/languages/c-cpp.d.ts +0 -4
- package/dist/extraction/languages/c-cpp.d.ts.map +0 -1
- package/dist/extraction/languages/c-cpp.js +0 -126
- package/dist/extraction/languages/c-cpp.js.map +0 -1
- package/dist/extraction/languages/csharp.d.ts +0 -3
- package/dist/extraction/languages/csharp.d.ts.map +0 -1
- package/dist/extraction/languages/csharp.js +0 -72
- package/dist/extraction/languages/csharp.js.map +0 -1
- package/dist/extraction/languages/dart.d.ts +0 -3
- package/dist/extraction/languages/dart.d.ts.map +0 -1
- package/dist/extraction/languages/dart.js +0 -192
- package/dist/extraction/languages/dart.js.map +0 -1
- package/dist/extraction/languages/go.d.ts +0 -3
- package/dist/extraction/languages/go.d.ts.map +0 -1
- package/dist/extraction/languages/go.js +0 -58
- package/dist/extraction/languages/go.js.map +0 -1
- package/dist/extraction/languages/index.d.ts +0 -10
- package/dist/extraction/languages/index.d.ts.map +0 -1
- package/dist/extraction/languages/index.js +0 -45
- package/dist/extraction/languages/index.js.map +0 -1
- package/dist/extraction/languages/java.d.ts +0 -3
- package/dist/extraction/languages/java.d.ts.map +0 -1
- package/dist/extraction/languages/java.js +0 -64
- package/dist/extraction/languages/java.js.map +0 -1
- package/dist/extraction/languages/javascript.d.ts +0 -3
- package/dist/extraction/languages/javascript.d.ts.map +0 -1
- package/dist/extraction/languages/javascript.js +0 -90
- package/dist/extraction/languages/javascript.js.map +0 -1
- package/dist/extraction/languages/kotlin.d.ts +0 -3
- package/dist/extraction/languages/kotlin.d.ts.map +0 -1
- package/dist/extraction/languages/kotlin.js +0 -253
- package/dist/extraction/languages/kotlin.js.map +0 -1
- package/dist/extraction/languages/pascal.d.ts +0 -3
- package/dist/extraction/languages/pascal.d.ts.map +0 -1
- package/dist/extraction/languages/pascal.js +0 -66
- package/dist/extraction/languages/pascal.js.map +0 -1
- package/dist/extraction/languages/php.d.ts +0 -3
- package/dist/extraction/languages/php.d.ts.map +0 -1
- package/dist/extraction/languages/php.js +0 -107
- package/dist/extraction/languages/php.js.map +0 -1
- package/dist/extraction/languages/python.d.ts +0 -3
- package/dist/extraction/languages/python.d.ts.map +0 -1
- package/dist/extraction/languages/python.js +0 -56
- package/dist/extraction/languages/python.js.map +0 -1
- package/dist/extraction/languages/ruby.d.ts +0 -3
- package/dist/extraction/languages/ruby.d.ts.map +0 -1
- package/dist/extraction/languages/ruby.js +0 -114
- package/dist/extraction/languages/ruby.js.map +0 -1
- package/dist/extraction/languages/rust.d.ts +0 -3
- package/dist/extraction/languages/rust.d.ts.map +0 -1
- package/dist/extraction/languages/rust.js +0 -109
- package/dist/extraction/languages/rust.js.map +0 -1
- package/dist/extraction/languages/scala.d.ts +0 -3
- package/dist/extraction/languages/scala.d.ts.map +0 -1
- package/dist/extraction/languages/scala.js +0 -139
- package/dist/extraction/languages/scala.js.map +0 -1
- package/dist/extraction/languages/swift.d.ts +0 -3
- package/dist/extraction/languages/swift.d.ts.map +0 -1
- package/dist/extraction/languages/swift.js +0 -91
- package/dist/extraction/languages/swift.js.map +0 -1
- package/dist/extraction/languages/typescript.d.ts +0 -3
- package/dist/extraction/languages/typescript.d.ts.map +0 -1
- package/dist/extraction/languages/typescript.js +0 -129
- package/dist/extraction/languages/typescript.js.map +0 -1
- package/dist/extraction/liquid-extractor.d.ts +0 -52
- package/dist/extraction/liquid-extractor.d.ts.map +0 -1
- package/dist/extraction/liquid-extractor.js +0 -313
- package/dist/extraction/liquid-extractor.js.map +0 -1
- package/dist/extraction/parse-worker.d.ts +0 -8
- package/dist/extraction/parse-worker.d.ts.map +0 -1
- package/dist/extraction/parse-worker.js +0 -94
- package/dist/extraction/parse-worker.js.map +0 -1
- package/dist/extraction/svelte-extractor.d.ts +0 -56
- package/dist/extraction/svelte-extractor.d.ts.map +0 -1
- package/dist/extraction/svelte-extractor.js +0 -272
- package/dist/extraction/svelte-extractor.js.map +0 -1
- package/dist/extraction/tree-sitter-helpers.d.ts +0 -28
- package/dist/extraction/tree-sitter-helpers.d.ts.map +0 -1
- package/dist/extraction/tree-sitter-helpers.js +0 -103
- package/dist/extraction/tree-sitter-helpers.js.map +0 -1
- package/dist/extraction/tree-sitter-types.d.ts +0 -179
- package/dist/extraction/tree-sitter-types.d.ts.map +0 -1
- package/dist/extraction/tree-sitter-types.js +0 -10
- package/dist/extraction/tree-sitter-types.js.map +0 -1
- package/dist/extraction/tree-sitter.d.ts +0 -233
- package/dist/extraction/tree-sitter.d.ts.map +0 -1
- package/dist/extraction/tree-sitter.js +0 -2393
- package/dist/extraction/tree-sitter.js.map +0 -1
- package/dist/extraction/vue-extractor.d.ts +0 -36
- package/dist/extraction/vue-extractor.d.ts.map +0 -1
- package/dist/extraction/vue-extractor.js +0 -163
- package/dist/extraction/vue-extractor.js.map +0 -1
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/graph/index.d.ts +0 -8
- package/dist/graph/index.d.ts.map +0 -1
- package/dist/graph/index.js +0 -13
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/queries.d.ts +0 -106
- package/dist/graph/queries.d.ts.map +0 -1
- package/dist/graph/queries.js +0 -366
- package/dist/graph/queries.js.map +0 -1
- package/dist/graph/traversal.d.ts +0 -127
- package/dist/graph/traversal.d.ts.map +0 -1
- package/dist/graph/traversal.js +0 -493
- package/dist/graph/traversal.js.map +0 -1
- package/dist/index.d.ts +0 -447
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -825
- package/dist/index.js.map +0 -1
- package/dist/installer/claude-md-template.d.ts +0 -14
- package/dist/installer/claude-md-template.d.ts.map +0 -1
- package/dist/installer/claude-md-template.js +0 -21
- package/dist/installer/claude-md-template.js.map +0 -1
- package/dist/installer/config-writer.d.ts +0 -29
- package/dist/installer/config-writer.d.ts.map +0 -1
- package/dist/installer/config-writer.js +0 -111
- package/dist/installer/config-writer.js.map +0 -1
- package/dist/installer/index.d.ts +0 -65
- package/dist/installer/index.d.ts.map +0 -1
- package/dist/installer/index.js +0 -406
- package/dist/installer/index.js.map +0 -1
- package/dist/installer/instructions-template.d.ts +0 -28
- package/dist/installer/instructions-template.d.ts.map +0 -1
- package/dist/installer/instructions-template.js +0 -64
- package/dist/installer/instructions-template.js.map +0 -1
- package/dist/installer/targets/claude.d.ts +0 -31
- package/dist/installer/targets/claude.d.ts.map +0 -1
- package/dist/installer/targets/claude.js +0 -308
- package/dist/installer/targets/claude.js.map +0 -1
- package/dist/installer/targets/codex.d.ts +0 -18
- package/dist/installer/targets/codex.d.ts.map +0 -1
- package/dist/installer/targets/codex.js +0 -185
- package/dist/installer/targets/codex.js.map +0 -1
- package/dist/installer/targets/cursor.d.ts +0 -35
- package/dist/installer/targets/cursor.d.ts.map +0 -1
- package/dist/installer/targets/cursor.js +0 -229
- package/dist/installer/targets/cursor.js.map +0 -1
- package/dist/installer/targets/opencode.d.ts +0 -30
- package/dist/installer/targets/opencode.d.ts.map +0 -1
- package/dist/installer/targets/opencode.js +0 -235
- package/dist/installer/targets/opencode.js.map +0 -1
- package/dist/installer/targets/registry.d.ts +0 -35
- package/dist/installer/targets/registry.d.ts.map +0 -1
- package/dist/installer/targets/registry.js +0 -83
- package/dist/installer/targets/registry.js.map +0 -1
- package/dist/installer/targets/shared.d.ts +0 -77
- package/dist/installer/targets/shared.d.ts.map +0 -1
- package/dist/installer/targets/shared.js +0 -246
- package/dist/installer/targets/shared.js.map +0 -1
- package/dist/installer/targets/toml.d.ts +0 -52
- package/dist/installer/targets/toml.d.ts.map +0 -1
- package/dist/installer/targets/toml.js +0 -147
- package/dist/installer/targets/toml.js.map +0 -1
- package/dist/installer/targets/types.d.ts +0 -116
- package/dist/installer/targets/types.d.ts.map +0 -1
- package/dist/installer/targets/types.js +0 -16
- package/dist/installer/targets/types.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -94
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -453
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/server-instructions.d.ts +0 -19
- package/dist/mcp/server-instructions.d.ts.map +0 -1
- package/dist/mcp/server-instructions.js +0 -71
- package/dist/mcp/server-instructions.js.map +0 -1
- package/dist/mcp/tools.d.ts +0 -257
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js +0 -1633
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/transport.d.ts +0 -106
- package/dist/mcp/transport.d.ts.map +0 -1
- package/dist/mcp/transport.js +0 -233
- package/dist/mcp/transport.js.map +0 -1
- package/dist/resolution/frameworks/cargo-workspace.d.ts +0 -18
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +0 -1
- package/dist/resolution/frameworks/cargo-workspace.js +0 -225
- package/dist/resolution/frameworks/cargo-workspace.js.map +0 -1
- package/dist/resolution/frameworks/csharp.d.ts +0 -8
- package/dist/resolution/frameworks/csharp.d.ts.map +0 -1
- package/dist/resolution/frameworks/csharp.js +0 -213
- package/dist/resolution/frameworks/csharp.js.map +0 -1
- package/dist/resolution/frameworks/express.d.ts +0 -8
- package/dist/resolution/frameworks/express.d.ts.map +0 -1
- package/dist/resolution/frameworks/express.js +0 -225
- package/dist/resolution/frameworks/express.js.map +0 -1
- package/dist/resolution/frameworks/go.d.ts +0 -8
- package/dist/resolution/frameworks/go.d.ts.map +0 -1
- package/dist/resolution/frameworks/go.js +0 -158
- package/dist/resolution/frameworks/go.js.map +0 -1
- package/dist/resolution/frameworks/index.d.ts +0 -42
- package/dist/resolution/frameworks/index.d.ts.map +0 -1
- package/dist/resolution/frameworks/index.js +0 -133
- package/dist/resolution/frameworks/index.js.map +0 -1
- package/dist/resolution/frameworks/java.d.ts +0 -8
- package/dist/resolution/frameworks/java.d.ts.map +0 -1
- package/dist/resolution/frameworks/java.js +0 -177
- package/dist/resolution/frameworks/java.js.map +0 -1
- package/dist/resolution/frameworks/laravel.d.ts +0 -13
- package/dist/resolution/frameworks/laravel.d.ts.map +0 -1
- package/dist/resolution/frameworks/laravel.js +0 -248
- package/dist/resolution/frameworks/laravel.js.map +0 -1
- package/dist/resolution/frameworks/nestjs.d.ts +0 -26
- package/dist/resolution/frameworks/nestjs.d.ts.map +0 -1
- package/dist/resolution/frameworks/nestjs.js +0 -374
- package/dist/resolution/frameworks/nestjs.js.map +0 -1
- package/dist/resolution/frameworks/python.d.ts +0 -10
- package/dist/resolution/frameworks/python.d.ts.map +0 -1
- package/dist/resolution/frameworks/python.js +0 -278
- package/dist/resolution/frameworks/python.js.map +0 -1
- package/dist/resolution/frameworks/react.d.ts +0 -8
- package/dist/resolution/frameworks/react.d.ts.map +0 -1
- package/dist/resolution/frameworks/react.js +0 -272
- package/dist/resolution/frameworks/react.js.map +0 -1
- package/dist/resolution/frameworks/ruby.d.ts +0 -8
- package/dist/resolution/frameworks/ruby.d.ts.map +0 -1
- package/dist/resolution/frameworks/ruby.js +0 -198
- package/dist/resolution/frameworks/ruby.js.map +0 -1
- package/dist/resolution/frameworks/rust.d.ts +0 -8
- package/dist/resolution/frameworks/rust.d.ts.map +0 -1
- package/dist/resolution/frameworks/rust.js +0 -207
- package/dist/resolution/frameworks/rust.js.map +0 -1
- package/dist/resolution/frameworks/svelte.d.ts +0 -9
- package/dist/resolution/frameworks/svelte.d.ts.map +0 -1
- package/dist/resolution/frameworks/svelte.js +0 -249
- package/dist/resolution/frameworks/svelte.js.map +0 -1
- package/dist/resolution/frameworks/swift.d.ts +0 -10
- package/dist/resolution/frameworks/swift.d.ts.map +0 -1
- package/dist/resolution/frameworks/swift.js +0 -376
- package/dist/resolution/frameworks/swift.js.map +0 -1
- package/dist/resolution/frameworks/vue.d.ts +0 -9
- package/dist/resolution/frameworks/vue.d.ts.map +0 -1
- package/dist/resolution/frameworks/vue.js +0 -306
- package/dist/resolution/frameworks/vue.js.map +0 -1
- package/dist/resolution/import-resolver.d.ts +0 -40
- package/dist/resolution/import-resolver.d.ts.map +0 -1
- package/dist/resolution/import-resolver.js +0 -663
- package/dist/resolution/import-resolver.js.map +0 -1
- package/dist/resolution/index.d.ts +0 -106
- package/dist/resolution/index.d.ts.map +0 -1
- package/dist/resolution/index.js +0 -709
- package/dist/resolution/index.js.map +0 -1
- package/dist/resolution/name-matcher.d.ts +0 -32
- package/dist/resolution/name-matcher.d.ts.map +0 -1
- package/dist/resolution/name-matcher.js +0 -384
- package/dist/resolution/name-matcher.js.map +0 -1
- package/dist/resolution/path-aliases.d.ts +0 -68
- package/dist/resolution/path-aliases.d.ts.map +0 -1
- package/dist/resolution/path-aliases.js +0 -238
- package/dist/resolution/path-aliases.js.map +0 -1
- package/dist/resolution/strip-comments.d.ts +0 -27
- package/dist/resolution/strip-comments.d.ts.map +0 -1
- package/dist/resolution/strip-comments.js +0 -441
- package/dist/resolution/strip-comments.js.map +0 -1
- package/dist/resolution/types.d.ts +0 -172
- package/dist/resolution/types.d.ts.map +0 -1
- package/dist/resolution/types.js +0 -8
- package/dist/resolution/types.js.map +0 -1
- package/dist/search/query-parser.d.ts +0 -57
- package/dist/search/query-parser.d.ts.map +0 -1
- package/dist/search/query-parser.js +0 -177
- package/dist/search/query-parser.js.map +0 -1
- package/dist/search/query-utils.d.ts +0 -53
- package/dist/search/query-utils.d.ts.map +0 -1
- package/dist/search/query-utils.js +0 -350
- package/dist/search/query-utils.js.map +0 -1
- package/dist/sync/git-hooks.d.ts +0 -45
- package/dist/sync/git-hooks.d.ts.map +0 -1
- package/dist/sync/git-hooks.js +0 -223
- package/dist/sync/git-hooks.js.map +0 -1
- package/dist/sync/index.d.ts +0 -17
- package/dist/sync/index.d.ts.map +0 -1
- package/dist/sync/index.js +0 -28
- package/dist/sync/index.js.map +0 -1
- package/dist/sync/watch-policy.d.ts +0 -48
- package/dist/sync/watch-policy.d.ts.map +0 -1
- package/dist/sync/watch-policy.js +0 -124
- package/dist/sync/watch-policy.js.map +0 -1
- package/dist/sync/watcher.d.ts +0 -81
- package/dist/sync/watcher.d.ts.map +0 -1
- package/dist/sync/watcher.js +0 -194
- package/dist/sync/watcher.js.map +0 -1
- package/dist/types.d.ts +0 -423
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -256
- package/dist/types.js.map +0 -1
- package/dist/ui/glyphs.d.ts +0 -42
- package/dist/ui/glyphs.d.ts.map +0 -1
- package/dist/ui/glyphs.js +0 -78
- package/dist/ui/glyphs.js.map +0 -1
- package/dist/ui/shimmer-progress.d.ts +0 -11
- package/dist/ui/shimmer-progress.d.ts.map +0 -1
- package/dist/ui/shimmer-progress.js +0 -90
- package/dist/ui/shimmer-progress.js.map +0 -1
- package/dist/ui/shimmer-worker.d.ts +0 -2
- package/dist/ui/shimmer-worker.d.ts.map +0 -1
- package/dist/ui/shimmer-worker.js +0 -118
- package/dist/ui/shimmer-worker.js.map +0 -1
- package/dist/ui/types.d.ts +0 -17
- package/dist/ui/types.d.ts.map +0 -1
- package/dist/ui/types.js +0 -3
- package/dist/ui/types.js.map +0 -1
- package/dist/utils.d.ts +0 -205
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -549
- package/dist/utils.js.map +0 -1
- package/scripts/agent-eval/audit.sh +0 -68
- package/scripts/agent-eval/itrun.sh +0 -107
- package/scripts/agent-eval/parse-run.mjs +0 -45
- package/scripts/agent-eval/parse-session.mjs +0 -93
- package/scripts/agent-eval/run-agent.sh +0 -34
- package/scripts/agent-eval/run-all.sh +0 -67
- package/scripts/extract-release-notes.mjs +0 -130
- package/scripts/local-install.sh +0 -41
- package/scripts/patch-tree-sitter-dart.js +0 -112
- package/scripts/release.sh +0 -68
package/dist/installer/index.js
DELETED
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* CodeGraph Interactive Installer
|
|
4
|
-
*
|
|
5
|
-
* Multi-target: writes MCP server config + instructions for the
|
|
6
|
-
* agents the user picks (Claude Code, Cursor, Codex CLI, opencode).
|
|
7
|
-
* Defaults to the Claude-only behavior for backwards compatibility
|
|
8
|
-
* when no targets are explicitly chosen and nothing else is detected.
|
|
9
|
-
*
|
|
10
|
-
* Uses @clack/prompts for the interactive UI; `runInstallerWithOptions`
|
|
11
|
-
* is the non-interactive entry point used by the `--target` /
|
|
12
|
-
* `--print-config` CLI flags.
|
|
13
|
-
*/
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.hasClaudeMdSection = exports.hasPermissions = exports.hasMcpConfig = exports.writeClaudeMd = exports.writePermissions = exports.writeMcpConfig = void 0;
|
|
49
|
-
exports.runInstaller = runInstaller;
|
|
50
|
-
exports.runInstallerWithOptions = runInstallerWithOptions;
|
|
51
|
-
exports.wireProjectSurfacesForGlobalAgents = wireProjectSurfacesForGlobalAgents;
|
|
52
|
-
exports.offerWatchFallback = offerWatchFallback;
|
|
53
|
-
const child_process_1 = require("child_process");
|
|
54
|
-
const path = __importStar(require("path"));
|
|
55
|
-
const fs = __importStar(require("fs"));
|
|
56
|
-
const registry_1 = require("./targets/registry");
|
|
57
|
-
const glyphs_1 = require("../ui/glyphs");
|
|
58
|
-
// Import the lightweight submodules directly (not the ../sync barrel, which
|
|
59
|
-
// re-exports FileWatcher and would transitively pull in ../extraction — the
|
|
60
|
-
// installer must stay importable even when native modules can't load).
|
|
61
|
-
const watch_policy_1 = require("../sync/watch-policy");
|
|
62
|
-
const git_hooks_1 = require("../sync/git-hooks");
|
|
63
|
-
// Backwards-compat: keep these named exports — downstream code may
|
|
64
|
-
// import them. The shim in `config-writer.ts` continues to re-export
|
|
65
|
-
// them too.
|
|
66
|
-
var config_writer_1 = require("./config-writer");
|
|
67
|
-
Object.defineProperty(exports, "writeMcpConfig", { enumerable: true, get: function () { return config_writer_1.writeMcpConfig; } });
|
|
68
|
-
Object.defineProperty(exports, "writePermissions", { enumerable: true, get: function () { return config_writer_1.writePermissions; } });
|
|
69
|
-
Object.defineProperty(exports, "writeClaudeMd", { enumerable: true, get: function () { return config_writer_1.writeClaudeMd; } });
|
|
70
|
-
Object.defineProperty(exports, "hasMcpConfig", { enumerable: true, get: function () { return config_writer_1.hasMcpConfig; } });
|
|
71
|
-
Object.defineProperty(exports, "hasPermissions", { enumerable: true, get: function () { return config_writer_1.hasPermissions; } });
|
|
72
|
-
Object.defineProperty(exports, "hasClaudeMdSection", { enumerable: true, get: function () { return config_writer_1.hasClaudeMdSection; } });
|
|
73
|
-
// Dynamic import helper — tsc compiles import() to require() in CJS mode,
|
|
74
|
-
// which fails for ESM-only packages. This bypasses the transformation.
|
|
75
|
-
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
76
|
-
const importESM = new Function('specifier', 'return import(specifier)');
|
|
77
|
-
function formatNumber(n) {
|
|
78
|
-
return n.toLocaleString();
|
|
79
|
-
}
|
|
80
|
-
function getVersion() {
|
|
81
|
-
try {
|
|
82
|
-
const packageJsonPath = path.join(__dirname, '..', '..', 'package.json');
|
|
83
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
84
|
-
return packageJson.version;
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
return '0.0.0';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Interactive entry point — preserves the historical UX (`codegraph
|
|
92
|
-
* install` with no args goes through the prompts), but now starts
|
|
93
|
-
* the targets multi-select pre-populated with detected agents.
|
|
94
|
-
*/
|
|
95
|
-
async function runInstaller() {
|
|
96
|
-
return runInstallerWithOptions({});
|
|
97
|
-
}
|
|
98
|
-
async function runInstallerWithOptions(opts) {
|
|
99
|
-
const clack = await importESM('@clack/prompts');
|
|
100
|
-
clack.intro(`CodeGraph v${getVersion()}`);
|
|
101
|
-
// --yes implies all defaults; explicit flags still win.
|
|
102
|
-
const useDefaults = opts.yes === true;
|
|
103
|
-
// Step 1: which agent targets? Asked FIRST so the user knows what
|
|
104
|
-
// they're committing to before we touch npm or disk. Detection
|
|
105
|
-
// probes the user-provided location if known, else 'global' as the
|
|
106
|
-
// most common default — labels are a hint, not load-bearing.
|
|
107
|
-
const detectionLocation = opts.location ?? 'global';
|
|
108
|
-
const targets = await resolveTargets(clack, opts, detectionLocation, useDefaults);
|
|
109
|
-
if (targets.length === 0) {
|
|
110
|
-
clack.outro('No agent targets selected — nothing to do.');
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
// Step 2: install the codegraph npm package on PATH (always offered;
|
|
114
|
-
// matches existing behavior). Skipped when --yes (assume present).
|
|
115
|
-
if (!useDefaults) {
|
|
116
|
-
const shouldInstallGlobally = await clack.confirm({
|
|
117
|
-
message: 'Install the codegraph CLI on your PATH? (Required so agents can launch the MCP server)',
|
|
118
|
-
initialValue: true,
|
|
119
|
-
});
|
|
120
|
-
if (clack.isCancel(shouldInstallGlobally)) {
|
|
121
|
-
clack.cancel('Installation cancelled.');
|
|
122
|
-
process.exit(0);
|
|
123
|
-
}
|
|
124
|
-
if (shouldInstallGlobally) {
|
|
125
|
-
const s = clack.spinner();
|
|
126
|
-
s.start('Installing codegraph CLI...');
|
|
127
|
-
try {
|
|
128
|
-
(0, child_process_1.execSync)('npm install -g @colbymchenry/codegraph', { stdio: 'pipe' });
|
|
129
|
-
s.stop('Installed codegraph CLI on PATH');
|
|
130
|
-
}
|
|
131
|
-
catch {
|
|
132
|
-
s.stop('Could not install (permission denied)');
|
|
133
|
-
clack.log.warn('Try: sudo npm install -g @colbymchenry/codegraph');
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
clack.log.info('Skipped CLI install — agents will not be able to launch the MCP server without it');
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// Step 3: where the per-agent config files should land.
|
|
141
|
-
let location;
|
|
142
|
-
if (opts.location) {
|
|
143
|
-
location = opts.location;
|
|
144
|
-
}
|
|
145
|
-
else if (useDefaults) {
|
|
146
|
-
location = 'global';
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
// If every selected target is global-only (e.g. Codex), skip the
|
|
150
|
-
// prompt and force user-wide — project-local would just produce
|
|
151
|
-
// skip warnings.
|
|
152
|
-
const allGlobalOnly = targets.every((t) => !t.supportsLocation('local'));
|
|
153
|
-
if (allGlobalOnly) {
|
|
154
|
-
location = 'global';
|
|
155
|
-
clack.log.info('Writing user-wide configs (selected agents have no project-local config).');
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
const sel = await clack.select({
|
|
159
|
-
message: 'Apply agent configs to all your projects, or just this one?',
|
|
160
|
-
options: [
|
|
161
|
-
{ value: 'global', label: 'All projects', hint: '~/.claude, ~/.cursor, etc.' },
|
|
162
|
-
{ value: 'local', label: 'Just this project', hint: './.claude, ./.cursor, etc.' },
|
|
163
|
-
],
|
|
164
|
-
initialValue: 'global',
|
|
165
|
-
});
|
|
166
|
-
if (clack.isCancel(sel)) {
|
|
167
|
-
clack.cancel('Installation cancelled.');
|
|
168
|
-
process.exit(0);
|
|
169
|
-
}
|
|
170
|
-
location = sel;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
// Step 4: auto-allow permissions (only meaningful for Claude;
|
|
174
|
-
// skipped silently by other targets).
|
|
175
|
-
let autoAllow;
|
|
176
|
-
if (opts.autoAllow !== undefined) {
|
|
177
|
-
autoAllow = opts.autoAllow;
|
|
178
|
-
}
|
|
179
|
-
else if (useDefaults) {
|
|
180
|
-
autoAllow = true;
|
|
181
|
-
}
|
|
182
|
-
else if (targets.some((t) => t.id === 'claude')) {
|
|
183
|
-
const ans = await clack.confirm({
|
|
184
|
-
message: 'Auto-allow CodeGraph commands? (Skips permission prompts in Claude Code)',
|
|
185
|
-
initialValue: true,
|
|
186
|
-
});
|
|
187
|
-
if (clack.isCancel(ans)) {
|
|
188
|
-
clack.cancel('Installation cancelled.');
|
|
189
|
-
process.exit(0);
|
|
190
|
-
}
|
|
191
|
-
autoAllow = ans;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
autoAllow = false;
|
|
195
|
-
}
|
|
196
|
-
// Step 5: per-target install loop.
|
|
197
|
-
for (const target of targets) {
|
|
198
|
-
if (!target.supportsLocation(location)) {
|
|
199
|
-
clack.log.warn(`${target.displayName}: skipped — does not support --location=${location}.`);
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
const result = target.install(location, { autoAllow });
|
|
203
|
-
for (const file of result.files) {
|
|
204
|
-
const verb = file.action === 'unchanged'
|
|
205
|
-
? 'Unchanged'
|
|
206
|
-
: file.action === 'created' ? 'Created' : 'Updated';
|
|
207
|
-
clack.log.success(`${target.displayName}: ${verb} ${tildify(file.path)}`);
|
|
208
|
-
}
|
|
209
|
-
for (const note of result.notes ?? []) {
|
|
210
|
-
clack.log.info(`${target.displayName}: ${note}`);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
// Step 6: for local install, initialize the project.
|
|
214
|
-
if (location === 'local') {
|
|
215
|
-
await initializeLocalProject(clack, useDefaults);
|
|
216
|
-
}
|
|
217
|
-
if (location === 'global') {
|
|
218
|
-
clack.note('cd your-project\ncodegraph init -i', 'Quick start');
|
|
219
|
-
}
|
|
220
|
-
const finalNote = targets.length > 0
|
|
221
|
-
? `Done! Restart your agent${targets.length > 1 ? 's' : ''} to use CodeGraph.`
|
|
222
|
-
: 'Done!';
|
|
223
|
-
clack.outro(finalNote);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* For every target that has a global config and exposes
|
|
227
|
-
* `wireProjectSurfaces`, write its project-local surfaces (e.g.
|
|
228
|
-
* Cursor's `.cursor/rules/codegraph.mdc`). Idempotent — runs
|
|
229
|
-
* silently when there's nothing to write.
|
|
230
|
-
*
|
|
231
|
-
* Called by `codegraph init` so that a user who ran
|
|
232
|
-
* `codegraph install` once globally doesn't have to re-run it per
|
|
233
|
-
* project to get full agent support.
|
|
234
|
-
*
|
|
235
|
-
* Returns the list of `(target, file)` pairs that were created or
|
|
236
|
-
* updated — caller decides how to surface them.
|
|
237
|
-
*/
|
|
238
|
-
function wireProjectSurfacesForGlobalAgents() {
|
|
239
|
-
const written = [];
|
|
240
|
-
for (const target of registry_1.ALL_TARGETS) {
|
|
241
|
-
if (typeof target.wireProjectSurfaces !== 'function')
|
|
242
|
-
continue;
|
|
243
|
-
const detection = target.detect('global');
|
|
244
|
-
if (!detection.alreadyConfigured)
|
|
245
|
-
continue;
|
|
246
|
-
const result = target.wireProjectSurfaces();
|
|
247
|
-
for (const file of result.files) {
|
|
248
|
-
if (file.action === 'created' || file.action === 'updated') {
|
|
249
|
-
written.push({ target, file });
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
return written;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Replace home-directory prefix in a path with `~/` for cleaner log
|
|
257
|
-
* lines. Pure cosmetic.
|
|
258
|
-
*/
|
|
259
|
-
function tildify(p) {
|
|
260
|
-
const home = require('os').homedir();
|
|
261
|
-
if (p.startsWith(home + path.sep))
|
|
262
|
-
return '~' + p.substring(home.length);
|
|
263
|
-
return p;
|
|
264
|
-
}
|
|
265
|
-
async function resolveTargets(clack, opts, location, useDefaults) {
|
|
266
|
-
// Explicit --target flag wins.
|
|
267
|
-
if (opts.target !== undefined) {
|
|
268
|
-
return (0, registry_1.resolveTargetFlag)(opts.target, location);
|
|
269
|
-
}
|
|
270
|
-
// --yes implies auto-detect.
|
|
271
|
-
if (useDefaults) {
|
|
272
|
-
return (0, registry_1.resolveTargetFlag)('auto', location);
|
|
273
|
-
}
|
|
274
|
-
// Interactive multi-select.
|
|
275
|
-
const detected = (0, registry_1.detectAll)(location);
|
|
276
|
-
const initialValues = detected
|
|
277
|
-
.filter(({ detection }) => detection.installed)
|
|
278
|
-
.map(({ target }) => target.id);
|
|
279
|
-
// If nothing detected, default to Claude alone (matches the
|
|
280
|
-
// historical default and the smallest-surprise outcome).
|
|
281
|
-
const initial = initialValues.length > 0 ? initialValues : ['claude'];
|
|
282
|
-
const choice = await clack.multiselect({
|
|
283
|
-
message: 'Which agents should CodeGraph configure?',
|
|
284
|
-
options: registry_1.ALL_TARGETS.map((t) => {
|
|
285
|
-
const det = detected.find(({ target }) => target.id === t.id).detection;
|
|
286
|
-
const flag = det.installed ? '(detected)' : '(not found)';
|
|
287
|
-
const globalOnly = !t.supportsLocation('local') ? ' — global only' : '';
|
|
288
|
-
return {
|
|
289
|
-
value: t.id,
|
|
290
|
-
label: `${t.displayName} ${flag}${globalOnly}`,
|
|
291
|
-
};
|
|
292
|
-
}),
|
|
293
|
-
initialValues: initial,
|
|
294
|
-
required: false,
|
|
295
|
-
});
|
|
296
|
-
if (clack.isCancel(choice)) {
|
|
297
|
-
clack.cancel('Installation cancelled.');
|
|
298
|
-
process.exit(0);
|
|
299
|
-
}
|
|
300
|
-
return choice
|
|
301
|
-
.map((id) => (0, registry_1.getTarget)(id))
|
|
302
|
-
.filter((t) => t !== undefined);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Initialize CodeGraph in the current project (for local installs), then
|
|
306
|
-
* offer the watch fallback when the live watcher won't run here (see
|
|
307
|
-
* offerWatchFallback). Agent-agnostic by nature.
|
|
308
|
-
*/
|
|
309
|
-
async function initializeLocalProject(clack, useDefaults = false) {
|
|
310
|
-
const projectPath = process.cwd();
|
|
311
|
-
let CodeGraph;
|
|
312
|
-
try {
|
|
313
|
-
CodeGraph = (await Promise.resolve().then(() => __importStar(require('../index')))).default;
|
|
314
|
-
}
|
|
315
|
-
catch (err) {
|
|
316
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
317
|
-
clack.log.error(`Could not load native modules: ${msg}`);
|
|
318
|
-
clack.log.info('Skipping project initialization. Run "codegraph init -i" later.');
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
// Check if already initialized
|
|
322
|
-
if (CodeGraph.isInitialized(projectPath)) {
|
|
323
|
-
clack.log.info('CodeGraph already initialized in this project');
|
|
324
|
-
await offerWatchFallback(clack, projectPath, { yes: useDefaults });
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
// Initialize
|
|
328
|
-
const cg = await CodeGraph.init(projectPath);
|
|
329
|
-
clack.log.success('Created .codegraph/ directory');
|
|
330
|
-
// Index the project with shimmer progress (worker thread for smooth animation)
|
|
331
|
-
const { createShimmerProgress } = await Promise.resolve().then(() => __importStar(require('../ui/shimmer-progress')));
|
|
332
|
-
process.stdout.write(`\x1b[2m${(0, glyphs_1.getGlyphs)().rail}\x1b[0m\n`);
|
|
333
|
-
const progress = createShimmerProgress();
|
|
334
|
-
const result = await cg.indexAll({
|
|
335
|
-
onProgress: progress.onProgress,
|
|
336
|
-
});
|
|
337
|
-
await progress.stop();
|
|
338
|
-
if (result.filesErrored > 0) {
|
|
339
|
-
clack.log.success(`Indexed ${formatNumber(result.filesIndexed)} files (${formatNumber(result.filesErrored)} failed, ${formatNumber(result.nodesCreated)} symbols)`);
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
clack.log.success(`Indexed ${formatNumber(result.filesIndexed)} files (${formatNumber(result.nodesCreated)} symbols)`);
|
|
343
|
-
}
|
|
344
|
-
cg.close();
|
|
345
|
-
await offerWatchFallback(clack, projectPath, { yes: useDefaults });
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* When the live file watcher will be disabled for this project (e.g. WSL2
|
|
349
|
-
* /mnt drives, or CODEGRAPH_NO_WATCH), the index would silently go stale.
|
|
350
|
-
* Explain that, and offer to keep it fresh automatically via git hooks
|
|
351
|
-
* (commit / pull / checkout) instead of manual `codegraph sync`.
|
|
352
|
-
*
|
|
353
|
-
* No-op on environments where the watcher runs normally, so it's safe to
|
|
354
|
-
* call unconditionally after init.
|
|
355
|
-
*/
|
|
356
|
-
async function offerWatchFallback(clack, projectPath, opts = {}) {
|
|
357
|
-
const reason = (0, watch_policy_1.watchDisabledReason)(projectPath);
|
|
358
|
-
if (!reason)
|
|
359
|
-
return; // Watcher runs normally — nothing to set up.
|
|
360
|
-
clack.log.warn(`Live file watching is disabled here — ${reason}.`);
|
|
361
|
-
clack.log.info('Until you re-sync, the CodeGraph index stays frozen — it will not pick up edits on its own.');
|
|
362
|
-
// No git repo → the commit-hook path doesn't apply; point at manual sync.
|
|
363
|
-
if (!(0, git_hooks_1.isGitRepo)(projectPath)) {
|
|
364
|
-
clack.log.info('Run `codegraph sync` after changing files to refresh the index.');
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
// Already wired up on a previous run — confirm and move on without nagging.
|
|
368
|
-
if ((0, git_hooks_1.isSyncHookInstalled)(projectPath)) {
|
|
369
|
-
clack.log.info('Git sync hooks are already installed — the index refreshes after commit / pull / checkout.');
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
let choice;
|
|
373
|
-
if (opts.yes) {
|
|
374
|
-
choice = 'hook';
|
|
375
|
-
}
|
|
376
|
-
else {
|
|
377
|
-
const sel = await clack.select({
|
|
378
|
-
message: 'How should CodeGraph keep its index fresh?',
|
|
379
|
-
options: [
|
|
380
|
-
{ value: 'hook', label: 'Sync on git commit / pull / checkout', hint: 'installs git hooks (recommended)' },
|
|
381
|
-
{ value: 'manual', label: 'I\'ll run `codegraph sync` myself', hint: 'fully manual' },
|
|
382
|
-
],
|
|
383
|
-
initialValue: 'hook',
|
|
384
|
-
});
|
|
385
|
-
if (clack.isCancel(sel)) {
|
|
386
|
-
clack.log.info('Skipped — run `codegraph sync` after changes to refresh the index.');
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
choice = sel;
|
|
390
|
-
}
|
|
391
|
-
if (choice === 'manual') {
|
|
392
|
-
clack.log.info('Run `codegraph sync` after changing files to refresh the index.');
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
const result = (0, git_hooks_1.installGitSyncHook)(projectPath);
|
|
396
|
-
if (result.installed.length > 0) {
|
|
397
|
-
clack.log.success(`Installed git ${result.installed.join(', ')} hook${result.installed.length > 1 ? 's' : ''} — ` +
|
|
398
|
-
'the index refreshes in the background after each.');
|
|
399
|
-
clack.log.info('Run `codegraph sync` anytime to refresh immediately.');
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
clack.log.warn(`Could not install git hooks${result.skipped ? ` (${result.skipped})` : ''}. ` +
|
|
403
|
-
'Run `codegraph sync` after changes instead.');
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEH,oCAEC;AAED,0DAkIC;AAeD,gFAiBC;AA6HD,gDA4DC;AApaD,iDAAyC;AACzC,2CAA6B;AAC7B,uCAAyB;AACzB,iDAK4B;AAE5B,yCAAyC;AACzC,4EAA4E;AAC5E,4EAA4E;AAC5E,uEAAuE;AACvE,uDAA2D;AAC3D,iDAAuF;AAEvF,mEAAmE;AACnE,qEAAqE;AACrE,YAAY;AACZ,iDAOyB;AANvB,+GAAA,cAAc,OAAA;AACd,iHAAA,gBAAgB,OAAA;AAChB,8GAAA,aAAa,OAAA;AACb,6GAAA,YAAY,OAAA;AACZ,+GAAA,cAAc,OAAA;AACd,mHAAA,kBAAkB,OAAA;AAIpB,0EAA0E;AAC1E,uEAAuE;AACvE,8DAA8D;AAC9D,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CACL,CAAC;AAElE,SAA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AAkC,EAAE;gBACnH,EAAE,KAAK,EAAE,QAAiB,EAAE,KAAK,EAAE,mCAAmC,EAAE,IAAI,EAAE,cAAc,EAAE;aAC/F;YACD,YAAY,EAAE,MAAe;SAC9B,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;YACrF,OAAO;QACT,CAAC;QACD,MAAM,GAAG,GAAG,CAAC;IACf,CAAC;IAED,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;QAClF,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,8BAAkB,EAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,KAAK,CAAC,GAAG,CAAC,OAAO,CACf,iBAAiB,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK;YAC/F,mDAAmD,CACpD,CAAC;QACF,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,GAAG,CAAC,IAAI,CACZ,8BAA8B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI;YAC9E,6CAA6C,CAC9C,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent-instructions template — the markdown body each agent target
|
|
3
|
-
* writes into its conventional instructions file (CLAUDE.md /
|
|
4
|
-
* AGENTS.md / codegraph.mdc / etc.).
|
|
5
|
-
*
|
|
6
|
-
* The body content is identical across agents because the codegraph
|
|
7
|
-
* usage advice is agent-agnostic — only the destination filename and
|
|
8
|
-
* any optional frontmatter (Cursor `.mdc`) varies per target.
|
|
9
|
-
*
|
|
10
|
-
* The legacy `claude-md-template.ts` re-exports these names for
|
|
11
|
-
* backwards compatibility with downstream importers.
|
|
12
|
-
*/
|
|
13
|
-
/** Markers used by the marker-based section replacement. */
|
|
14
|
-
export declare const CODEGRAPH_SECTION_START = "<!-- CODEGRAPH_START -->";
|
|
15
|
-
export declare const CODEGRAPH_SECTION_END = "<!-- CODEGRAPH_END -->";
|
|
16
|
-
/**
|
|
17
|
-
* The full marker-delimited block written into each agent's
|
|
18
|
-
* instructions file. Includes the start/end markers so the section
|
|
19
|
-
* can be detected and replaced on re-install.
|
|
20
|
-
*/
|
|
21
|
-
export declare const INSTRUCTIONS_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture / trace questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
|
|
22
|
-
/**
|
|
23
|
-
* Backwards-compat alias. Existing downstream code may import
|
|
24
|
-
* `CLAUDE_MD_TEMPLATE` from this module via the re-export shim in
|
|
25
|
-
* `claude-md-template.ts`.
|
|
26
|
-
*/
|
|
27
|
-
export declare const CLAUDE_MD_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture / trace questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
|
|
28
|
-
//# sourceMappingURL=instructions-template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instructions-template.d.ts","sourceRoot":"","sources":["../../src/installer/instructions-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,mpFAiCT,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,mpFAAwB,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Agent-instructions template — the markdown body each agent target
|
|
4
|
-
* writes into its conventional instructions file (CLAUDE.md /
|
|
5
|
-
* AGENTS.md / codegraph.mdc / etc.).
|
|
6
|
-
*
|
|
7
|
-
* The body content is identical across agents because the codegraph
|
|
8
|
-
* usage advice is agent-agnostic — only the destination filename and
|
|
9
|
-
* any optional frontmatter (Cursor `.mdc`) varies per target.
|
|
10
|
-
*
|
|
11
|
-
* The legacy `claude-md-template.ts` re-exports these names for
|
|
12
|
-
* backwards compatibility with downstream importers.
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CLAUDE_MD_TEMPLATE = exports.INSTRUCTIONS_TEMPLATE = exports.CODEGRAPH_SECTION_END = exports.CODEGRAPH_SECTION_START = void 0;
|
|
16
|
-
/** Markers used by the marker-based section replacement. */
|
|
17
|
-
exports.CODEGRAPH_SECTION_START = '<!-- CODEGRAPH_START -->';
|
|
18
|
-
exports.CODEGRAPH_SECTION_END = '<!-- CODEGRAPH_END -->';
|
|
19
|
-
/**
|
|
20
|
-
* The full marker-delimited block written into each agent's
|
|
21
|
-
* instructions file. Includes the start/end markers so the section
|
|
22
|
-
* can be detected and replaced on re-install.
|
|
23
|
-
*/
|
|
24
|
-
exports.INSTRUCTIONS_TEMPLATE = `${exports.CODEGRAPH_SECTION_START}
|
|
25
|
-
## CodeGraph
|
|
26
|
-
|
|
27
|
-
This project has a CodeGraph MCP server (\`codegraph_*\` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.
|
|
28
|
-
|
|
29
|
-
### When to prefer codegraph over native search
|
|
30
|
-
|
|
31
|
-
Use codegraph for **structural** questions — what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.
|
|
32
|
-
|
|
33
|
-
| Question | Tool |
|
|
34
|
-
|---|---|
|
|
35
|
-
| "Where is X defined?" / "Find symbol named X" | \`codegraph_search\` |
|
|
36
|
-
| "What calls function Y?" | \`codegraph_callers\` |
|
|
37
|
-
| "What does Y call?" | \`codegraph_callees\` |
|
|
38
|
-
| "What would break if I changed Z?" | \`codegraph_impact\` |
|
|
39
|
-
| "Show me Y's signature / source / docstring" | \`codegraph_node\` |
|
|
40
|
-
| "Give me focused context for a task/area" | \`codegraph_context\` |
|
|
41
|
-
| "See several related symbols' source at once" | \`codegraph_explore\` |
|
|
42
|
-
| "What files exist under path/" | \`codegraph_files\` |
|
|
43
|
-
| "Is the index healthy?" | \`codegraph_status\` |
|
|
44
|
-
|
|
45
|
-
### Rules of thumb
|
|
46
|
-
|
|
47
|
-
- **Answer directly — don't delegate exploration.** For "how does X work" / architecture / trace questions, answer with 2-3 codegraph calls: \`codegraph_context\` first, then ONE \`codegraph_explore\` for the source of the symbols it surfaces. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent — or running a grep + read loop — repeats work codegraph already did and costs more for the same answer.
|
|
48
|
-
- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep — that's slower, less accurate, and wastes context.
|
|
49
|
-
- **Don't grep first** when looking up a symbol by name. \`codegraph_search\` is faster and returns kind + location + signature in one call.
|
|
50
|
-
- **Don't chain \`codegraph_search\` + \`codegraph_node\`** when you just want context — \`codegraph_context\` is one call.
|
|
51
|
-
- **Don't loop \`codegraph_node\` over many symbols** — one \`codegraph_explore\` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.
|
|
52
|
-
- **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.
|
|
53
|
-
|
|
54
|
-
### If \`.codegraph/\` doesn't exist
|
|
55
|
-
|
|
56
|
-
The MCP server returns "not initialized." Ask the user: *"I notice this project doesn't have CodeGraph initialized. Want me to run \`codegraph init -i\` to build the index?"*
|
|
57
|
-
${exports.CODEGRAPH_SECTION_END}`;
|
|
58
|
-
/**
|
|
59
|
-
* Backwards-compat alias. Existing downstream code may import
|
|
60
|
-
* `CLAUDE_MD_TEMPLATE` from this module via the re-export shim in
|
|
61
|
-
* `claude-md-template.ts`.
|
|
62
|
-
*/
|
|
63
|
-
exports.CLAUDE_MD_TEMPLATE = exports.INSTRUCTIONS_TEMPLATE;
|
|
64
|
-
//# sourceMappingURL=instructions-template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instructions-template.js","sourceRoot":"","sources":["../../src/installer/instructions-template.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,4DAA4D;AAC/C,QAAA,uBAAuB,GAAG,0BAA0B,CAAC;AACrD,QAAA,qBAAqB,GAAG,wBAAwB,CAAC;AAE9D;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,GAAG,+BAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiC7D,6BAAqB,EAAE,CAAC;AAE1B;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,6BAAqB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code target. Writes:
|
|
3
|
-
*
|
|
4
|
-
* - MCP server entry to `~/.claude.json` (global = user scope, loads
|
|
5
|
-
* in every project) or `./.mcp.json` (local = project scope, the
|
|
6
|
-
* file Claude Code actually reads for a single project). See the
|
|
7
|
-
* scope table at https://code.claude.com/docs/en/mcp.
|
|
8
|
-
* - Permissions to `~/.claude/settings.json` (global) or
|
|
9
|
-
* `./.claude/settings.json` (local), gated on `autoAllow`.
|
|
10
|
-
* - Instructions to `~/.claude/CLAUDE.md` (global) or
|
|
11
|
-
* `./.claude/CLAUDE.md` (local).
|
|
12
|
-
*
|
|
13
|
-
* Earlier versions wrote the local MCP entry to `./.claude.json` — a
|
|
14
|
-
* file Claude Code never reads — so the server silently never loaded
|
|
15
|
-
* until the user manually renamed it to `.mcp.json` (issue #207). We
|
|
16
|
-
* now write `./.mcp.json` and migrate any stale `./.claude.json` entry
|
|
17
|
-
* out of the way on install and uninstall.
|
|
18
|
-
*/
|
|
19
|
-
import { AgentTarget, Location, WriteResult } from './types';
|
|
20
|
-
/**
|
|
21
|
-
* Per-file write helpers, exported so the legacy `config-writer.ts`
|
|
22
|
-
* shim can call only the named operation (writeMcpConfig writes ONLY
|
|
23
|
-
* the MCP entry, etc.) instead of `claudeTarget.install()` which
|
|
24
|
-
* writes all three files. Without this split the shims silently
|
|
25
|
-
* cause side effects callers don't expect.
|
|
26
|
-
*/
|
|
27
|
-
export declare function writeMcpEntry(loc: Location): WriteResult['files'][number];
|
|
28
|
-
export declare function writePermissionsEntry(loc: Location): WriteResult['files'][number];
|
|
29
|
-
export declare function writeInstructionsEntry(loc: Location): WriteResult['files'][number];
|
|
30
|
-
export declare const claudeTarget: AgentTarget;
|
|
31
|
-
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EACL,WAAW,EAGX,QAAQ,EACR,WAAW,EACZ,MAAM,SAAS,CAAC;AAiKjB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAsBzE;AAyBD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAoBjF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CA0ClF;AAED,eAAO,MAAM,YAAY,EAAE,WAAoC,CAAC"}
|