diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d383bdf..b4734ca 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,55 +5,41 @@ on: branches: [main] pull_request: +permissions: + contents: read + packages: read + jobs: checks: runs-on: ubuntu-latest steps: - # Side by side, because the view depends on the design package by - # relative path. Checked out anywhere else that path resolves to nothing. - - uses: actions/checkout@v4 - with: - path: agent - - uses: actions/checkout@v4 - with: - repository: sourceant/design - path: design - uses: actions/setup-go@v5 with: - go-version-file: agent/go.mod - cache-dependency-path: agent/go.sum + go-version-file: go.mod + cache: true - uses: actions/setup-node@v4 with: node-version: 22 - - # The design preset imports a peer dependency, and node resolves that - # from where the preset lives. Installed as a package it would find the - # consumer's copy by walking up; linked by relative path it looks in a - # directory with nothing in it. This goes when that dependency is a - # version rather than a path. - - name: Peer dependencies the design preset resolves from its own folder - working-directory: design - run: npm install --no-audit --no-fund --no-save @tailwindcss/typography + registry-url: https://npm.pkg.github.com + scope: '@sourceant' - name: Formatting - working-directory: agent run: make fmt-check - name: Vet - working-directory: agent run: make vet - name: Tests - working-directory: agent run: make test-race # The view is built before the binary, because the binary embeds it. A # build against stale assets proves nothing about the change. - name: Build - working-directory: agent run: | make ui-deps make build + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1f03d2c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,62 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to release (e.g., 1.0.0-beta.2)' + required: true + push: + tags: + - 'v*' + +permissions: + contents: write + packages: read + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Read version from file + id: version + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + + - name: Validate version + run: | + FILE_VERSION="$(cat VERSION)" + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + RELEASE_VERSION="${{ github.event.inputs.version }}" + else + RELEASE_VERSION="${GITHUB_REF_NAME#v}" + fi + if [ "$RELEASE_VERSION" != "$FILE_VERSION" ]; then + echo "::error::Version mismatch: Input/Tag ($RELEASE_VERSION) != VERSION file ($FILE_VERSION)" + exit 1 + fi + echo "Version validated: $FILE_VERSION" + + - uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: https://npm.pkg.github.com + scope: '@sourceant' + + # The binary embeds the view, so the view is built before anything that + # builds the binary. + - name: Build the view + run: make ui-deps ui + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Release + uses: whilesmart/workflows/go/release@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + binary_name: sourceant-agent + build_path: ./cmd/agent + version: ${{ github.event.inputs.version || steps.version.outputs.version }} + platforms: '["linux/amd64", "linux/arm64", "darwin/amd64", "darwin/arm64"]' + ldflags: "-X main.Version=${{ github.event.inputs.version || steps.version.outputs.version }} -X main.BuildTime=$(date -u +%Y-%m-%d_%H:%M:%S) -X main.GitCommit=${{ github.sha }}" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5aded10 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0-beta.2] - 2026-08-30 + +First release, versioned alongside the core it supervises. + +### Added + +- Supervises the core: starts whatever was installed on a free port, waits for + it to answer, and restarts it when it dies, backing off as failures repeat +- Serves the local view from the binary itself, so it works with no network and + cannot drift from the agent serving it: Overview, Graph, Knowledge, Reviews, + Skills, Repositories and Settings +- Asks for a review of a checkout and keeps the answer, so a review has an + address that still opens an hour later +- Proxies `/mcp` to the core, so a coding agent on this machine reaches the same + index through the agent it already talks to +- Reads and writes knowledge, skills, settings and repositories against the + index, and browses the filesystem for the folder a person is adding diff --git a/README.md b/README.md index df34309..9f02ab4 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,13 @@ It never parses code. The grammars and the graph shape live in the Python core, Starts the core on a free port and waits for it to answer. Restarts it when it dies, backing off as failures repeat. Serves its own HTTP surface on `127.0.0.1:8930`, where `/health` reports whether the core is up and how many times it has been started, and `/api/repositories` and `/api/graph` read the index. -It also serves the local view at `/`: Overview, Knowledge, Graphs, Repositories, Settings. The assets are embedded in the binary, so the view works with no network and cannot drift from the agent serving it. +It also serves the local view at `/`: Overview, Graph, Knowledge, Reviews, Skills, Repositories, Settings. The assets are embedded in the binary, so the view works with no network and cannot drift from the agent serving it. The view is Vue, built by Vite from `ui/`: Tailwind for the design tokens, lucide for icons, force-graph in 2D and 3d-force-graph for Tree, Radial, Layered and Force. -There are no reviews here. A review reads a pull request, and nothing on a machine produces one. +A checkout is reviewed here, by the same reviewer a pull request goes through. It reads the working tree against the branch it would merge into, so a change is read before anybody else sees it. The core does the reading; the agent asks for it and keeps the answer. + +`/mcp` is proxied through to the core, so a coding agent on this machine reaches the same index and can ask for the same review. Loopback is the default because the agent reads a working tree. The machine it runs on is the only audience it has. diff --git a/VERSION b/VERSION index 6e8bf73..7e0b231 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +1.0.0-beta.2 diff --git a/ui/.npmrc b/ui/.npmrc new file mode 100644 index 0000000..456448d --- /dev/null +++ b/ui/.npmrc @@ -0,0 +1 @@ +@sourceant:registry=https://npm.pkg.github.com diff --git a/ui/package-lock.json b/ui/package-lock.json index 40000e9..cf7110c 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@dicebear/collection": "^9.2.2", "@dicebear/core": "^9.2.2", - "@sourceant/design": "file:../../design", + "@sourceant/design": "^0.1.0", "@tailwindcss/typography": "^0.5.20", "3d-force-graph": "^1.80.0", "class-variance-authority": "^0.7.1", @@ -32,22 +32,6 @@ "vite": "^6.0.7" } }, - "../../design": { - "name": "@sourceant/design", - "version": "0.1.0", - "license": "MIT", - "peerDependencies": { - "3d-force-graph": "^1.80.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "d3-force-3d": "^3.0.6", - "force-graph": "^1.51.4", - "lucide-vue-next": "^0.563.0", - "tailwind-merge": "^3.4.0", - "three-spritetext": "^1.10.0", - "vue": "^3.5.0" - } - }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -1465,10 +1449,6 @@ "win32" ] }, - "node_modules/@sourceant/design": { - "resolved": "../../design", - "link": true - }, "node_modules/@tailwindcss/typography": { "version": "0.5.20", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.20.tgz", diff --git a/ui/package.json b/ui/package.json index 28a8543..f800fbd 100644 --- a/ui/package.json +++ b/ui/package.json @@ -14,7 +14,7 @@ "dependencies": { "@dicebear/collection": "^9.2.2", "@dicebear/core": "^9.2.2", - "@sourceant/design": "file:../../design", + "@sourceant/design": "^0.1.0", "@tailwindcss/typography": "^0.5.20", "3d-force-graph": "^1.80.0", "class-variance-authority": "^0.7.1",