githits 0.21.0 → 0.22.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.plugin/plugin.json +1 -1
- package/dist/cli.js +60 -51
- package/dist/index.js +1 -1
- package/dist/shared/{chunk-kcv6v8zb.js → chunk-737pd53s.js} +17 -5
- package/dist/shared/{chunk-cwnsxr14.js → chunk-qjdh687v.js} +1 -1
- package/dist/shared/{chunk-8nseper4.js → chunk-zged479w.js} +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/server.json +2 -2
- package/skills/githits-code/SKILL.md +9 -6
- package/skills/githits-code/references/code-and-docs.md +8 -6
- package/skills/githits-mcp/SKILL.md +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadAutoLoginAuthSessionMetadata2,clearAutoLoginAuthSessionMetadata2,createAuthCommandDependencies2,createLogoutCommandDependencies2,createAuthStatusDependencies2,createContainer2}from"./chunk-
|
|
1
|
+
import{loadAutoLoginAuthSessionMetadata2,clearAutoLoginAuthSessionMetadata2,createAuthCommandDependencies2,createLogoutCommandDependencies2,createAuthStatusDependencies2,createContainer2}from"./chunk-737pd53s.js";export{clearAutoLoginAuthSessionMetadata2 as clearAutoLoginAuthSessionMetadata,createAuthCommandDependencies2 as createAuthCommandDependencies,createAuthStatusDependencies2 as createAuthStatusDependencies,createContainer2 as createContainer,createLogoutCommandDependencies2 as createLogoutCommandDependencies,loadAutoLoginAuthSessionMetadata2 as loadAutoLoginAuthSessionMetadata};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var description="The code context layer for AI coding agents";var version2="0.
|
|
1
|
+
var description="The code context layer for AI coding agents";var version2="0.22.1";
|
|
2
2
|
export{description,version2};
|
package/gemini-extension.json
CHANGED
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.
|
|
4
|
+
"version": "0.22.1",
|
|
5
5
|
"mcpName": "com.githits/githits",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"workspaces": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"githits": "dist/cli.js"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "bunup && bun -e \"import { chmodSync } from 'node:fs'; chmodSync('dist/cli.js', 0o755);\"",
|
|
43
|
+
"build": "bun -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\" && bunup --no-clean && bun -e \"import { chmodSync } from 'node:fs'; chmodSync('dist/cli.js', 0o755);\"",
|
|
44
44
|
"dev": "bun run ./src/cli.ts",
|
|
45
45
|
"inspector": "npx @modelcontextprotocol/inspector bun run dev mcp",
|
|
46
46
|
"smoke:cli": "bun run scripts/cli-smoke.ts",
|
package/plugin.json
CHANGED
package/server.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"source": "github",
|
|
17
17
|
"id": "1165453165"
|
|
18
18
|
},
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.22.1",
|
|
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.
|
|
31
|
+
"version": "0.22.1",
|
|
32
32
|
"runtimeHint": "npx",
|
|
33
33
|
"transport": {
|
|
34
34
|
"type": "stdio"
|
|
@@ -25,9 +25,9 @@ Use GitHits for evidence from real open-source code instead of guessing from mod
|
|
|
25
25
|
- Need package metadata, vulnerability/advisory status, dependency graphs, or release notes: stop and use the `githits-package` skill instead.
|
|
26
26
|
- Inspecting a known dependency or public repository: start with `githits search` scoped by `--in`.
|
|
27
27
|
- Searching an exact standalone documentation site: use `githits search "<topic>" --source docs --in site:<host[/path]>`. If the result reports suggested site targets, retry one explicitly; suggestions are advisory targets, not aliases.
|
|
28
|
-
- Need file/path enumeration: use `githits code files`; do not probe directories with `
|
|
28
|
+
- Need file/path enumeration: use `githits code files`; do not probe directories with `githits read`.
|
|
29
29
|
- 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.
|
|
30
|
-
- Need documentation pages: use `githits search "<topic>" --source docs --in <target>` for topic search, or `githits docs list <spec>` to browse available pages.
|
|
30
|
+
- Need documentation pages: use `githits search "<topic>" --source docs --in <target>` for topic search, or `githits docs list <spec>` to browse available pages. Read returned targets with `githits read`.
|
|
31
31
|
|
|
32
32
|
## Core Commands
|
|
33
33
|
|
|
@@ -42,20 +42,23 @@ githits search "middleware" --in site:expressjs.com --source docs
|
|
|
42
42
|
githits search-status <searchRef>
|
|
43
43
|
|
|
44
44
|
githits code files npm:express@5.2.1 lib/ --ext js --limit 100
|
|
45
|
-
githits
|
|
45
|
+
githits read npm:express@5.2.1 lib/express.js --lines 1-90
|
|
46
|
+
githits read 'npm:express@5.2.1#Router'
|
|
47
|
+
githits read npm:express@5.2.1 --selector Router
|
|
46
48
|
githits code grep npm:express@5.2.1 "require('router')" lib/ -C 3
|
|
47
49
|
githits code grep --repo-url https://github.com/expressjs/express --git-ref v5.2.1 "require('router')" lib/
|
|
48
50
|
|
|
49
51
|
githits docs list npm:express --limit 20
|
|
50
|
-
githits
|
|
52
|
+
githits read <docsReadTarget>
|
|
53
|
+
githits read <docsReadTarget> --selector <heading-id>
|
|
51
54
|
```
|
|
52
55
|
|
|
53
56
|
## Strategy
|
|
54
57
|
|
|
55
58
|
- For behavioral claims, prefer source, symbols, tests, and call sites over docs prose.
|
|
56
59
|
- 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.
|
|
57
|
-
- For source work, locate symbols or matches first, then read a focused window with explicit `--lines`.
|
|
58
|
-
- For docs reads, use the search snippet when sufficient; otherwise run its generated `followUp`. From text, pass the displayed `[docs page]` target unchanged; from `docs list`, pass `docsReadTarget`. Hosted/crawled HTTP(S) targets address mutable current content, so automatic follow-ups forward the exact URL or fragment without search bounds. A fragment returns its heading and full subtree through the next equal-or-higher heading. Repository docs remain snapshot-addressed and keep returned ranges. Add `--lines` only when intentionally selecting a current page range; either bound replaces
|
|
60
|
+
- For source work, locate symbols or matches first, then read a focused window with explicit `--lines`. Use `target#symbol` or `--selector <name>` when the exact indexed symbol is known; add an exact path to narrow ambiguous symbols. The backend decides whether a repository fragment identifies a code symbol or a documentation heading.
|
|
61
|
+
- For docs reads, use the search snippet when sufficient; otherwise run its generated `followUp`. From text, pass the displayed `[docs page]` target unchanged; from `docs list`, pass `docsReadTarget`. Hosted/crawled HTTP(S) targets address mutable current content, so automatic follow-ups forward the exact URL or fragment without search bounds. A fragment returns its heading and full subtree through the next equal-or-higher heading. Use `--selector <heading-id>` for a known logical heading ID without a URL fragment. Repository docs remain snapshot-addressed and keep returned ranges. Add `--lines` only when intentionally selecting a current page range; either bound replaces heading selection. Historical `pageId` works. Use `--json` only for required range/source metadata.
|
|
59
62
|
- For multi-step code/docs investigations, keep raw CLI output out of the final answer unless it is the evidence the user needs.
|
|
60
63
|
- Reuse returned targets, paths, locators, references, and ranges; never invent them. Cite the served target and report stale/provisional evidence, truncation, and coverage limits.
|
|
61
64
|
- Partial and capped documentation coverage are usable published evidence. Report the disclosed limit, but infer neither indexing progress nor retryability from coverage; follow only `searchRef` and the evidence notice.
|
|
@@ -27,15 +27,15 @@ If a missing or ambiguous site returns suggested site targets, retry one of thos
|
|
|
27
27
|
|
|
28
28
|
## Code Files
|
|
29
29
|
|
|
30
|
-
`githits code files <spec> [path-prefix]` lists paths. Use this before `
|
|
30
|
+
`githits code files <spec> [path-prefix]` lists paths. Use this before `githits read` when you do not know the exact file path.
|
|
31
31
|
|
|
32
32
|
Useful filters: `--path`, repeatable `--glob`, repeatable `--ext`, repeatable `--file-type`, repeatable `--language`, repeatable `--file-intent`, repeatable `--exclude-intent`, `--exclude-docs`, `--exclude-tests`, `--hidden`, `--limit`, `--wait`, `--verbose`, `--json`.
|
|
33
33
|
|
|
34
34
|
## Code Read
|
|
35
35
|
|
|
36
|
-
`githits
|
|
36
|
+
`githits read <target> <path>` reads one exact target-relative file. Use `--lines 10-80`, `--start`, or `--end` for focused windows. You can also append a range to the path: `src/index.js:10-80`. `githits code read` remains a compatibility alias.
|
|
37
37
|
|
|
38
|
-
For repository addressing
|
|
38
|
+
`githits read '<target>#<symbol>'` or `githits read <target> --selector <name>` reads a known indexed code symbol; add an exact `<path>` to narrow resolution to one file. The backend decides whether a repository fragment identifies a code symbol or a documentation heading. Ambiguous, missing, or unsupported snapshots return recovery guidance. For repository addressing, prefer a compact repository target; `githits read --repo-url <url> [--git-ref <ref>] <path>` remains a compatibility path.
|
|
39
39
|
|
|
40
40
|
## Code Grep
|
|
41
41
|
|
|
@@ -48,7 +48,7 @@ When grep returns no matches, do not repeat it unchanged. Change or shorten the
|
|
|
48
48
|
|
|
49
49
|
`githits docs list <spec>` browses available documentation pages. It is not topic search.
|
|
50
50
|
|
|
51
|
-
For `githits
|
|
51
|
+
For `githits read <target>`, use the search snippet when sufficient; otherwise run its generated `followUp`. From text, pass the displayed `[docs page]` target unchanged; from `docs list`, pass `docsReadTarget`. Hosted/crawled HTTP(S) targets address mutable current content, so automatic follow-ups forward the exact URL or fragment without search bounds. A fragment returns its heading and full subtree through the next equal-or-higher heading. Use `--selector <heading-id>` for a known logical heading ID without a URL fragment. Repository docs remain snapshot-addressed and keep returned ranges. Add `--lines` only when intentionally selecting a current page range; either bound replaces heading selection. Historical `pageId` values remain supported. `githits docs read` remains a compatibility alias. Use `--json` only for required range/source metadata.
|
|
52
52
|
|
|
53
53
|
For topic search, use `githits search "<topic>" --source docs --in <target>`, then run its generated follow-up or pass the displayed text target.
|
|
54
54
|
|
|
@@ -61,9 +61,11 @@ Partial and capped documentation coverage are usable published evidence. Report
|
|
|
61
61
|
- `githits search-status` maps to MCP `search_status`.
|
|
62
62
|
- `githits code files` maps to MCP `code_files`.
|
|
63
63
|
- `githits code grep` maps to MCP `code_grep`.
|
|
64
|
-
- `githits
|
|
64
|
+
- `githits read <target> <path>` maps to MCP `read` with `target` and `path`.
|
|
65
|
+
- `githits read <target> --selector <name>` maps to MCP `read` with `target` and `selector`, optionally with `path` for code.
|
|
66
|
+
- `githits read '<target>#<symbol>'` maps to MCP `read` with the fragment in `target`, optionally with `path` for code.
|
|
65
67
|
- `githits docs list` maps to MCP `docs_list`.
|
|
66
|
-
- `githits docs
|
|
68
|
+
- `githits read <docs-target>` maps to MCP `read` with `target` alone.
|
|
67
69
|
|
|
68
70
|
Direct repository targets accept approved full HTTPS URLs on github.com, codeberg.org, and gitlab.com. Codeberg requires exactly owner/repo; GitLab allows nested namespaces. Only GitHub supports host shorthand and HTTP compatibility. Never infer a provider from bare owner/repo. Repository refs use an @ suffix and may themselves contain / and @; # is reserved for semantic fragments. Empty refs and mixed suffixes are invalid. Credentials, queries, provider web subpaths, and unsupported/self-hosted hosts are rejected. Package targets keep registry-native coordinates, including `zig:cb/owner/repo` and `swift:gitlab.com/group/project`. Changelog repo URL fields remain full HTTPS URLs.
|
|
69
71
|
|
|
@@ -21,7 +21,7 @@ This guide owns shared policy; selected tools own call syntax and exceptions.
|
|
|
21
21
|
| Find a known literal or regex in a public repository/package | `code_grep` |
|
|
22
22
|
| Find relevant source, symbols, tests, or documentation for a topic | `search` |
|
|
23
23
|
| List paths or browse a source directory | `code_files` |
|
|
24
|
-
| Read a source file,
|
|
24
|
+
| Read a source file, code symbol, or documentation section | `read` |
|
|
25
25
|
| Browse package documentation pages | `docs_list` |
|
|
26
26
|
| Assess a package's license, adoption, maintenance, or overall health | `pkg_info` |
|
|
27
27
|
| Inspect vulnerabilities in a package or version | `pkg_vulns` |
|
|
@@ -56,6 +56,12 @@ Repository docs are snapshot-addressed and keep returned ranges. Add explicit
|
|
|
56
56
|
For source, locate paths or matches, then read focused lines; never probe
|
|
57
57
|
directories with `read`. Prefer source, symbols, tests, and call sites for
|
|
58
58
|
behavioral claims.
|
|
59
|
+
When the exact indexed code symbol or docs heading ID is known, pass it as
|
|
60
|
+
`selector` to `read`; an optional exact `path` narrows code symbol lookup.
|
|
61
|
+
Use compact package and repository `target#symbol` for code symbol reads;
|
|
62
|
+
keep the fragment in `target` unchanged and use an exact `path` to narrow it.
|
|
63
|
+
Pass HTTP(S) fragments and emitted repository docs page IDs unchanged.
|
|
64
|
+
The unified read result determines whether the target resolved to code or docs.
|
|
59
65
|
|
|
60
66
|
Omit `wait_timeout_ms` for the default; `0` returns without waiting.
|
|
61
67
|
Follow rendered continuation/recovery actions, not repeated calls to poll.
|