-
Notifications
You must be signed in to change notification settings - Fork 0
Agent/scaffold review fixes #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cfe3217
chore: initialize repository scaffold and package metadata
krishna916 9168fd2
chore: add strict TypeScript configuration and domain documentation b…
krishna916 e4172c5
tooling: configure ESLint flat config with type-checking and strict w…
krishna916 5a47e92
feat(application): implement health status application contract and p…
krishna916 516005c
feat(database): implement SQLite connection factory, PRAGMAs, and tra…
krishna916 f39da2a
feat(mcp): implement MCP server factory exposing relay_health tool ov…
krishna916 463a575
feat(mcp): add MCP stdio executable entry point, tsup build configura…
krishna916 b04f2c8
feat(http): implement loopback node:http server factory with GET /api…
krishna916 9a9215c
feat(web): add minimal Vite React 19 connectivity shell displaying HT…
krishna916 e2b2f6e
build: configure combined Node and Vite web production build scripts
krishna916 34e5fee
chore(scripts): implement repository asset validator script
krishna916 c1c6957
ci: add pnpm verify aggregate gate and GitHub Actions CI workflow
krishna916 e74edd6
docs: finalize scaffold README with setup instructions, architecture …
krishna916 5f17ba3
Fix scaffold runtime paths and validation
krishna916 6cc95bf
Address scaffold review findings
krishna916 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 2 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Enable Corepack | ||
| run: corepack enable | ||
|
|
||
| - name: Setup Node.js 24 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Run verification gate | ||
| run: pnpm verify | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| node_modules/ | ||
| dist/ | ||
| coverage/ | ||
| *.log | ||
| .DS_Store | ||
| *.tmp | ||
| package-lock.json | ||
| *.tsbuildinfo | ||
| .idea/ | ||
| .superpowers/ | ||
| .vscode/ | ||
| Thumbs.db | ||
| Desktop.ini | ||
| *.swp | ||
| *.swo | ||
| *.bak | ||
| *.orig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| node_modules/ | ||
| dist/ | ||
| coverage/ | ||
| pnpm-lock.yaml | ||
| .superpowers/ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "trailingComma": "all", | ||
| "printWidth": 100, | ||
| "tabWidth": 2 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # Relay | ||
|
|
||
| Local task sidecar for human–AI workflows. | ||
|
|
||
| > **Status:** Scaffold stage (Issue #1). Task tracking, companion skills, vendor integration configs, and packaging are explicitly deferred to subsequent issues (Issue #2+). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.js `24.x` LTS (`.nvmrc`) | ||
| - Supported release line as of `2026-07-25`: Node `24.x` (`26.x` is Current, `25.x` is EOL) | ||
| - pnpm `10.2.0` (managed via Corepack) | ||
|
|
||
| ## Setup | ||
|
|
||
| ```bash | ||
| corepack enable | ||
| nvm use | ||
| pnpm install --frozen-lockfile | ||
| ``` | ||
|
|
||
| If you use `fnm`, `asdf`, or another version manager, switch to Node `24` before running install or verification. | ||
|
|
||
| ## Available Scripts | ||
|
|
||
| - `pnpm verify` — **Non-mutating** aggregate quality gate. Executes `format:check -> lint -> typecheck -> test:coverage -> build -> validate:assets -> audit --audit-level high`. | ||
| - `pnpm format` — **Mutating**. Format codebase with Prettier. | ||
| - `pnpm format:check` — **Non-mutating**. Check formatting with Prettier. | ||
| - `pnpm lint` — **Non-mutating**. Run ESLint (`--max-warnings=0`). | ||
| - `pnpm typecheck` — **Non-mutating**. Perform strict TypeScript type checking (`tsc --build --noEmit`). | ||
| - `pnpm test` — **Non-mutating**. Run Vitest unit & integration tests once. | ||
| - `pnpm test:coverage` — **Non-mutating**. Run Vitest tests with V8 coverage threshold enforcement. | ||
| - `pnpm build:node` — **Mutating (dist/)**. Build Node backend entry points (`dist/mcp/main.js`, `dist/http/main.js`). | ||
| - `pnpm build:web` — **Mutating (dist/)**. Build Vite React web UI (`dist/web`). | ||
| - `pnpm build` — **Mutating (dist/)**. Run `build:node` and `build:web`. | ||
| - `pnpm dev:mcp` — **Non-mutating**. Run MCP stdio entry point from source via `tsx`. | ||
| - `pnpm dev:http` — **Non-mutating**. Run HTTP server from source (`http://127.0.0.1:43110`). | ||
| - `pnpm dev:web` — **Non-mutating**. Run Vite development server with proxy `/api` -> `http://127.0.0.1:43110`. | ||
| - `pnpm dev:ui` — **Non-mutating**. Run HTTP server and Vite development server concurrently. | ||
| - `pnpm validate:assets` — **Non-mutating**. Validate repository assets, package `bin`, and configuration. | ||
|
|
||
| ## Development Servers & Ports | ||
|
|
||
| - Default HTTP loopback address: `127.0.0.1` | ||
| - Default HTTP port: `43110` (`GET /api/health`) | ||
| - Vite dev server port: `5173` (proxies `/api` to `http://127.0.0.1:43110`) | ||
|
|
||
| ## Configuration & Environment Variables | ||
|
|
||
| - `RELAY_DB_PATH`: Custom file path to SQLite database. | ||
| - Windows default: `%APPDATA%\relay\relay.db` | ||
| - macOS default: `~/Library/Application Support/relay/relay.db` | ||
| - Linux default: `${XDG_DATA_HOME:-~/.local/share}/relay/relay.db` | ||
| - `RELAY_HTTP_PORT`: Custom port for loopback HTTP server (default: `43110`). | ||
|
|
||
| ## Database & Migrations | ||
|
|
||
| Relay uses `better-sqlite3` with plain SQL migrations located under `src/database/migrations/`. | ||
|
|
||
| On every database connection: | ||
|
|
||
| - `PRAGMA foreign_keys = ON;` | ||
| - `PRAGMA journal_mode = WAL;` | ||
| - `PRAGMA busy_timeout = 5000;` | ||
|
|
||
| Applied SQL migrations are tracked in `_relay_migrations` with SHA-256 checksums. **Applied migration SQL files are immutable**. | ||
|
|
||
| ## Invoking Built MCP Command Locally | ||
|
|
||
| Build the scaffold Node entry points: | ||
|
|
||
| ```bash | ||
| pnpm build | ||
| ``` | ||
|
|
||
| Start the MCP stdio process: | ||
|
|
||
| ```bash | ||
| node dist/mcp/main.js | ||
| ``` | ||
|
|
||
| Or invoke via package binary entry point: | ||
|
|
||
| ```bash | ||
| ./dist/mcp/main.js | ||
| ``` | ||
|
|
||
| The process exposes one scaffold health tool: `relay_health`. Diagnostics are written exclusively to `stderr`. | ||
|
|
||
| ## Architecture Boundaries | ||
|
|
||
| ```text | ||
| src/ | ||
| domain/ # Domain entities & rules (deferred to Issue #2+) | ||
| application/ # Application services (getHealth) | ||
| database/ # SQLite connection factory & migration runner | ||
| interfaces/ | ||
| mcp/ # MCP stdio server adapter (relay_health) | ||
| http/ # Loopback HTTP server adapter (GET /api/health) | ||
| shared/ # Custom errors & package metadata | ||
| web/ # Vite React 19 UI shell | ||
| ``` | ||
|
|
||
| Boundary rules: | ||
|
|
||
| - `domain` and `application` layers have zero dependencies on interface protocols (`mcp`, `http`) or database implementations. | ||
| - `interfaces` call application services (`getHealth()`) and do not construct domain responses independently. | ||
| - `web/` calls loopback HTTP `/api/health` only and never imports Node modules. | ||
|
|
||
| ## Current Limitations | ||
|
|
||
| - No task CRUD, task table, or product task behavior (deferred to Issue #2+). | ||
| - No companion skills, plugin manifests, or vendor MCP configs (deferred to Issue #2+). | ||
| - No remote network binding, authentication, multi-user accounts, background daemon, or desktop shell. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **`better-sqlite3` build issues:** Ensure Python and a C++ compiler build toolchain are installed if prebuilt binaries are unavailable. | ||
| - **Node version mismatch:** Relay supports Node.js `24.x` only. If your shell is on Node `25.x` or `26.x`, switch to Node `24` with `nvm use`, `fnm use 24`, or the equivalent command for your version manager before running `pnpm install` or `pnpm verify`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.