githits 0.6.5 → 0.6.7

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.
@@ -1 +1 @@
1
- import{clearAutoLoginAuthSessionMetadata,createAuthCommandDependencies,createAuthStatusDependencies,createContainer,loadAutoLoginAuthSessionMetadata,recordAuthFingerprint}from"./chunk-29jz9bxq.js";import"./chunk-vef9cbqz.js";export{recordAuthFingerprint,loadAutoLoginAuthSessionMetadata,createContainer,createAuthStatusDependencies,createAuthCommandDependencies,clearAutoLoginAuthSessionMetadata};
1
+ import{clearAutoLoginAuthSessionMetadata,createAuthCommandDependencies,createAuthStatusDependencies,createContainer,loadAutoLoginAuthSessionMetadata,recordAuthFingerprint}from"./chunk-4cnb4nss.js";import"./chunk-xr5k540v.js";export{recordAuthFingerprint,loadAutoLoginAuthSessionMetadata,createContainer,createAuthStatusDependencies,createAuthCommandDependencies,clearAutoLoginAuthSessionMetadata};
@@ -1,2 +1,2 @@
1
- import{createRequire}from"node:module";var __require=createRequire(import.meta.url);var description="The code context layer for AI coding agents";var version="0.6.5";
1
+ import{createRequire}from"node:module";var __require=createRequire(import.meta.url);var description="The code context layer for AI coding agents";var version="0.6.7";
2
2
  export{__require,description,version};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githits",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "The code context layer for AI coding agents",
5
5
  "mcpServers": {
6
6
  "githits": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "githits",
3
3
  "description": "The code context layer for AI coding agents",
4
- "version": "0.6.5",
4
+ "version": "0.6.7",
5
5
  "mcpName": "com.githits/githits",
6
6
  "type": "module",
7
7
  "workspaces": [
@@ -104,12 +104,12 @@
104
104
  "zod": "^4.4.3"
105
105
  },
106
106
  "devDependencies": {
107
- "@biomejs/biome": "2.5.2",
107
+ "@biomejs/biome": "2.5.5",
108
108
  "@types/bun": "latest",
109
109
  "@types/semver": "^7.7.1",
110
110
  "bunup": "^0.16.32",
111
111
  "husky": "^9.1.7",
112
- "lint-staged": "17.0.8",
113
- "typescript": "^6.0.3"
112
+ "lint-staged": "17.2.0",
113
+ "typescript": "^7.0.2"
114
114
  }
115
115
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githits",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "The code context layer for AI coding agents",
5
5
  "author": {
6
6
  "name": "GitHits"
@@ -56,15 +56,42 @@ Run detection inline, not in a background terminal. Wait for JSON before continu
56
56
 
57
57
  Do not offer tools with `unsupported_project_config` for project-level setup.
58
58
 
59
- 3. If `installableIds` is non-empty, use structured choices for tool selection. Do not ask the user to type comma-separated tool IDs unless no structured choice UI is available.
59
+ Use `actionableIds` when present. If it is absent because the installed CLI predates guidance-aware detection, use `installableIds` for MCP setup and do not infer guidance-only repair from missing fields.
60
60
 
61
- Present `Configure all detected tools (Recommended)` as the first option, then list individual tools for selective setup. Do not present "configure none" as a normal onboarding choice.
61
+ Before showing the review, classify the detection result:
62
+
63
+ - If every agent is `not_detected`, explain that no supported coding tool was found and stop before review, installation, or authentication. Tell the user to install or open a supported tool, then rerun detection.
64
+ - In project scope, if no agent is `needs_setup` or `already_configured` and at least one is `unsupported_project_config`, explain that project-level setup is unavailable, offer user-level detection, and stop the project flow before review or authentication.
65
+ - If supported agents are mixed with `unsupported_project_config`, explain the unsupported tools but continue only with supported agents.
66
+ - If no effective actionable IDs remain but at least one supported agent is `already_configured`, continue to the review, skip installation after acknowledgment, and then check authentication.
67
+
68
+ Follow the CLI JSON `instructions` remediation for these states rather than replacing it with generic authentication guidance.
69
+
70
+ 3. When setup can proceed, show the install review before asking for tool approval or starting browser authentication, including the already-configured supported-tool case.
71
+
72
+ Tell the user:
73
+
74
+ - GitHits queries and public package, repository, and documentation targets are sent to GitHits services for processing.
75
+ - Feedback submission is an outbound write that sends feedback data to GitHits services.
76
+ - Installing GitHits does not itself upload the local workspace.
77
+ - After installation, open a new coding-agent session so it loads MCP configuration and any supporting instructions. The terminal and machine do not need to be restarted.
78
+
79
+ Ask the user to acknowledge this review before continuing.
80
+ If the user does not acknowledge it, stop onboarding without installing or starting authentication.
81
+
82
+ 4. Use `actionableIds` for tools needing MCP setup or requested guidance repair. If `actionableIds` is non-empty, use structured choices for tool selection. Do not ask the user to type comma-separated tool IDs unless no structured choice UI is available.
83
+
84
+ Present `Configure all actionable tools (Recommended)` as the first option, then list individual actionable tools for selective setup. After configure-all approval, execute `suggestedCommand` exactly so scope and guidance intent are preserved. Do not present "configure none" as a normal onboarding choice.
62
85
 
63
86
  Ask before writing configuration: `I recommend configuring all detected tools so GitHits works wherever you use an agent. Proceed with all, or choose specific tools?`
64
87
 
65
88
  Do not run `init -y` or `init --yes` unless the user explicitly asks to configure every detected tool.
66
89
 
67
- 4. Install only approved IDs using the selected scope.
90
+ For selective setup, build the matching scoped `--install-agents` command and preserve `--no-guidance` when `guidanceRequested` is `false`. Follow the CLI-emitted verification instruction instead of constructing a separate detect command.
91
+
92
+ If no effective actionable IDs remain and at least one supported tool is already configured, skip installation and continue to authentication only after the user acknowledges the install review.
93
+
94
+ 5. Install only approved IDs using the selected scope.
68
95
 
69
96
  Guidance is installed by default. It adds the `githits-mcp` skill and a short instruction pointer for tools with verified guidance paths. Add `--no-guidance` only when the user explicitly asks for plain MCP without supporting instructions.
70
97
 
@@ -80,7 +107,11 @@ User-level install:
80
107
  npx -y githits@latest init --install-agents <comma-separated-approved-ids> --json
81
108
  ```
82
109
 
83
- 5. Start GitHits sign-in/signup as part of onboarding. Do not ask whether the user wants to log in; login creates or connects the GitHits account.
110
+ Cursor is configured with the remote MCP at `https://mcp.githits.com`. A legacy local `npx ... githits ... mcp start` Cursor entry should be migrated by the install command.
111
+
112
+ 6. Start GitHits sign-in/signup as part of onboarding. Do not ask whether the user wants to log in; login creates or connects the GitHits account.
113
+
114
+ Local `githits auth status` and `githits login` apply to CLI/stdio integrations, not Cursor's remote MCP OAuth. If Cursor is the only approved tool, skip local CLI login. For mixed installs, use local login for non-Cursor tools but keep Cursor authentication state separate.
84
115
 
85
116
  Check whether login can be skipped because auth is already active:
86
117
 
@@ -104,7 +135,7 @@ npx -y githits@latest login --no-browser
104
135
 
105
136
  With `--no-browser`, surface the printed sign-in URL clearly so the user can open it in a browser. If command output is hidden from the user, relay the URL verbatim. Do not ask them to paste secrets or OAuth codes back into chat.
106
137
 
107
- 6. Verify with the selected scope.
138
+ 7. Verify with the selected scope.
108
139
 
109
140
  Project-level verification:
110
141
 
@@ -120,4 +151,6 @@ npx -y githits@latest auth status
120
151
  npx -y githits@latest init --detect-agents --json
121
152
  ```
122
153
 
123
- Report configured tools, auth state, failures, and whether the user should open a new Claude Code session so MCP config changes load.
154
+ Report configured tools, auth state, failures, and whether the user should open a new Claude Code session so MCP configuration and any supporting instructions load. The terminal and machine do not need to be restarted.
155
+
156
+ For Cursor, init detection verifies only the remote URL. It cannot verify Cursor-managed OAuth or tool discovery. If `cursor-agent` is available, run `cursor-agent mcp list` and `cursor-agent mcp list-tools GitHits`; if authentication is required, run `cursor-agent mcp login GitHits`, let the user complete browser OAuth, and rerun the checks. Always require a new Cursor Agent chat after installation and confirm in Cursor's MCP tools UI that GitHits is enabled and its tools are listed. Do not report Cursor ready from local CLI auth or init detection alone.
package/server.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "source": "github",
17
17
  "id": "1165453165"
18
18
  },
19
- "version": "0.6.5",
19
+ "version": "0.6.7",
20
20
  "remotes": [
21
21
  {
22
22
  "type": "streamable-http",
@@ -28,7 +28,7 @@
28
28
  "registryType": "npm",
29
29
  "registryBaseUrl": "https://registry.npmjs.org",
30
30
  "identifier": "githits",
31
- "version": "0.6.5",
31
+ "version": "0.6.7",
32
32
  "runtimeHint": "npx",
33
33
  "transport": {
34
34
  "type": "stdio"
@@ -24,7 +24,7 @@ Use GitHits for evidence from real open-source code instead of guessing from mod
24
24
  - Exact language name uncertain for `example --lang`: run `githits languages <query>` first.
25
25
  - Inspecting a known dependency or GitHub repo: start with `githits search` scoped by `--in`.
26
26
  - Need file/path enumeration: use `githits code files`; do not probe directories with `code read`.
27
- - Know the exact text or regex to match: use `githits code grep`; use `githits search` for discovery.
27
+ - Know the exact text to match: use `githits code grep` (literal by default). Pass `--regex` for RE2 syntax; lookaround and backreferences are unsupported. Use `githits search` for discovery.
28
28
  - Need documentation pages: use `githits search "<topic>" --source docs --in <target>` for topic search, or `githits docs list <spec>` to browse available pages.
29
29
 
30
30
  ## Core Commands
@@ -34,15 +34,15 @@ githits example "how to use express middleware"
34
34
  githits example "react hooks patterns" --lang typescript
35
35
  githits languages type
36
36
 
37
- githits search "router middleware" --in npm:express
38
- githits search "debounce" --in npm:lodash --source symbol
37
+ githits search "router middleware" --in npm:express@5.2.1
38
+ githits search "debounce" --in npm:lodash@4.18.1 --source symbol
39
39
  githits search '"body parser" OR multer' --in npm:express --source docs --json
40
40
  githits search-status <searchRef>
41
41
 
42
- githits code files npm:express lib/ --ext js --limit 100
43
- githits code read npm:express lib/express.js --lines 1-90
44
- githits code grep npm:express "process_params" lib/ -C 3
45
- githits code grep --repo-url https://github.com/expressjs/express --git-ref HEAD "Router" lib/
42
+ githits code files npm:express@5.2.1 lib/ --ext js --limit 100
43
+ githits code read npm:express@5.2.1 lib/express.js --lines 1-90
44
+ githits code grep npm:express@5.2.1 "require('router')" lib/ -C 3
45
+ githits code grep --repo-url https://github.com/expressjs/express --git-ref v5.2.1 "require('router')" lib/
46
46
 
47
47
  githits docs list npm:express --limit 20
48
48
  githits docs read <pageId> --lines 20-120
@@ -52,9 +52,12 @@ githits docs read <pageId> --lines 20-120
52
52
 
53
53
  - For behavioral claims, prefer source, symbols, tests, and call sites over docs prose.
54
54
  - For `githits example` results, report the source repositories/citations shown in GitHits' generated references/provenance section; they are core evidence for the synthesized pattern.
55
+ - Package targets inspect published artifacts and omitted versions resolve to the latest release; repository targets inspect repository trees. For source-layout questions, always pin and report the package version or Git ref.
55
56
  - For source work, locate symbols or matches first, then read a focused window with explicit `--lines`.
57
+ - Documentation text reads return at most 150 lines per call. Continue with the reported returned range and `totalLines` when more context is needed.
56
58
  - For multi-step code/docs investigations, keep raw CLI output out of the final answer unless it is the evidence the user needs.
57
59
  - If output says it used recent/stale indexed evidence, treat the displayed served target as provenance; if freshness matters, retry with a longer `--wait` or use one of the displayed `queryable now` versions/refs, or inspect JSON `targetResolution` for structured candidates.
60
+ - Treat partial documentation coverage as incomplete evidence and retry later when advised. Capped coverage is terminal for the current crawl, so report the limitation instead of retrying.
58
61
  - If a code-navigation command returns `INDEXING`, use the elapsed/expected duration in the message to decide whether to retry with `--wait`; prefer any displayed indexed refs/versions when you need an immediate follow-up.
59
62
  - After using GitHits results, send feedback when practical. Use `githits feedback <solution_id> --accept|--reject` for `githits example` results, or omit `<solution_id>` for generic session feedback such as `githits feedback --reject --tool search -m "missing kotlin support"`.
60
63
 
@@ -32,10 +32,12 @@ Use `search` for discovery and `code grep` only when you know the pattern.
32
32
 
33
33
  `githits docs list <spec>` browses available documentation pages. It is not topic search.
34
34
 
35
- `githits docs read <pageId>` reads a page. Use `--lines` for bounded windows and `--json` when extracting `totalLines` or source metadata.
35
+ `githits docs read <pageId>` reads a page. Text output returns at most 150 lines per call, including larger explicit ranges; continue from the reported returned range when more context is needed. Use `--lines` for bounded windows and `--json` when extracting `totalLines` or source metadata.
36
36
 
37
37
  For topic search, use `githits search "<topic>" --source docs --in <target>`, then pass the returned page ID to `docs read`.
38
38
 
39
+ When search reports partial documentation coverage, treat the evidence as incomplete and retry later when advised. Capped coverage means the current crawl stopped at a limit; report that limitation instead of retrying.
40
+
39
41
  ## Command Name Mapping
40
42
 
41
43
  - `githits example` maps to MCP `get_example`.
@@ -65,20 +65,43 @@ npx -y githits@latest init --detect-agents --json
65
65
 
66
66
  Run detection inline, not in a background terminal. Wait for JSON before continuing.
67
67
 
68
- Use the JSON fields to summarize detected tools. `agents[].status` can be `needs_setup`, `already_configured`, `unsupported_project_config`, or `not_detected`. `installableIds` lists detected tools that need setup for the selected scope.
68
+ Use the JSON fields to summarize detected tools. `agents[].status` describes MCP state and can be `needs_setup`, `already_configured`, `unsupported_project_config`, or `not_detected`. `agents[].guidanceStatus` describes supporting guidance. `installableIds` remains MCP-only; use `actionableIds` for tools needing either MCP setup or requested guidance repair.
69
+
70
+ If `actionableIds` is absent because the installed CLI predates guidance-aware detection, use `installableIds` for MCP setup and do not infer guidance-only repair from missing fields.
69
71
 
70
72
  For project-level setup, do not offer tools with `unsupported_project_config`. Explain only if needed: those detected tools do not have verified project-level MCP support.
71
73
 
72
- 3. Recommend the simplest tool setup choice with structured options.
74
+ Before showing the review, classify the detection result:
75
+
76
+ - If every agent is `not_detected`, explain that no supported coding tool was found and stop before review, installation, or authentication. Tell the user to install or open a supported tool, then rerun detection.
77
+ - In project scope, if no agent is `needs_setup` or `already_configured` and at least one is `unsupported_project_config`, explain that project-level setup is unavailable, offer user-level detection, and stop the project flow before review or authentication.
78
+ - If supported agents are mixed with `unsupported_project_config`, explain the unsupported tools but continue only with supported agents.
79
+ - If no effective actionable IDs remain but at least one supported agent is `already_configured`, continue to the review, skip installation after acknowledgment, and then check authentication.
80
+
81
+ Follow the CLI JSON `instructions` remediation for these states rather than replacing it with generic authentication guidance.
82
+
83
+ 3. When setup can proceed, show the install review before asking for tool approval or starting browser authentication, including the already-configured supported-tool case.
84
+
85
+ Tell the user:
73
86
 
74
- If `installableIds` is non-empty, use structured choices when available. Do not ask the user to type comma-separated tool IDs unless the current agent interface has no structured choice mechanism.
87
+ - GitHits queries and public package, repository, and documentation targets are sent to GitHits services for processing.
88
+ - Feedback submission is an outbound write that sends feedback data to GitHits services.
89
+ - Installing GitHits does not itself upload the local workspace.
90
+ - After installation, open a new coding-agent session so it loads MCP configuration and any supporting instructions. The terminal and machine do not need to be restarted.
91
+
92
+ Ask the user to acknowledge this review before continuing.
93
+ If the user does not acknowledge it, stop onboarding without installing or starting authentication.
94
+
95
+ 4. Recommend the simplest actionable setup choice with structured options.
96
+
97
+ If `actionableIds` is non-empty, use structured choices when available. Do not ask the user to type comma-separated tool IDs unless the current agent interface has no structured choice mechanism. Explain whether each ID needs MCP setup, guidance repair, or both.
75
98
 
76
99
  Ask: `Which tools should I configure?`
77
100
 
78
101
  Options:
79
102
 
80
- - `Configure all detected tools (Recommended)` — the recommended default option; use all `installableIds`.
81
- - One selective setup option per installable detected tool, using the tool display name and ID.
103
+ - `Configure all actionable tools (Recommended)` — the recommended default option; after approval execute `suggestedCommand` exactly so scope and guidance intent are preserved.
104
+ - One selective setup option per actionable tool, using the tool display name and ID.
82
105
 
83
106
  Do not present "configure none" as a normal onboarding choice; if the user does not want any tool configured, pause and clarify whether they want to stop onboarding.
84
107
 
@@ -86,7 +109,11 @@ Ask before writing configuration. A good prompt is: `I recommend configuring all
86
109
 
87
110
  Only install user-approved IDs. Do not run `init -y` or `init --yes` unless the user explicitly asks to configure every detected tool.
88
111
 
89
- 4. Install GitHits MCP and supporting guidance for approved tools using the selected scope.
112
+ For selective setup, build the matching scoped `--install-agents` command and preserve `--no-guidance` when `guidanceRequested` is `false`. Follow the CLI-emitted verification instruction instead of constructing a separate detect command.
113
+
114
+ If no effective actionable IDs remain and at least one supported tool is already configured, skip installation and continue to authentication only after the user acknowledges the install review.
115
+
116
+ 5. Install GitHits MCP and supporting guidance for approved tools using the selected scope.
90
117
 
91
118
  Guidance is installed by default. It adds the `githits-mcp` skill and a short instruction pointer for tools with verified guidance paths. Add `--no-guidance` only when the user explicitly asks for plain MCP without supporting instructions.
92
119
 
@@ -104,10 +131,14 @@ npx -y githits@latest init --install-agents <comma-separated-approved-ids> --jso
104
131
 
105
132
  Treat `success` and `already_configured` outcomes as usable. Report any `failed` outcome with the tool name and message. For project-level setup, remind the user that project-local MCP files may be committed.
106
133
 
107
- 5. Start GitHits sign-in/signup during onboarding.
134
+ Cursor is configured with the remote MCP at `https://mcp.githits.com`, not a local stdio command. An existing Cursor entry that runs `npx ... githits ... mcp start` is legacy and should become `needs_setup`; installing it migrates the entry to the remote URL.
135
+
136
+ 6. Start GitHits sign-in/signup during onboarding.
108
137
 
109
138
  Do not ask whether the user wants to log in. Login creates or connects the GitHits account, so it is part of onboarding. Ask before launching browser OAuth, then run login unless `auth status` already shows an active session.
110
139
 
140
+ This CLI authentication step applies to local GitHits CLI/stdio integrations. Cursor remote MCP authentication is managed separately by Cursor. If Cursor is the only approved tool, skip local CLI login and continue to the Cursor verification below. For a mixed install, use this CLI login step for the non-Cursor tools, but do not treat it as evidence that Cursor is authenticated.
141
+
111
142
  Check auth state:
112
143
 
113
144
  ```bash
@@ -134,7 +165,7 @@ npx -y githits@latest login --no-browser
134
165
 
135
166
  With `--no-browser`, surface the printed sign-in URL clearly so the user can open it in a browser. If command output is hidden from the user, relay the URL verbatim. Do not ask them to paste passwords, tokens, cookies, or OAuth codes back into chat.
136
167
 
137
- 6. Verify setup after login and installation.
168
+ 7. Verify setup after login and installation.
138
169
 
139
170
  Project-level verification:
140
171
 
@@ -150,14 +181,27 @@ npx -y githits@latest auth status
150
181
  npx -y githits@latest init --detect-agents --json
151
182
  ```
152
183
 
153
- Confirm auth is active and selected tools are `already_configured` for the selected scope. If MCP configuration changed, tell the user to open a new agent session in the project or user environment so the tool reloads its MCP config.
184
+ Confirm auth is active and selected tools are `already_configured` for the selected scope. If MCP configuration or supporting guidance changed, tell the user to open a new coding-agent session in the project or user environment so the tool reloads its MCP configuration and any supporting instructions. The terminal and machine do not need to be restarted.
185
+
186
+ For Cursor, `already_configured` verifies only that the remote URL is present. It does not verify Cursor-managed OAuth or tool discovery. Do not report Cursor as ready based on `githits auth status` or init detection alone.
187
+
188
+ If `cursor-agent` is available, verify Cursor directly:
189
+
190
+ ```bash
191
+ cursor-agent mcp list
192
+ cursor-agent mcp list-tools GitHits
193
+ ```
194
+
195
+ If Cursor reports that authentication is required, run `cursor-agent mcp login GitHits`, let the user complete browser OAuth, then rerun both verification commands. Do not ask the user to paste OAuth data into chat.
196
+
197
+ Whether or not `cursor-agent` is available, tell the user to open a new Cursor Agent chat after installation. In the Cursor MCP tools UI, confirm that GitHits is enabled, complete its OAuth prompt if shown, and confirm that GitHits tools are listed. If the CLI checks cannot run, require the user's confirmation from that new chat before reporting Cursor ready.
154
198
 
155
199
  ## Completion Response
156
200
 
157
201
  Report:
158
202
 
159
203
  - Which tools were configured or already configured.
160
- - Whether GitHits auth is active, requires browser approval, or could not be verified.
204
+ - Whether local GitHits CLI auth and Cursor-managed OAuth are active, require browser approval, or could not be verified, keeping those states separate.
161
205
  - Whether the user needs to restart/open a new agent session.
162
206
  - Any failed tool setup with the exact tool name and error message.
163
207