@straiffi/archon 1.0.0 → 1.0.6
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/README.md +11 -86
- package/dist/server/index.js +13 -19
- package/dist/server/index.js.map +1 -1
- package/dist/server/lib/shutdown.js +35 -0
- package/dist/server/lib/shutdown.js.map +1 -0
- package/dist/server/lib/staticClient.js +8 -0
- package/dist/server/lib/staticClient.js.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Archon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Archon is a ticket-driven interface for AI-assisted code automation. Create tickets, plan features, then let an AI agent such as Claude or OpenCode implement them in isolated git worktrees.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ archon update
|
|
|
42
42
|
|
|
43
43
|
V1 targets macOS and Linux first.
|
|
44
44
|
|
|
45
|
-
## External
|
|
45
|
+
## External Tool Prerequisites
|
|
46
46
|
|
|
47
47
|
Archon does not bundle external developer tools.
|
|
48
48
|
|
|
@@ -57,44 +57,16 @@ Required or commonly expected tools:
|
|
|
57
57
|
|
|
58
58
|
If one of the optional AI tools is missing, Archon should still start, but features that depend on that binary will return actionable errors.
|
|
59
59
|
|
|
60
|
-
## How
|
|
60
|
+
## How It Works
|
|
61
61
|
|
|
62
62
|
Tickets move through three states:
|
|
63
63
|
|
|
64
|
-
1. **Plan
|
|
65
|
-
2. **Build
|
|
66
|
-
3. **Review
|
|
64
|
+
1. **Plan**: write a title and description for the feature or task
|
|
65
|
+
2. **Build**: the server spawns your configured AI tool in a new git worktree on a dedicated branch; real-time logs stream back to the UI
|
|
66
|
+
3. **Review**: an agent conducts a code review and fixes any issues found
|
|
67
67
|
|
|
68
68
|
The frontend is a React kanban board. The backend is an Express server with a SQLite database and Socket.io for live status updates.
|
|
69
69
|
|
|
70
|
-
## Development
|
|
71
|
-
|
|
72
|
-
For normal source development, use the repo checkout workflow instead of the packaged CLI.
|
|
73
|
-
|
|
74
|
-
Install dependencies from the repository root:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm install
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Start dev mode:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm run start:dev
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
`npm run start:dev` is the primary local development command. It keeps the Express server and Vite frontend as separate processes and configures the dev database plus API base URL overrides for you.
|
|
87
|
-
|
|
88
|
-
Other useful commands:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npm run build
|
|
92
|
-
npm test
|
|
93
|
-
npm run smoke:package
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
`npm run smoke:package` builds the package, installs the packed tarball into a temporary npm prefix, runs `archon --version`, starts `archon --no-open`, fetches the app shell and an API route, then shuts it down.
|
|
97
|
-
|
|
98
70
|
## Project Setup
|
|
99
71
|
|
|
100
72
|
After Archon starts, create a project from the UI:
|
|
@@ -105,7 +77,7 @@ After Archon starts, create a project from the UI:
|
|
|
105
77
|
4. Optionally open `Advanced settings` to review or edit setup, service, worktree sync, and IDE settings
|
|
106
78
|
5. Save the project, select it in the project switcher, and create tickets inside that project
|
|
107
79
|
|
|
108
|
-
## Project
|
|
80
|
+
## Project Configuration
|
|
109
81
|
|
|
110
82
|
Archon stores repository and run settings per project in its database. Use the project form in the UI to configure each project.
|
|
111
83
|
|
|
@@ -158,7 +130,7 @@ IDE command: code --reuse-window
|
|
|
158
130
|
|
|
159
131
|
Each ticket gets its own worktree and branch derived from the ticket title, using the active project's repository settings. Archon reuses an existing local branch when one already exists; otherwise it creates a new branch for the worktree.
|
|
160
132
|
|
|
161
|
-
## Data
|
|
133
|
+
## Data Storage
|
|
162
134
|
|
|
163
135
|
Archon keeps runtime state out of the installed package tree.
|
|
164
136
|
|
|
@@ -171,54 +143,7 @@ Default database locations:
|
|
|
171
143
|
|
|
172
144
|
You can override the database location with `DB_PATH`.
|
|
173
145
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
Older local development runs may already have data in one of these files:
|
|
146
|
+
## Development And Maintenance
|
|
177
147
|
|
|
178
|
-
- `
|
|
179
|
-
- `
|
|
180
|
-
|
|
181
|
-
Recommended manual migration flow:
|
|
182
|
-
|
|
183
|
-
1. Stop all Archon dev and production processes.
|
|
184
|
-
2. Back up the source database and any current production database.
|
|
185
|
-
3. Create the production app-data directory if it does not exist.
|
|
186
|
-
4. Copy the chosen development database to the production database path.
|
|
187
|
-
5. If SQLite sidecar files such as `-wal` or `-shm` exist, only copy them while Archon is fully stopped.
|
|
188
|
-
6. Start Archon normally and let its startup schema checks apply any missing migrations.
|
|
189
|
-
|
|
190
|
-
If you want to run production Archon against an existing database temporarily, launch it with:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
DB_PATH=/path/to/archon-dev.db archon
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Release Process
|
|
197
|
-
|
|
198
|
-
Archon uses a manual GitHub Actions release workflow.
|
|
199
|
-
|
|
200
|
-
### GitHub setup
|
|
201
|
-
|
|
202
|
-
1. Publish the npm package scope or package name from the npm account or organization that owns `@straiffi/archon`.
|
|
203
|
-
2. Add an `NPM_TOKEN` repository secret in GitHub with publish access to that package.
|
|
204
|
-
3. Run the `Release` workflow from the `main` branch.
|
|
205
|
-
4. Choose one of `patch`, `minor`, or `major` for `release_type`.
|
|
206
|
-
|
|
207
|
-
The workflow will:
|
|
208
|
-
|
|
209
|
-
1. install dependencies
|
|
210
|
-
2. run type checks, lint, tests, build, tarball validation, and packaged-install smoke checks
|
|
211
|
-
3. run `npm version <release_type>`
|
|
212
|
-
4. publish with `npm publish --access public`
|
|
213
|
-
5. push the version commit and git tag back to GitHub
|
|
214
|
-
|
|
215
|
-
### Local release dry run
|
|
216
|
-
|
|
217
|
-
Before running the workflow, you can validate the release path locally with:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
npm install
|
|
221
|
-
npm run build
|
|
222
|
-
npm run smoke:package
|
|
223
|
-
npm pack --dry-run
|
|
224
|
-
```
|
|
148
|
+
- Contributor workflow: [`DEVELOPMENT.md`](https://github.com/Straiffi/Archon/blob/main/DEVELOPMENT.md)
|
|
149
|
+
- Release workflow: [`RELEASING.md`](https://github.com/Straiffi/Archon/blob/main/RELEASING.md)
|
package/dist/server/index.js
CHANGED
|
@@ -31,7 +31,8 @@ import { exportProjectMemoryArchive, importProjectMemoryArchive } from './lib/pr
|
|
|
31
31
|
import { buildReviewFindingsResponse, computeDiffSignature, getLatestReviewRunForContext } from './lib/reviewFindings.js';
|
|
32
32
|
import { getDiscoveredSkills, normalizeSkillNames } from './lib/skills.js';
|
|
33
33
|
import { clearAllPreviewProxies } from './lib/previewProxy.js';
|
|
34
|
-
import {
|
|
34
|
+
import { shutdownRealtimeServer } from './lib/shutdown.js';
|
|
35
|
+
import { resolveClientBuildPaths, shouldServeClientApp, STATIC_CLIENT_DIRECTORY_OPTIONS, STATIC_CLIENT_INDEX_OPTIONS, } from './lib/staticClient.js';
|
|
35
36
|
import { deleteIntegrationConnection, getGitHubConnectionConfig, getJiraConnectionConfig, listIntegrationConnections, upsertIntegrationConnection, } from './lib/integrations/index.js';
|
|
36
37
|
import { createGitHubPullRequest, findOpenGitHubPullRequest, findOpenGitHubPullRequestByHeadBranch, getGitHubPullRequestComments, getGitHubPullRequestReviews, getGitHubPullRequest, GitHubApiError, hasGitHubRemoteBranch, resolveGitHubRepository, validateGitHubConnection, } from './lib/integrations/github.js';
|
|
37
38
|
import { importJiraIssue, JiraApiError, validateJiraConnection } from './lib/integrations/jira.js';
|
|
@@ -5017,7 +5018,7 @@ app.delete('/tickets/:id', async (req, res) => {
|
|
|
5017
5018
|
});
|
|
5018
5019
|
const clientBuild = resolveClientBuildPaths(import.meta.url);
|
|
5019
5020
|
if (clientBuild) {
|
|
5020
|
-
app.use(express.static(clientBuild.directoryPath,
|
|
5021
|
+
app.use(express.static(clientBuild.directoryPath, STATIC_CLIENT_DIRECTORY_OPTIONS));
|
|
5021
5022
|
app.get(/.*/, (req, res, next) => {
|
|
5022
5023
|
if (!shouldServeClientApp({
|
|
5023
5024
|
method: req.method,
|
|
@@ -5027,7 +5028,7 @@ if (clientBuild) {
|
|
|
5027
5028
|
next();
|
|
5028
5029
|
return;
|
|
5029
5030
|
}
|
|
5030
|
-
res.sendFile(clientBuild.indexPath, error => {
|
|
5031
|
+
res.sendFile(clientBuild.indexPath, STATIC_CLIENT_INDEX_OPTIONS, error => {
|
|
5031
5032
|
if (error) {
|
|
5032
5033
|
next(error);
|
|
5033
5034
|
}
|
|
@@ -5084,22 +5085,15 @@ export const startServer = ({ port = DEFAULT_PORT, host } = {}) => {
|
|
|
5084
5085
|
});
|
|
5085
5086
|
};
|
|
5086
5087
|
export const shutdownServer = async (signal) => {
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
reject(error);
|
|
5097
|
-
return;
|
|
5098
|
-
}
|
|
5099
|
-
resolve();
|
|
5100
|
-
});
|
|
5101
|
-
});
|
|
5102
|
-
}
|
|
5088
|
+
await shutdownRealtimeServer({
|
|
5089
|
+
signal,
|
|
5090
|
+
io,
|
|
5091
|
+
httpServer,
|
|
5092
|
+
closeAllTerminalSessions,
|
|
5093
|
+
clearAllPreviewProxies,
|
|
5094
|
+
stopAllBuildAgents,
|
|
5095
|
+
stopAllTickets,
|
|
5096
|
+
});
|
|
5103
5097
|
};
|
|
5104
5098
|
export const registerShutdownHandlers = () => {
|
|
5105
5099
|
const createHandler = (signal) => {
|