acdev 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.acdev/.env.example +0 -3
- package/README.md +11 -21
- package/bin/acdev.js +3 -13
- package/package.json +1 -2
- package/public/app.js +80 -353
- package/public/index.html +1 -33
- package/public/styles.css +7 -4
- package/src/agent.js +64 -127
- package/src/config.js +45 -151
- package/src/models.js +34 -225
- package/src/server.js +11 -50
- package/src/openrouter-auth.js +0 -37
package/.acdev/.env.example
CHANGED
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
# An API key takes precedence over subscription login:
|
|
14
14
|
# ANTHROPIC_API_KEY=sk-ant-your-key-here
|
|
15
15
|
#
|
|
16
|
-
# OpenRouter (only when llmProvider is "openrouter" in Settings / config.json):
|
|
17
|
-
# OPENROUTER_API_KEY=sk-or-your-openrouter-key
|
|
18
|
-
#
|
|
19
16
|
# Jira Cloud (only when ticketSource is "jira" in Settings / config.json):
|
|
20
17
|
# JIRA_BASE_URL=https://your-domain.atlassian.net
|
|
21
18
|
# JIRA_EMAIL=you@company.com
|
package/README.md
CHANGED
|
@@ -29,9 +29,9 @@ npm link # optional — makes `acdev` available globally
|
|
|
29
29
|
|
|
30
30
|
## Authentication
|
|
31
31
|
|
|
32
|
-
`acdev` starts even when auth is missing and prints a warning. Configure GitHub and
|
|
32
|
+
`acdev` starts even when auth is missing and prints a warning. Configure GitHub and Claude from **Settings → Authentication** in the web UI (tokens are written to `.acdev/.env`, gitignored) or by editing that file directly. Leave a Settings field blank to keep the current secret. Shell environment variables override `.env` on startup; saving in Settings updates the running process immediately so status refreshes without a restart.
|
|
33
33
|
|
|
34
|
-
Enqueueing issues, retrying jobs, and applying review feedback require
|
|
34
|
+
Enqueueing issues, retrying jobs, and applying review feedback require Claude to be authenticated (unless `--stub-agent`). Opening a PR always requires GitHub auth. The Overview banner prompts you when auth is incomplete.
|
|
35
35
|
|
|
36
36
|
`.env` is optional when you already use `gh auth login` and `claude auth login` on the machine.
|
|
37
37
|
|
|
@@ -92,12 +92,6 @@ acdev
|
|
|
92
92
|
|
|
93
93
|
A Claude.ai browser-only subscription does **not** give you an API key. API keys come from the [Claude Console](https://platform.claude.com/) and are billed separately from Pro/Max. To switch back to subscription login, clear the saved API key in Settings (or omit it from `.env`).
|
|
94
94
|
|
|
95
|
-
### OpenRouter (optional LLM provider)
|
|
96
|
-
|
|
97
|
-
In **Settings → Configuration**, set **LLM provider** to **OpenRouter**, then add your API key under **Settings → Authentication → OpenRouter authentication** (or set `OPENROUTER_API_KEY` in `.acdev/.env`). Agent runs still use the Claude Agent SDK, routed through OpenRouter’s Anthropic-compatible API (`ANTHROPIC_BASE_URL=https://openrouter.ai/api`). Choose any model from the OpenRouter dropdown (e.g. `anthropic/claude-sonnet-4`).
|
|
98
|
-
|
|
99
|
-
**Note:** OpenRouter works best with Anthropic models on OpenRouter. Some SDK versions send Anthropic-only beta headers that OpenRouter may reject; if agent runs fail with a `context-management` error, use Claude provider directly or an Anthropic model slug on OpenRouter.
|
|
100
|
-
|
|
101
95
|
## Jira ticket source
|
|
102
96
|
|
|
103
97
|
Tickets can come from **GitHub Issues** or **Jira Cloud**. Switch in **Settings → Ticket source**. The server still requires `gh` auth (PRs); Jira credentials are only required when enqueueing Jira issues.
|
|
@@ -217,19 +211,16 @@ On first run, creates `.acdev/config.json`:
|
|
|
217
211
|
| `close_issue` | Transitions to a Done-category status, or else a Done/Closed/Resolved-like name | Closes the GitHub issue |
|
|
218
212
|
|
|
219
213
|
Legacy Jira configs that only had `enabled` + `targetStatus` (no `action`) still work: when enabled, they migrate to `action: "set_status"`.
|
|
220
|
-
Supported `model` values depend on the selected LLM provider (`llmProvider` in config):
|
|
221
214
|
|
|
222
|
-
|
|
223
|
-
- **OpenRouter** (`llmProvider: "openrouter"`) — OpenRouter model slugs (e.g. `anthropic/claude-sonnet-4`, `openai/gpt-4o`).
|
|
215
|
+
Supported `model` values are Claude Agent SDK / Claude Code model ids (aliases like `claude-sonnet-5` / `claude-opus-5` / `sonnet`, or Anthropic API model ids).
|
|
224
216
|
|
|
225
|
-
The Settings model dropdown is populated by `GET /api/models
|
|
217
|
+
The Settings model dropdown is populated by `GET /api/models`:
|
|
226
218
|
|
|
227
|
-
|
|
228
|
-
2. **OpenRouter** — When `OPENROUTER_API_KEY` is set, acdev calls `GET https://openrouter.ai/api/v1/models` and merges with curated OpenRouter defaults. Without a key, shows curated OpenRouter models only.
|
|
219
|
+
When `ANTHROPIC_API_KEY` (or `ANTHROPIC_AUTH_TOKEN` / `CLAUDE_CODE_OAUTH_TOKEN`) is set — or Claude Code browser login credentials are readable — acdev calls Anthropic’s Models API and merges results with curated Claude Code aliases. Otherwise falls back to a curated list (`source: "fallback"`).
|
|
229
220
|
|
|
230
|
-
Empty or malformed model IDs in an existing config are migrated to the
|
|
221
|
+
Empty or malformed model IDs in an existing config are migrated to the default on load (`claude-sonnet-5`).
|
|
231
222
|
|
|
232
|
-
Change
|
|
223
|
+
Change model via **Settings → Configuration** (`PATCH /api/config`) or `--model`. Takes effect for the next agent run without restart.
|
|
233
224
|
|
|
234
225
|
Job state is persisted in `.acdev/state.json`.
|
|
235
226
|
|
|
@@ -245,12 +236,11 @@ npm test
|
|
|
245
236
|
|
|
246
237
|
- `bin/acdev.js` — CLI entry; soft-checks `gh` / Claude auth (warns, does not exit). Tokens in `.acdev/.env` are loaded before auth checks. Job APIs reject until auth is OK.
|
|
247
238
|
- `src/claude-auth.js` — Anthropic API key / Claude Code subscription auth detection
|
|
248
|
-
- `src/openrouter-auth.js` — OpenRouter API key detection
|
|
249
239
|
- `src/gh-auth.js` — GitHub CLI auth (`gh auth login` or `GH_TOKEN`)
|
|
250
240
|
- `src/server.js` — Express API, SSE logs, job queue, config + Jira test endpoints
|
|
251
241
|
- `src/git.js` — Worktree lifecycle (`issue-<id>` paths), `feat/`/`fix/` branch naming, diff, push
|
|
252
|
-
- `src/agent.js` — Claude Agent SDK integration
|
|
253
|
-
- `src/models.js` — `GET /api/models` list (Anthropic
|
|
242
|
+
- `src/agent.js` — Claude Agent SDK integration
|
|
243
|
+
- `src/models.js` — `GET /api/models` list (Anthropic API + curated fallback)
|
|
254
244
|
- `src/github.js` — Issue URL parsing, issue fetch via `gh`, `createPr({ draft })`
|
|
255
245
|
- `src/jira.js` — Jira Cloud parse/fetch/test + issuetype → feat/fix
|
|
256
246
|
- `src/config.js` — Load/save `.acdev/config.json` including ticket source
|
|
@@ -271,8 +261,8 @@ npm test
|
|
|
271
261
|
| `DELETE` | `/api/jobs/:id` | Clear job from history (worktree best-effort); 409 if in-flight |
|
|
272
262
|
| `POST` | `/api/jobs/:id/retry` | Re-queue failed/discarded |
|
|
273
263
|
| `GET` | `/api/config` | Editable config + curated models + Jira status (token masked) |
|
|
274
|
-
| `GET` | `/api/models` | `{ models, selected, source
|
|
275
|
-
| `PATCH` | `/api/config` | Partial update including `
|
|
264
|
+
| `GET` | `/api/models` | `{ models, selected, source }` — live Anthropic list or curated fallback |
|
|
265
|
+
| `PATCH` | `/api/config` | Partial update including `ticketSource`, `jiraBaseUrl`; secrets (`jiraEmail`, etc.) → `.env` |
|
|
276
266
|
| `POST` | `/api/jira/test` | Test Jira credentials (`GET /rest/api/3/myself`) |
|
|
277
267
|
|
|
278
268
|
### Branch naming
|
package/bin/acdev.js
CHANGED
|
@@ -4,8 +4,6 @@ import { execSync } from 'node:child_process';
|
|
|
4
4
|
import http from 'node:http';
|
|
5
5
|
import open from 'open';
|
|
6
6
|
import { checkClaudeAuth, formatClaudeAuthError } from '../src/claude-auth.js';
|
|
7
|
-
import { checkOpenRouterAuth, formatOpenRouterAuthError } from '../src/openrouter-auth.js';
|
|
8
|
-
import { isValidLlmProvider } from '../src/models.js';
|
|
9
7
|
import { checkGhAuth, formatGhAuthError } from '../src/gh-auth.js';
|
|
10
8
|
import { loadConfig } from '../src/config.js';
|
|
11
9
|
import { loadEnv } from '../src/env.js';
|
|
@@ -77,17 +75,9 @@ async function main() {
|
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
if (!opts.stubAgent) {
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
if (!openrouterAuth.ok) {
|
|
84
|
-
console.warn(formatOpenRouterAuthError(openrouterAuth));
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
const claudeAuth = checkClaudeAuth();
|
|
88
|
-
if (!claudeAuth.ok) {
|
|
89
|
-
console.warn(formatClaudeAuthError(claudeAuth));
|
|
90
|
-
}
|
|
78
|
+
const claudeAuth = checkClaudeAuth();
|
|
79
|
+
if (!claudeAuth.ok) {
|
|
80
|
+
console.warn(formatClaudeAuthError(claudeAuth));
|
|
91
81
|
}
|
|
92
82
|
} else {
|
|
93
83
|
console.log('✓ Stub agent enabled (LLM auth not required)');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acdev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Local CLI + web UI for running AI agents on GitHub issues via git worktrees",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@anthropic-ai/claude-agent-sdk": "0.1.77",
|
|
25
|
-
"acdev": "^1.0.0",
|
|
26
25
|
"dotenv": "^17.4.2",
|
|
27
26
|
"express": "^4.21.2",
|
|
28
27
|
"open": "^10.1.0",
|