Skip to content

Commit 8d5d54a

Browse files
committed
Update README, add MIT license, add GitHub Pages deploy action
Rewrite README to reflect current state: deployment modes, follow-up loop, billing, budget controls, all env vars, pm2 config. Switch license from ISC to MIT. Add GitHub Actions workflow to build and deploy the static app to GitHub Pages on push to main.
1 parent d6b07f4 commit 8d5d54a

4 files changed

Lines changed: 96 additions & 3 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: yarn
27+
28+
- run: yarn install --frozen-lockfile
29+
30+
- run: yarn workspace @grog/shared build
31+
32+
- run: yarn workspace @grog/app build
33+
env:
34+
VITE_BASE: /grog/
35+
36+
- uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: app/dist
39+
40+
deploy:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
steps:
47+
- id: deployment
48+
uses: actions/deploy-pages@v4

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Turing Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,34 @@ Grog is an autonomous GitHub issue solver. Point it at an issue, and it uses Cla
1515
2. The webhook hits the agent server
1616
3. The agent clones the repo, spawns Claude, and works on the fix
1717
4. When done, it pushes a branch and opens a pull request
18+
5. If the agent needs clarification, it asks — and picks back up when you reply
1819

1920
## Architecture
2021

2122
```
2223
grog/
23-
shared/ - Shared TypeScript library (types, state, GitHub API, auth)
24+
shared/ - Shared TypeScript library (types, state, GitHub API, auth, billing)
2425
agent/ - Self-hosted agent server (webhook, dashboard, runner, poll loop)
2526
api/ - SaaS API server (OAuth, billing, Stripe)
2627
app/ - SaaS frontend (React)
2728
skill/ - Claude Code CLI skills (/grog-solve, /grog-explore, /grog-review, /grog-answer)
29+
pm2/ - PM2 ecosystem config for production
2830
```
2931

32+
## Deployment Modes
33+
34+
### 1. Self-Host (free)
35+
36+
Run the agent on your own machine. You bring your own Anthropic API key and Claude Code CLI. No billing, no limits — just `yarn dev:agent` and go.
37+
38+
### 2. SaaS with Credits
39+
40+
Hosted by Turing Labs. Pay-per-token via credit packs (Stripe). 10,000 tokens = 1 credit. Credits are automatically deducted after each job completes.
41+
42+
### 3. Dedicated (coming soon)
43+
44+
Dedicated VPS per customer with managed infrastructure.
45+
3046
## Self-Host Setup
3147

3248
### Prerequisites
@@ -128,14 +144,18 @@ On any issue in a repo where the app is installed, comment:
128144

129145
The agent will pick it up, work on it, and open a PR.
130146

147+
## Follow-up Loop
148+
149+
When the agent can't solve an issue on the first pass, it posts a comment asking for clarification and sets the job to `waiting_for_reply`. When you reply and mention the bot again, the agent re-runs with the full conversation — the new reply is highlighted so Claude knows exactly what changed.
150+
131151
## Dashboard
132152

133153
The agent includes a built-in terminal-style dashboard at `http://localhost:3000`:
134154

135155
- **Job list** — all jobs with status, repo, issue, age, token usage
136156
- **Live terminal** — click any job to see real-time Claude output (SSE streaming)
137157
- **Stop/Start** — pause and resume jobs from the terminal panel
138-
- **Budget display** — token usage tracking in the header
158+
- **Budget display** — token usage tracking with hourly/daily limits in the header
139159
- **App status** — shows connected GitHub App with disconnect option
140160

141161
## Production Deployment (PM2)
@@ -159,6 +179,9 @@ For webhooks to work in production, your agent needs a public URL. Set the webho
159179
| `MAX_RETRIES` | No | `2` | Retries for transient failures |
160180
| `DAILY_TOKEN_BUDGET` | No | `0` (unlimited) | Daily token limit |
161181
| `HOURLY_TOKEN_BUDGET` | No | `0` (unlimited) | Hourly token limit |
182+
| `LOG_LEVEL` | No | `info` | `debug`, `info`, `warn`, `error` |
183+
| `LOG_FORMAT` | No | human-readable | Set to `json` for structured output |
184+
| `STRIPE_SECRET_KEY` | No || Enable billing (SaaS mode) |
162185

163186
The GitHub App credentials (App ID, private key, installation ID) are stored in MongoDB and configured through the dashboard — no need to put them in `.env`.
164187

@@ -181,4 +204,4 @@ Then in any Claude Code session:
181204

182205
## License
183206

184-
ISC
207+
MIT

app/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
33

44
export default defineConfig({
5+
base: process.env.VITE_BASE || "/",
56
plugins: [react()],
67
server: {
78
port: 5173,

0 commit comments

Comments
 (0)