githits 0.20.0 → 0.22.0

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{loadAutoLoginAuthSessionMetadata2,clearAutoLoginAuthSessionMetadata2,createAuthCommandDependencies2,createLogoutCommandDependencies2,createAuthStatusDependencies2,createContainer2}from"./chunk-rwag53sb.js";export{clearAutoLoginAuthSessionMetadata2 as clearAutoLoginAuthSessionMetadata,createAuthCommandDependencies2 as createAuthCommandDependencies,createAuthStatusDependencies2 as createAuthStatusDependencies,createContainer2 as createContainer,createLogoutCommandDependencies2 as createLogoutCommandDependencies,loadAutoLoginAuthSessionMetadata2 as loadAutoLoginAuthSessionMetadata};
1
+ import{loadAutoLoginAuthSessionMetadata2,clearAutoLoginAuthSessionMetadata2,createAuthCommandDependencies2,createLogoutCommandDependencies2,createAuthStatusDependencies2,createContainer2}from"./chunk-n1jz8phj.js";export{clearAutoLoginAuthSessionMetadata2 as clearAutoLoginAuthSessionMetadata,createAuthCommandDependencies2 as createAuthCommandDependencies,createAuthStatusDependencies2 as createAuthStatusDependencies,createContainer2 as createContainer,createLogoutCommandDependencies2 as createLogoutCommandDependencies,loadAutoLoginAuthSessionMetadata2 as loadAutoLoginAuthSessionMetadata};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githits",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
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.20.0",
4
+ "version": "0.22.0",
5
5
  "mcpName": "com.githits/githits",
6
6
  "type": "module",
7
7
  "workspaces": [
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "githits",
4
- "version": "0.20.0",
4
+ "version": "0.22.0",
5
5
  "description": "The code context layer for AI coding agents",
6
6
  "author": {
7
7
  "name": "GitHits"
package/server.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "source": "github",
17
17
  "id": "1165453165"
18
18
  },
19
- "version": "0.20.0",
19
+ "version": "0.22.0",
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.20.0",
31
+ "version": "0.22.0",
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 `code read`.
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,22 @@ 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 code read npm:express@5.2.1 lib/express.js --lines 1-90
45
+ githits read npm:express@5.2.1 lib/express.js --lines 1-90
46
+ githits read npm:express@5.2.1 --selector Router
46
47
  githits code grep npm:express@5.2.1 "require('router')" lib/ -C 3
47
48
  githits code grep --repo-url https://github.com/expressjs/express --git-ref v5.2.1 "require('router')" lib/
48
49
 
49
50
  githits docs list npm:express --limit 20
50
- githits docs read <docsReadTarget>
51
+ githits read <docsReadTarget>
52
+ githits read <docsReadTarget> --selector <heading-id>
51
53
  ```
52
54
 
53
55
  ## Strategy
54
56
 
55
57
  - For behavioral claims, prefer source, symbols, tests, and call sites over docs prose.
56
58
  - 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 fragment selection. Historical `pageId` works. Use `--json` only for required range/source metadata.
59
+ - For source work, locate symbols or matches first, then read a focused window with explicit `--lines`. Use `--selector <name>` when the exact indexed symbol is known; add an exact path to narrow ambiguous symbols.
60
+ - 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
61
  - For multi-step code/docs investigations, keep raw CLI output out of the final answer unless it is the evidence the user needs.
60
62
  - 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
63
  - 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.
@@ -1,6 +1,6 @@
1
1
  # GitHits Code And Docs CLI Reference
2
2
 
3
- Package target syntax requires an explicit registry: `registry:name[@version]`, for example `npm:express@5.2.1`; omit `@version` for the latest release. Package targets inspect an indexed artifact/manifest root. Swift package targets use `swift:github.com/<owner>/<repo>` and Zig package targets use `zig:gh/<owner>/<repo>`. Use public repository targets for full repositories or sibling packages. Repository compact targets use `github:org/repo[@ref]`, `codeberg:owner/repo[@ref]`, `gitlab:group[/subgroup...]/project[@ref]`, `github.com/org/repo[@ref]`, or `https://github.com/org/repo[@ref]`; omitted refs request the backend default-branch intent. Exact standalone documentation sites use `site:<host[/path]>`. Output uses canonical `provider:path@ref` formatting so refs can contain `@` safely. `code` commands also support `--repo-url <url> [--git-ref <ref>]`.
3
+ Package target syntax requires an explicit registry: `registry:name@version`, for example `npm:express@5.2.1`; omit `@version` for the latest release. Package targets scope to the package subpath, including within monorepos. Swift package targets use `swift:github.com/<owner>/<repo>` and Zig package targets use `zig:gh/<owner>/<repo>`. Use public repository targets for full repositories or sibling packages. Repository compact targets use `github:org/repo@ref`, `codeberg:owner/repo@ref`, `gitlab:group/subgroup/project@ref`, `github.com/org/repo@ref`, or `https://github.com/org/repo@ref`; omit `@ref` for the backend default branch. Exact standalone documentation sites use `site:<host[/path]>`. Output uses canonical `provider:path@ref` formatting so refs can contain `@` safely. `code` commands also support `--repo-url <url>` with optional `--git-ref <ref>`.
4
4
 
5
5
  ## Search
6
6
 
@@ -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 `code read` when you do not know the exact file path.
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 code read <spec> <path>` reads one exact package-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`.
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: `githits code read --repo-url <url> [--git-ref <ref>] <path>`.
38
+ `githits read <target> --selector <name>` reads a known indexed code symbol; add an exact `<path>` to narrow resolution to one file. 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 docs 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. Repository docs remain snapshot-addressed and keep returned ranges. Add `--lines` only when intentionally selecting a current page range; either bound replaces fragment selection. Historical `pageId` values remain supported. Use `--json` only for required range/source metadata.
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,10 @@ 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 code read` maps to MCP `read` with `target` and `path`.
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.
65
66
  - `githits docs list` maps to MCP `docs_list`.
66
- - `githits docs read` maps to MCP `read` with `target` alone.
67
+ - `githits read <docs-target>` maps to MCP `read` with `target` alone.
67
68
 
68
69
  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
70
 
@@ -21,26 +21,27 @@ 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, documentation page, or focused section | `read` |
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` |
28
28
  | Inspect direct dependencies or transitive footprint | `pkg_deps` |
29
- | Find release notes for a package or repository | `pkg_changelog` |
29
+ | Find release notes and changelog history for a package | `pkg_changelog` |
30
30
  | Compare current and target dependency versions for an upgrade | `pkg_upgrade_review` |
31
31
  | Find canonical implementation examples across projects | `get_example` |
32
32
  | Check progress of an earlier search reference | `search_status` |
33
33
 
34
34
  For comparisons, combine relevant package/source evidence with examples as needed.
35
35
 
36
- Public OSS only; never send local/private/proprietary source. Packages use
37
- `registry:name[@version]` for an indexed artifact/manifest root; Swift uses
36
+ Public OSS only; never send local/private/proprietary source. Package/repository
37
+ patterns are `registry:name@version` and `github:owner/repo@ref`. Omit the
38
+ suffix for the latest package version or repository default branch. Package
39
+ targets scope to the package subpath, including in monorepos. Swift uses
38
40
  `swift:github.com/<owner>/<repo>`, Zig `zig:gh/<owner>/<repo>`.
39
41
  Use public repository targets for full repositories or sibling packages:
40
42
  `github:`, `codeberg:`, `gitlab:`, or a supported full URL. Never infer a provider.
41
- Revisions use `@ref` and may contain later `@` characters; `#` is reserved
42
- for semantic fragments, not revisions. Selected tools state supported forms
43
- and pin/ref restrictions.
43
+ A ref may be a branch, tag, or commit and contain later `@`; `#` is for
44
+ semantic fragments, not revisions.
44
45
 
45
46
  For a package or site docs topic, use `search` with `source:"docs"`.
46
47
  `docs_list` browses package pages, not standalone `site:` targets.
@@ -55,6 +56,8 @@ Repository docs are snapshot-addressed and keep returned ranges. Add explicit
55
56
  For source, locate paths or matches, then read focused lines; never probe
56
57
  directories with `read`. Prefer source, symbols, tests, and call sites for
57
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.
58
61
 
59
62
  Omit `wait_timeout_ms` for the default; `0` returns without waiting.
60
63
  Follow rendered continuation/recovery actions, not repeated calls to poll.
@@ -21,7 +21,7 @@ Use GitHits package intelligence before making dependency claims from memory.
21
21
 
22
22
  - Most package commands use `<registry>:<name>[@<version>]`, for example `npm:lodash@4.17.20` or `pypi:requests`.
23
23
  - `pkg info` always reports the latest published version and does not accept a version pin.
24
- - `pkg changelog` accepts `<registry>:<name>` or `--repo-url <url>`; do not pass `<spec>@<version>` to changelog. Use `--to <version>` instead.
24
+ - `pkg changelog` is package-only. Pin `@version` for one release; use `@from..to` or `--from`/`--to` for ranges. Repository and site targets are rejected.
25
25
 
26
26
  ## Core Commands
27
27
 
@@ -39,8 +39,8 @@ githits pkg deps npm:express --lifecycle all
39
39
  githits pkg deps npm:express --depth 3
40
40
 
41
41
  githits pkg changelog npm:express --limit 3
42
+ githits pkg changelog npm:express@5.2.1
42
43
  githits pkg changelog npm:express --from 4.18.0 --to 4.19.0
43
- githits pkg changelog --repo-url https://github.com/expressjs/express --limit 2 --no-body
44
44
 
45
45
  githits pkg upgrade-review npm:zod@4.3.6 --to 4.4.3
46
46
  githits pkg upgrade-review --package npm:zod@4.3.6..4.4.3 --package npm:lint-staged@16.2.7..16.4.0
@@ -54,7 +54,7 @@ githits pkg upgrade-review --package npm:zod@4.3.6..4.4.3 --package npm:lint-sta
54
54
  - Need historical advisories that do not affect the inspected version: use `pkg vulns --scope non_affecting`; use `--scope all` for affected plus historical rows.
55
55
  - Need dependency footprint: start with `pkg deps`; add `--lifecycle all` for non-runtime groups and `--depth <n>` for aggregate transitive graph data.
56
56
  - Need upgrade evidence for dependency updates, outdated package bumps, or lockfile changes: prefer `pkg upgrade-review` because it compares current vs target vulnerabilities, changelog range evidence, deprecation metadata, peer changes, dependency changes, and transitive security evidence by default. It reports facts only; you still own the final assessment.
57
- - Need release notes without a current-to-target comparison: use `pkg changelog`; use `--from`/`--to` for ranges and `--no-body` for compact timelines.
57
+ - Need release notes without a current-to-target comparison: use `pkg changelog`; `--no-body` for compact timelines.
58
58
 
59
59
  ## Gotchas
60
60
 
@@ -31,13 +31,11 @@ Use `--depth` to request capped transitive output. Without it, output is direct
31
31
 
32
32
  ## Changelog
33
33
 
34
- `githits pkg changelog <registry:name>` returns recent release notes. `--limit` caps latest mode. `--from` is the exclusive lower bound for range mode, which returns entries after `--from` through `--to` (or latest).
34
+ `githits pkg changelog <registry:name[@version|@from..to]>` returns release notes for a package. Bare targets use latest mode. Pin `@version` for one selected release. Use `@from..to`, `@from..`, or `@..to` for interval and upper-cap forms.
35
35
 
36
- Flags: `--repo-url <url>`, `--from <version>`, `--to <version>`, `--limit 1-50`, `--git-ref <ref>`, `--verbose`, `--no-body`, `--json`.
36
+ Flags: `--from <version>`, `--to <version>`, `--limit 1-50`, `--verbose`, `--no-body`, `--json`.
37
37
 
38
- Do not use `registry:name@version` for changelog. `--to <version>` is an upper cap, not an exact-release lookup.
39
-
40
- For repository changelogs, pass a full HTTPS URL on github.com, codeberg.org, or gitlab.com to `--repo-url`; use `--git-ref` for a branch or tag. Codeberg requires owner/repo; GitLab permits nested namespaces. Do not pass compact `github:`, `codeberg:`, or `gitlab:` targets to this URL field.
38
+ `--from` and `--to` remain package range flags on a bare spec. Inline single-release targets reject those flags and `--limit`. Repository and site targets are not supported.
41
39
 
42
40
  ## Upgrade Review
43
41