Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
},
"metadata": {
"description": "The code context layer for AI coding agents",
"version": "0.9.2"
"version": "0.9.3"
},
"plugins": [
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
2 changes: 1 addition & 1 deletion .plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,67 @@ changes use independent files under [`changes/`](changes/README.md) and are
consolidated here only during release preparation. Dated, versioned sections
are historical records and change only to correct blatant factual errors.

## [githits 0.9.3] - 2026-08-18

Patch release: adds an unpromoted CodeDiff CLI dogfood surface and improves
CLI recovery, validation guidance, and search diagnostics.

### Added

- **Silent CodeDiff CLI dogfooding** - adds `githits code diff` with bounded
Git-like views, repository-relative glob filtering, reversible path quoting,
apply-safe patch handling, structured completeness diagnostics, and JSON
output without exposing an MCP tool or agent guidance yet.

### Changed

- **Independent changelog fragments** - notable changes now record release
notes and per-artifact SemVer impact in independently owned files, avoiding
conflicts in `CHANGELOG.md` during normal development.

### Fixed

- **Code validation guidance** - client-side `INVALID_ARGUMENT` errors from
shared code-read and grep request builders now name CLI commands,
positionals, and options on the CLI while MCP keeps MCP-native tool and
argument syntax.
- **Remove obsolete ref suggestions** - waited searches no longer recommend an
older ref after reaching the requested commit.
- **Explain unavailable exact paths** - CLI and MCP now return
`FILE_PATH_EXCLUDED` for excluded files and
`SOURCE_FILE_INVENTORY_UNKNOWN` when the index cannot verify a path, with
actionable path and resolution details.
- **Standalone-site search recovery** - CLI and MCP search now preserve ordered
backend site suggestions, distinguish truncated candidate lists, and direct
active crawls through search status without guessing or rewriting targets.
Help text also distinguishes atomic interim evidence from opted-in partial
target/source subsets.

## [@githits/mcp 0.9.2] - 2026-08-18

Patch release: adds an opt-in CodeDiff client capability and improves search
and exact-path recovery without exposing a new remote MCP tool.

### Added

- **CodeDiff client support** - adds the transport-neutral package and
repository diff adapter as an additive `CodeDiffService` capability without
exposing a remote MCP tool.

### Fixed

- **Remove obsolete ref suggestions** - waited searches no longer recommend an
older ref after reaching the requested commit.
- **Explain unavailable exact paths** - MCP tools now return
`FILE_PATH_EXCLUDED` for excluded files and
`SOURCE_FILE_INVENTORY_UNKNOWN` when the index cannot verify a path, with
actionable path and resolution details.
- **Standalone-site search recovery** - MCP search now preserves ordered
backend site suggestions, distinguishes truncated candidate lists, and
directs active crawls through search status without guessing or rewriting
targets. Help text also distinguishes atomic interim evidence from opted-in
partial target/source subsets.

## [githits 0.9.2] - 2026-08-14

Patch release: improves CLI exact-path recovery and makes Claude Code and Codex
Expand Down
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions changes/282-current-wait-warning.fixed.md

This file was deleted.

6 changes: 0 additions & 6 deletions changes/284-exact-path-authority.fixed.md

This file was deleted.

8 changes: 0 additions & 8 deletions changes/changelog-fragments.changed.md

This file was deleted.

8 changes: 0 additions & 8 deletions changes/cli-validation-guidance.fixed.md

This file was deleted.

6 changes: 0 additions & 6 deletions changes/code-diff-cli-dogfood.added.md

This file was deleted.

6 changes: 0 additions & 6 deletions changes/code-diff-client-adapter.added.md

This file was deleted.

10 changes: 0 additions & 10 deletions changes/site-search-recovery.fixed.md

This file was deleted.

15 changes: 8 additions & 7 deletions docs/implementation/code-diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ergonomics and evidence envelope have been dogfooded.

## Addressing and modes

`CodeNavigationService.codeDiff` accepts an unversioned package or repository
`CodeDiffService.codeDiff` accepts an unversioned package or repository
target plus explicit `from`, `to`, and `mode` values:

| Mode | File fields selected |
Expand Down Expand Up @@ -68,12 +68,13 @@ consumer.

## Public boundary

The service method, CodeDiff request/result types, and `CodeDiffError` are
re-exported from `@githits/mcp/client`. This is a public TypeScript interface
change: custom `CodeNavigationService` implementations must add `codeDiff`
when adopting the package version containing this adapter. The existing test
factories provide deterministic default results so current tool tests remain
focused on their own behavior.
The additive `CodeDiffService` capability, CodeDiff request/result types, and
`CodeDiffError` are re-exported from `@githits/mcp/client`.
`CodeNavigationServiceImpl` implements both `CodeNavigationService` and
`CodeDiffService`, while custom `CodeNavigationService` implementations remain
source-compatible and do not need to implement the unpromoted diff capability.
The existing test factories provide deterministic default results so current
tool tests remain focused on their own behavior.

## Silent CLI dogfood contract

Expand Down
29 changes: 15 additions & 14 deletions docs/plans/code-diff-cli-mcp.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Plan: CodeDiff CLI dogfood and agent rollout

> Overall status: Phase 1 is merged. Phase 2 is implemented and locally/live
> verified and reviewed as a silent CLI-only dogfood launch; merge is pending.
> MCP and agent-facing exposure remain deferred until the CLI contract has
> been exercised after merge.
> Overall status: Phases 1 and 2 are merged as a silent CLI-only dogfood
> launch. MCP and agent-facing exposure remain deferred until the CLI contract
> has been exercised after release.
>
> Reoriented: 2026-08-17 against `githits` `origin/main` at `77417aa` and
> PkgSeer backend `origin/main` at `c0cf92e` with GraphQL schema hash
Expand Down Expand Up @@ -36,9 +35,10 @@ CodeDiff remains a separate, unexposed backend evaluation surface.
### GitHits repository

- Phase 1 merged through PR #287 at `origin/main` `77417aa`. The merged delta
adds `CodeNavigationService.codeDiff`, exact request/result/error types,
mode-minimal GraphQL selections, runtime validation, fixtures, public client
exports, and `docs/implementation/code-diff.md`.
adds the separate `CodeDiffService.codeDiff` capability, exact
request/result/error types, mode-minimal GraphQL selections, runtime
validation, fixtures, public client exports, and
`docs/implementation/code-diff.md`.
- The declaration-build pipeline failure was fixed before merge. Phase 1's
focused tests, full tests, build, and public-package validation passed.
- No `githits code diff` command, `code_diff` MCP tool, response formatter,
Expand Down Expand Up @@ -141,7 +141,7 @@ into separate phases. Do not implement the old combined Phase 2.

### Boundaries and responsibilities

- `CodeNavigationService.codeDiff` remains the only network/service boundary.
- `CodeDiffService.codeDiff` remains the only network/service boundary.
It owns authenticated GraphQL execution, exact variable construction,
mode-minimal selections, runtime validation, and typed CodeDiff errors.
- Small pure CodeDiff request, response, text, and error helpers live under
Expand All @@ -168,7 +168,7 @@ remote MCP servers must not. No new module from Phase 2 is exported by
```text
CLI target + from..to + view/filter/bounds
-> pure CLI request normalization
-> CodeNavigationService.codeDiff
-> CodeDiffService.codeDiff
-> mode-minimal codeDiff.raw GraphQL selection
-> typed CodeDiff result or error
-> pure selected-view JSON/text projection
Expand Down Expand Up @@ -315,8 +315,9 @@ There is no blocking product decision for Phase 2.

### Compatibility, release, and rollback

- Phase 2 adds a root CLI command and therefore adds one independent fragment
with pending impacts `githits: minor` and `@githits/mcp: none`.
- Phase 2 adds an unpromoted root CLI dogfood command and therefore adds one
independent fragment with pending impacts `githits: patch` and
`@githits/mcp: none`.
- Phase 2 does not bump versions directly. Release preparation owns package and
generated-manifest versions.
- Workspace-internal shared modules must not appear in public export maps or
Expand Down Expand Up @@ -500,10 +501,10 @@ plugin generator, or generated agent asset in this phase.
failed content evidence succeeds with unmistakable structured/text warnings.
- CLI help states the bounded glob and revision limitations without claiming
full Git pathspec or revision compatibility.
- No `code_diff` tool, MCP instruction, agent guidance, plugin asset, or public
`@githits/mcp` export is added or changed.
- No `code_diff` tool, MCP instruction, agent guidance, or plugin asset is
added or changed by Phase 2.
- Durable docs describe the dogfood posture and one release fragment records
`githits: minor`, `@githits/mcp: none`.
`githits: patch`, `@githits/mcp: none`.
- Focused tests, full tests, build, CLI smoke, built CLI smoke, package
validation, and relevant format/lint checks pass. Authenticated dev results
are recorded accurately.
Expand Down
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"mcpServers": {
"githits": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "githits",
"description": "The code context layer for AI coding agents",
"version": "0.9.2",
"version": "0.9.3",
"mcpName": "com.githits/githits",
"type": "module",
"workspaces": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ export interface CodeNavigationService {
listFiles(params: ListFilesParams): Promise<ListFilesResult>;
readFile(params: ReadFileParams): Promise<ReadFileResult>;
grepRepo(params: GrepRepoParams): Promise<GrepRepoResult>;
}

/** Additive client capability for the unpromoted CodeDiff surface. */
export interface CodeDiffService {
codeDiff(params: CodeDiffParams): Promise<CodeDiffResult>;
}

Expand Down Expand Up @@ -2212,7 +2216,9 @@ const unifiedSearchStatusGraphQLResponseSchema = z.object({
errors: z.array(graphQLErrorSchema).optional(),
});

export class CodeNavigationServiceImpl implements CodeNavigationService {
export class CodeNavigationServiceImpl
implements CodeNavigationService, CodeDiffService
{
constructor(
private readonly codeNavigationUrl: string,
private readonly tokenProvider: TokenProvider,
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@githits/mcp",
"version": "0.9.1",
"version": "0.9.2",
"description": "Reusable MCP server APIs and tools for GitHits",
"type": "module",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/mcp/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type {
CodeDiffRefResolution,
CodeDiffRepositoryTarget,
CodeDiffResult,
CodeDiffService,
CodeDiffTarget,
CodeDiffVersionSource,
CodeNavigationService,
Expand Down
1 change: 0 additions & 1 deletion packages/mcp/src/mcp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ function createDescriptorServices(): McpToolServices {
listFiles: fail,
readFile: fail,
grepRepo: fail,
codeDiff: fail,
},
packageIntelligenceService: {
packageSummary: fail,
Expand Down
5 changes: 3 additions & 2 deletions packages/mcp/src/services/test-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { mock } from "bun:test";
import type {
ChangelogReport,
CodeDiffResult,
CodeDiffService,
CodeNavigationService,
DependencyReport,
GitHitsService,
Expand Down Expand Up @@ -299,8 +300,8 @@ export const defaultCodeDiffResult: CodeDiffResult = {
* Creates a mock CodeNavigationService with default implementations.
*/
export function createMockCodeNavigationService(
impl: Partial<CodeNavigationService> = {},
): CodeNavigationService {
impl: Partial<CodeNavigationService & CodeDiffService> = {},
): CodeNavigationService & CodeDiffService {
return {
search: mock(() => Promise.resolve(defaultUnifiedSearchOutcome)),
searchStatus: mock(() => Promise.resolve(defaultUnifiedSearchOutcome)),
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "githits",
"version": "0.9.2",
"version": "0.9.3",
"description": "The code context layer for AI coding agents",
"author": {
"name": "GitHits"
Expand Down
6 changes: 5 additions & 1 deletion scripts/validate-public-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,21 @@ async function verifyMcpConsumer(
);
await writeFile(
join(appDirectory, "code-diff-check.ts"),
`import { CodeDiffError, CodeNavigationServiceImpl, createStaticTokenProvider, getCodeNavigationUrl, type CodeDiffMode, type CodeDiffPackageTarget, type CodeDiffParams, type CodeDiffRepositoryTarget, type CodeDiffResult, type CodeNavigationService } from "@githits/mcp/client";
`import { CodeDiffError, CodeNavigationServiceImpl, createStaticTokenProvider, getCodeNavigationUrl, type CodeDiffMode, type CodeDiffPackageTarget, type CodeDiffParams, type CodeDiffRepositoryTarget, type CodeDiffResult, type CodeDiffService, type CodeNavigationService } from "@githits/mcp/client";
const packageTarget: CodeDiffPackageTarget = { registry: "NPM", packageName: "express" };
const repositoryTarget: CodeDiffRepositoryTarget = { repoUrl: "https://github.com/expressjs/express" };
const mode: CodeDiffMode = "inventory";
const params: CodeDiffParams = { target: packageTarget, from: "4.18.1", to: "4.18.2", mode };
const result: CodeDiffResult | undefined = undefined;
const service: CodeNavigationService = new CodeNavigationServiceImpl(getCodeNavigationUrl(), createStaticTokenProvider("token"));
const diffService: CodeDiffService = new CodeNavigationServiceImpl(getCodeNavigationUrl(), createStaticTokenProvider("token"));
const codeNavigationRemainsCompatible: "codeDiff" extends keyof CodeNavigationService ? never : true = true;
void repositoryTarget;
void params;
void result;
void service;
void diffService;
void codeNavigationRemainsCompatible;
void CodeDiffError;
`,
);
Expand Down
Loading