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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier initial formatting (2026-03-28)
afcc3d1523f99c77ff67c4fd1af12334660113f6
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
.husky/* text eol=lf
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ changelog:
- dependencies
- title: "\U0001F4DD Other Changes"
labels:
- "*"
- '*'
exclude:
labels:
- dependencies
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ci-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ on:
workflow_call:

jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npx prettier --check .

typecheck:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ name: CI Report

on:
workflow_run:
workflows: ["CI"]
workflows: ['CI']
types: [completed]

permissions:
actions: read # needed to list/download workflow run artifacts
contents: read # needed for sparse checkout of vitest.config.ts
actions: read # needed to list/download workflow run artifacts
contents: read # needed for sparse checkout of vitest.config.ts
pull-requests: write # needed to post sticky PR comment

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
pull-requests: write
issues: write
id-token: write
actions: read # required for Claude to read CI results on PRs
actions: read # required for Claude to read CI results on PRs
steps:
# For PR-related triggers, resolve the fork repo so we can checkout correctly.
- name: Resolve PR context
Expand Down
25 changes: 9 additions & 16 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
#!/usr/bin/env bash
# Pre-commit hook (husky): typecheck + unit tests for both packages.
# Mirrors CI checks from ci-quality.yml and ci-tests.yml.
# Pre-commit hook: format staged files + typecheck.
# Tests run in CI (ci-tests.yml), not here.
# Skip with: git commit --no-verify
#
# CI coverage:
# quality / typecheck → tsc --noEmit in gitnexus/
# quality / typecheck-web → tsc -b --noEmit in gitnexus-web/
# tests / ubuntu+coverage → vitest run in gitnexus/ (all projects)
# e2e / chromium → playwright (requires servers — skipped)

ROOT="$(git rev-parse --show-toplevel)"

# 1. Format staged files with prettier via lint-staged
echo "pre-commit: formatting staged files..."
"$ROOT/node_modules/.bin/lint-staged" || exit 1

# 2. Typecheck changed packages
WEB_CHANGED=$(git diff --cached --name-only -- 'gitnexus-web/' | head -1)
CLI_CHANGED=$(git diff --cached --name-only -- 'gitnexus/' | head -1)

if [ -n "$WEB_CHANGED" ]; then
echo "pre-commit: typechecking gitnexus-web (tsc -b)..."
cd "$ROOT/gitnexus-web" && npx tsc -b --noEmit

echo "pre-commit: running gitnexus-web unit tests..."
npx vitest run --reporter=dot
cd "$ROOT/gitnexus-web" && ./node_modules/.bin/tsc -b --noEmit || exit 1
fi

if [ -n "$CLI_CHANGED" ]; then
echo "pre-commit: typechecking gitnexus..."
cd "$ROOT/gitnexus" && npx tsc --noEmit

echo "pre-commit: running gitnexus unit tests (default project)..."
npx vitest run --project default --reporter=dot
cd "$ROOT/gitnexus" && ./node_modules/.bin/tsc --noEmit || exit 1
fi

echo "pre-commit: all checks passed"
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
dist/
coverage/
gitnexus/vendor/
gitnexus/test/fixtures/
gitnexus-web/playwright-report/
gitnexus-web/test-results/
*.d.ts
*.snap
*.wasm
*.md
.gitnexus/
.vercel/
.claude-flow/
.swarm/
assets/
repomix-output*
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindStylesheet": "./gitnexus-web/src/index.css"
}
4 changes: 2 additions & 2 deletions eval/configs/models/claude-haiku.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Claude Haiku 4.5 — fast, cheap, good baseline
# Via OpenRouter (set OPENROUTER_API_KEY in .env)
model:
model_name: "openrouter/anthropic/claude-haiku-4.5"
cost_tracking: "ignore_errors"
model_name: 'openrouter/anthropic/claude-haiku-4.5'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 8192
temperature: 0
4 changes: 2 additions & 2 deletions eval/configs/models/claude-opus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Via OpenRouter (set OPENROUTER_API_KEY in .env)
# To use Anthropic directly, change to: anthropic/claude-opus-4-20250514
model:
model_name: "openrouter/anthropic/claude-opus-4"
cost_tracking: "ignore_errors"
model_name: 'openrouter/anthropic/claude-opus-4'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 16384
temperature: 0
4 changes: 2 additions & 2 deletions eval/configs/models/claude-sonnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Via OpenRouter (set OPENROUTER_API_KEY in .env)
# To use Anthropic directly, change to: anthropic/claude-sonnet-4-20250514
model:
model_name: "openrouter/anthropic/claude-sonnet-4"
cost_tracking: "ignore_errors"
model_name: 'openrouter/anthropic/claude-sonnet-4'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 16384
temperature: 0
6 changes: 3 additions & 3 deletions eval/configs/models/deepseek-chat.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
model: deepseek-ai/deepseek-chat
provider: openrouter
cost:
input: 0.14 # per 1M tokens
output: 0.28 # per 1M tokens
input: 0.14 # per 1M tokens
output: 0.28 # per 1M tokens

# Native DeepSeek API (direct)
api_key: null
base_url: null
Expand Down
6 changes: 3 additions & 3 deletions eval/configs/models/deepseek-v3.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
model: deepseek-ai/DeepSeek-V3
provider: openrouter
cost:
input: 0.27 # per 1M tokens
output: 1.10 # per 1M tokens
input: 0.27 # per 1M tokens
output: 1.10 # per 1M tokens

# Native DeepSeek API (direct)
# Get your API key at: https://platform.deepseek.com/
# Or use OpenRouter with: OPENROUTER_API_KEY
Expand Down
4 changes: 2 additions & 2 deletions eval/configs/models/glm-4.7.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GLM 4.7 — via OpenRouter (set OPENROUTER_API_KEY in .env)
model:
model_name: "openrouter/zhipuai/glm-4.7"
cost_tracking: "ignore_errors"
model_name: 'openrouter/zhipuai/glm-4.7'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 8192
temperature: 0
4 changes: 2 additions & 2 deletions eval/configs/models/glm-5.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GLM 5 — via OpenRouter (set OPENROUTER_API_KEY in .env)
model:
model_name: "openrouter/zhipuai/glm-5"
cost_tracking: "ignore_errors"
model_name: 'openrouter/zhipuai/glm-5'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 8192
temperature: 0
4 changes: 2 additions & 2 deletions eval/configs/models/minimax-2.5.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MiniMax M1 2.5 — via OpenRouter (set OPENROUTER_API_KEY in .env)
model:
model_name: "openrouter/minimax/minimax-m1-2.5"
cost_tracking: "ignore_errors"
model_name: 'openrouter/minimax/minimax-m1-2.5'
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 8192
temperature: 0
4 changes: 2 additions & 2 deletions eval/configs/models/minimax-m2.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# The action_regex tells mini-swe-agent to parse ```bash blocks from responses.
model:
model_class: litellm_textbased
model_name: "openrouter/minimax/minimax-m2.5"
model_name: 'openrouter/minimax/minimax-m2.5'
action_regex: "```(?:bash|mswea_bash_command)\\s*\\n(.*?)\\n```"
cost_tracking: "ignore_errors"
cost_tracking: 'ignore_errors'
model_kwargs:
max_tokens: 8192
temperature: 0
6 changes: 3 additions & 3 deletions eval/configs/modes/baseline.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Baseline mode — no GitNexus, pure mini-swe-agent (control group)
agent:
agent_class: "eval.agents.gitnexus_agent.GitNexusAgent"
gitnexus_mode: "baseline"
agent_class: 'eval.agents.gitnexus_agent.GitNexusAgent'
gitnexus_mode: 'baseline'
step_limit: 30
cost_limit: 3.0

environment:
environment_class: "docker"
environment_class: 'docker'
6 changes: 3 additions & 3 deletions eval/configs/modes/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#
# Use this mode to isolate the value of explicit tools without grep augmentation.
agent:
agent_class: "eval.agents.gitnexus_agent.GitNexusAgent"
gitnexus_mode: "native"
agent_class: 'eval.agents.gitnexus_agent.GitNexusAgent'
gitnexus_mode: 'native'
step_limit: 30
cost_limit: 3.0
track_gitnexus_usage: true

environment:
environment_class: "eval.environments.gitnexus_docker.GitNexusDockerEnvironment"
environment_class: 'eval.environments.gitnexus_docker.GitNexusDockerEnvironment'
enable_gitnexus: true
skip_embeddings: true
gitnexus_timeout: 120
Expand Down
6 changes: 3 additions & 3 deletions eval/configs/modes/native_augment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
#
# The agent decides when to use explicit tools vs rely on enriched grep results.
agent:
agent_class: "eval.agents.gitnexus_agent.GitNexusAgent"
gitnexus_mode: "native_augment"
agent_class: 'eval.agents.gitnexus_agent.GitNexusAgent'
gitnexus_mode: 'native_augment'
step_limit: 30
cost_limit: 3.0
augment_timeout: 5.0
augment_min_pattern_length: 3
track_gitnexus_usage: true

environment:
environment_class: "eval.environments.gitnexus_docker.GitNexusDockerEnvironment"
environment_class: 'eval.environments.gitnexus_docker.GitNexusDockerEnvironment'
enable_gitnexus: true
skip_embeddings: true
gitnexus_timeout: 120
Expand Down
Loading
Loading