@nairon-ai/aegis 0.2.0 → 0.4.0
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 +76 -11
- package/dist-node/cli/commands/disconnect.d.ts +3 -0
- package/dist-node/cli/commands/disconnect.d.ts.map +1 -0
- package/dist-node/cli/commands/disconnect.js +59 -0
- package/dist-node/cli/commands/disconnect.js.map +1 -0
- package/dist-node/cli/commands/init.d.ts.map +1 -1
- package/dist-node/cli/commands/init.js +15 -6
- package/dist-node/cli/commands/init.js.map +1 -1
- package/dist-node/cli/commands/setup.d.ts.map +1 -1
- package/dist-node/cli/commands/setup.js +199 -26
- package/dist-node/cli/commands/setup.js.map +1 -1
- package/dist-node/cli/github-app-flow.d.ts +9 -0
- package/dist-node/cli/github-app-flow.d.ts.map +1 -0
- package/dist-node/cli/github-app-flow.js +190 -0
- package/dist-node/cli/github-app-flow.js.map +1 -0
- package/dist-node/cli/index.js +16 -1
- package/dist-node/cli/index.js.map +1 -1
- package/dist-node/cli/state.d.ts.map +1 -1
- package/dist-node/cli/state.js +5 -0
- package/dist-node/cli/state.js.map +1 -1
- package/dist-node/github/manifest.d.ts +13 -3
- package/dist-node/github/manifest.d.ts.map +1 -1
- package/dist-node/github/manifest.js +19 -10
- package/dist-node/github/manifest.js.map +1 -1
- package/docs/SETUP.md +73 -7
- package/package.json +1 -1
- package/src/cli/commands/disconnect.ts +70 -0
- package/src/cli/commands/init.ts +15 -6
- package/src/cli/commands/setup.ts +205 -42
- package/src/cli/github-app-flow.ts +248 -0
- package/src/cli/index.ts +18 -1
- package/src/cli/state.ts +5 -0
- package/src/github/manifest.ts +26 -10
package/README.md
CHANGED
|
@@ -22,19 +22,68 @@ Minimal fix branch -> PR -> stop
|
|
|
22
22
|
|
|
23
23
|
## Start Here
|
|
24
24
|
|
|
25
|
-
If you want to connect Aegis to another repo and monitor its bugs,
|
|
25
|
+
If you want to connect Aegis to another repo and monitor its bugs, run Aegis from the product repo you want it to fix.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
For example, if Aegis should monitor `KeyLead-Team/keylead`, run every setup command from your local KeyLead checkout:
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
```bash
|
|
30
|
+
cd ~/Desktop/keylead
|
|
31
|
+
npx --yes @nairon-ai/aegis@latest init
|
|
32
|
+
npx --yes @nairon-ai/aegis@latest setup
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
First prove Aegis can see a ready bug locally:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx --yes @nairon-ai/aegis@latest status
|
|
39
|
+
npx --yes @nairon-ai/aegis@latest pickup --dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Only deploy after `pickup --dry-run` finds the test issue.
|
|
43
|
+
|
|
44
|
+
Full setup guide: [docs/SETUP.md](docs/SETUP.md).
|
|
45
|
+
|
|
46
|
+
### First Local Test
|
|
47
|
+
|
|
48
|
+
No Cloudflare required for this part.
|
|
49
|
+
|
|
50
|
+
1. `cd` into the product repo Aegis should monitor.
|
|
51
|
+
2. Run `npx --yes @nairon-ai/aegis@latest init`.
|
|
52
|
+
3. Run `npx --yes @nairon-ai/aegis@latest setup`.
|
|
53
|
+
4. Choose `One-click GitHub App` unless you already know how to create a GitHub token.
|
|
54
|
+
5. Choose `plan-first` and `minimal` for the first test.
|
|
55
|
+
6. Add `bug` and `ready to implement` labels to the monitored GitHub repo.
|
|
56
|
+
7. Create a test bug issue with both labels.
|
|
57
|
+
8. Run `npx --yes @nairon-ai/aegis@latest pickup --dry-run`.
|
|
58
|
+
|
|
59
|
+
Good first result:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
github:#123 would run - ready bug with enough context
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If you see `No ready bugs found`, check `MONITORED_REPO`, exact label names, issue state, and GitHub token access.
|
|
66
|
+
|
|
67
|
+
### GitHub Access Choices
|
|
68
|
+
|
|
69
|
+
During `setup`, choose one:
|
|
70
|
+
|
|
71
|
+
- `One-click GitHub App`: recommended. Aegis opens a browser page, creates the app, asks you to install it on the repo, then saves the credentials.
|
|
72
|
+
- `GitHub token`: quick local test if you already know how to create fine-grained GitHub tokens.
|
|
73
|
+
- `Paste existing GitHub App credentials`: only if you already made an app manually.
|
|
74
|
+
|
|
75
|
+
The repo prompt accepts either `owner/repo` or a full GitHub URL like `https://github.com/KeyLead-Team/keylead`.
|
|
76
|
+
|
|
77
|
+
### Deployed AFK Mode
|
|
78
|
+
|
|
79
|
+
Deploy only after the local dry-run works.
|
|
80
|
+
|
|
81
|
+
1. Create a Cloudflare account.
|
|
82
|
+
2. Enable Workers Paid.
|
|
83
|
+
3. Start Docker locally.
|
|
84
|
+
4. Log in with `npx wrangler login`.
|
|
85
|
+
5. Run `npx --yes @nairon-ai/aegis@latest deploy`.
|
|
86
|
+
6. Add GitHub/Linear/Telegram webhooks using the Worker URL printed by deploy.
|
|
38
87
|
|
|
39
88
|
## Two Repos
|
|
40
89
|
|
|
@@ -116,6 +165,22 @@ npx @nairon-ai/aegis deploy
|
|
|
116
165
|
|
|
117
166
|
Then configure webhooks using the Worker URL printed by deploy. Full details: [docs/SETUP.md](docs/SETUP.md).
|
|
118
167
|
|
|
168
|
+
## Disconnect Aegis
|
|
169
|
+
|
|
170
|
+
Run this from the product repo to print the shutdown checklist:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx --yes @nairon-ai/aegis@latest disconnect
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
To fully stop using Aegis:
|
|
177
|
+
|
|
178
|
+
1. Delete the Cloudflare Worker if deployed: `npx wrangler delete aegis-worker`.
|
|
179
|
+
2. Uninstall the Aegis GitHub App from the repo, or revoke the GitHub token.
|
|
180
|
+
3. Delete Aegis webhooks from GitHub, Linear, and Telegram if configured.
|
|
181
|
+
4. Remove local config: `rm -rf .aegis`.
|
|
182
|
+
5. Optionally remove Aegis-only labels: `aegis:in-progress`, `aegis:needs-info`, `aegis:blocked`, `aegis:pr-opened`.
|
|
183
|
+
|
|
119
184
|
## How Pickup Works
|
|
120
185
|
|
|
121
186
|
Aegis scans every 10 minutes and also reacts to GitHub/Linear webhooks.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disconnect.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/disconnect.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,qDAQ5B,CAAC;AAEH,wBAAgB,kBAAkB,IAAI,IAAI,CAuDzC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
import { consola } from "consola";
|
|
3
|
+
import { loadConfig } from "../state.js";
|
|
4
|
+
export const disconnectCommand = defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "disconnect",
|
|
7
|
+
description: "Show how to fully disconnect Aegis from this repo",
|
|
8
|
+
},
|
|
9
|
+
run() {
|
|
10
|
+
runDisconnectGuide();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export function runDisconnectGuide() {
|
|
14
|
+
const config = loadConfig();
|
|
15
|
+
const workerName = "aegis-worker";
|
|
16
|
+
const repo = config.monitoredRepo ?? "your GitHub repo";
|
|
17
|
+
consola.log("\n Disconnect Aegis\n");
|
|
18
|
+
consola.log("This prints the safe shutdown checklist. It does not delete anything automatically.\n");
|
|
19
|
+
consola.log("1. Stop the cloud worker");
|
|
20
|
+
consola.log(" If you deployed Aegis, delete the Cloudflare Worker:");
|
|
21
|
+
consola.log(` npx wrangler delete ${workerName}`);
|
|
22
|
+
consola.log(" Also remove any Cloudflare secrets for Aegis if they remain.\n");
|
|
23
|
+
consola.log("2. Remove GitHub access");
|
|
24
|
+
if (config.githubAppId) {
|
|
25
|
+
consola.log(" You used a GitHub App.");
|
|
26
|
+
consola.log(` Open GitHub -> ${repo} -> Settings -> GitHub Apps, then uninstall the Aegis app.`);
|
|
27
|
+
consola.log(" Or open your GitHub account/org settings -> GitHub Apps -> Aegis -> Uninstall.");
|
|
28
|
+
}
|
|
29
|
+
else if (config.githubToken) {
|
|
30
|
+
consola.log(" You used a GitHub token.");
|
|
31
|
+
consola.log(" Open https://github.com/settings/personal-access-tokens");
|
|
32
|
+
consola.log(" Find the token you created for Aegis and revoke/delete it.");
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
consola.log(" No GitHub token/app is saved in local config.");
|
|
36
|
+
}
|
|
37
|
+
consola.log("");
|
|
38
|
+
consola.log("3. Remove webhooks");
|
|
39
|
+
consola.log(` GitHub: open ${repo} -> Settings -> Webhooks, delete the Aegis webhook.`);
|
|
40
|
+
if (config.linearApiKey) {
|
|
41
|
+
consola.log(" Linear: open Linear Settings -> API/Webhooks, delete the Aegis webhook.");
|
|
42
|
+
}
|
|
43
|
+
if (config.telegramBotToken) {
|
|
44
|
+
consola.log(" Telegram: remove the webhook:");
|
|
45
|
+
consola.log(' curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/deleteWebhook"');
|
|
46
|
+
}
|
|
47
|
+
consola.log("");
|
|
48
|
+
consola.log("4. Remove local config from this repo");
|
|
49
|
+
consola.log(" rm -rf .aegis");
|
|
50
|
+
consola.log(" If you installed Aegis as a dev dependency:");
|
|
51
|
+
consola.log(" npm remove @nairon-ai/aegis");
|
|
52
|
+
consola.log("");
|
|
53
|
+
consola.log("5. Optional cleanup");
|
|
54
|
+
consola.log(" Leave labels like bug and ready to implement if your team uses them.");
|
|
55
|
+
consola.log(" Remove Aegis-only labels if you do not want them:");
|
|
56
|
+
consola.log(" aegis:in-progress, aegis:needs-info, aegis:blocked, aegis:pr-opened");
|
|
57
|
+
consola.log("");
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=disconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAkGA,eAAO,MAAM,WAAW,qDAKtB,CAAC;AAEH,wBAAgB,OAAO,IAAI,IAAI,CAc9B"}
|
|
@@ -55,9 +55,9 @@ This directory configures Aegis for this repository.
|
|
|
55
55
|
## First Run
|
|
56
56
|
|
|
57
57
|
\`\`\`bash
|
|
58
|
-
npx @nairon-ai/aegis setup
|
|
59
|
-
npx @nairon-ai/aegis pickup --dry-run
|
|
60
|
-
npx @nairon-ai/aegis deploy
|
|
58
|
+
npx --yes @nairon-ai/aegis@latest setup
|
|
59
|
+
npx --yes @nairon-ai/aegis@latest pickup --dry-run
|
|
60
|
+
npx --yes @nairon-ai/aegis@latest deploy
|
|
61
61
|
\`\`\`
|
|
62
62
|
|
|
63
63
|
For the first test, use:
|
|
@@ -84,6 +84,14 @@ Telegram: https://YOUR_WORKER.workers.dev/webhook/telegram
|
|
|
84
84
|
\`\`\`
|
|
85
85
|
|
|
86
86
|
Keep \`.aegis/.env\` out of git.
|
|
87
|
+
|
|
88
|
+
## Disconnect
|
|
89
|
+
|
|
90
|
+
\`\`\`bash
|
|
91
|
+
npx --yes @nairon-ai/aegis@latest disconnect
|
|
92
|
+
\`\`\`
|
|
93
|
+
|
|
94
|
+
This prints the checklist for removing the Worker, GitHub access, webhooks, and local config.
|
|
87
95
|
`;
|
|
88
96
|
export const initCommand = defineCommand({
|
|
89
97
|
meta: { name: "init", description: "Scaffold .aegis config in this repo" },
|
|
@@ -98,11 +106,12 @@ export function runInit() {
|
|
|
98
106
|
writeIfMissing(resolve(PROJECT_AEGIS_DIR, "README.md"), README);
|
|
99
107
|
consola.success("Created .aegis/");
|
|
100
108
|
consola.log("\nNext:");
|
|
101
|
-
consola.log(" 1. npx @nairon-ai/aegis setup");
|
|
109
|
+
consola.log(" 1. npx --yes @nairon-ai/aegis@latest setup");
|
|
102
110
|
consola.log(" 2. create GitHub labels: bug, ready to implement");
|
|
103
111
|
consola.log(" 3. create a tiny test bug issue");
|
|
104
|
-
consola.log(" 4. npx @nairon-ai/aegis pickup --dry-run");
|
|
105
|
-
consola.log(" 5. npx @nairon-ai/aegis deploy");
|
|
112
|
+
consola.log(" 4. npx --yes @nairon-ai/aegis@latest pickup --dry-run");
|
|
113
|
+
consola.log(" 5. npx --yes @nairon-ai/aegis@latest deploy");
|
|
114
|
+
consola.log(" Later: npx --yes @nairon-ai/aegis@latest disconnect");
|
|
106
115
|
consola.log("");
|
|
107
116
|
}
|
|
108
117
|
function writeIfMissing(path, contents) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CnB,CAAC;AAEF,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO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AAS,cAAc,CAAC,IAAY,EAAE,QAAgB;IACrD,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;QACzC,OAAO;IACR,CAAC;IACD,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/setup.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,qDAKvB,CAAC;AAEH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBpD"}
|
|
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { consola } from "consola";
|
|
5
|
+
import { runGitHubAppFlow } from "../github-app-flow.js";
|
|
5
6
|
import { resolveEnvFileForWrite } from "../paths.js";
|
|
6
7
|
import { detectSetupState, printState, saveConfig } from "../state.js";
|
|
7
8
|
export const setupCommand = defineCommand({
|
|
@@ -27,46 +28,96 @@ export async function runSetupWizard() {
|
|
|
27
28
|
consola.log("\nNext:");
|
|
28
29
|
consola.log(" 1. Create labels in the monitored repo: bug, ready to implement");
|
|
29
30
|
consola.log(" 2. Create a test GitHub issue with both labels");
|
|
30
|
-
consola.log(" 3. npx @nairon-ai/aegis pickup --dry-run");
|
|
31
|
-
consola.log(" 4. npx @nairon-ai/aegis deploy");
|
|
31
|
+
consola.log(" 3. npx --yes @nairon-ai/aegis@latest pickup --dry-run");
|
|
32
|
+
consola.log(" 4. npx --yes @nairon-ai/aegis@latest deploy");
|
|
32
33
|
consola.log(" 5. Add GitHub/Linear/Telegram webhook URLs after deploy");
|
|
34
|
+
consola.log(" Later: npx --yes @nairon-ai/aegis@latest disconnect");
|
|
33
35
|
consola.log("");
|
|
34
36
|
}
|
|
35
37
|
async function setupRepo(config) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
printStep("Step 1: choose the GitHub repo Aegis should fix", [
|
|
39
|
+
"This is your product repo, not the Aegis repo.",
|
|
40
|
+
"Paste the GitHub URL from your browser, or type owner/repo.",
|
|
41
|
+
"Example: https://github.com/KeyLead-Team/keylead",
|
|
42
|
+
]);
|
|
43
|
+
config.monitoredRepo = normalizeGitHubRepo(await promptText("Repo to monitor:", config.monitoredRepo));
|
|
44
|
+
printStep("Step 2: choose the base branch", [
|
|
45
|
+
"This is the branch Aegis will open PRs against.",
|
|
46
|
+
"Most repos use main. If your repo uses master, develop, or staging, enter that.",
|
|
47
|
+
]);
|
|
48
|
+
config.baseBranch = await promptText("Base branch:", config.baseBranch ?? detectCurrentBranch());
|
|
38
49
|
}
|
|
39
50
|
async function setupGitHub(config) {
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
printStep("Step 3: give Aegis GitHub access", [
|
|
52
|
+
"Aegis needs permission to read issues, create branches, push fixes, and open PRs.",
|
|
53
|
+
"If you are unsure, choose the one-click GitHub App. It opens GitHub in your browser and avoids manual tokens.",
|
|
54
|
+
"Use a GitHub token only if you already know how to create fine-grained tokens.",
|
|
55
|
+
]);
|
|
42
56
|
const method = (await consola.prompt("Auth method:", {
|
|
43
57
|
type: "select",
|
|
44
58
|
options: [
|
|
45
|
-
{ label: "GitHub App (recommended)", value: "app" },
|
|
46
|
-
{ label: "GitHub token (
|
|
59
|
+
{ label: "One-click GitHub App (recommended)", value: "app-flow" },
|
|
60
|
+
{ label: "GitHub token (quick local test)", value: "token" },
|
|
61
|
+
{ label: "Paste existing GitHub App credentials", value: "app-manual" },
|
|
47
62
|
],
|
|
48
63
|
}));
|
|
49
64
|
if (method === "token") {
|
|
50
|
-
|
|
65
|
+
printStep("Create a fine-grained GitHub token", [
|
|
66
|
+
"Open: https://github.com/settings/personal-access-tokens/new",
|
|
67
|
+
"Token name: Aegis",
|
|
68
|
+
"Repository access: Only select repositories, then choose the repo from Step 1.",
|
|
69
|
+
"Repository permissions: Contents read/write, Issues read/write, Pull requests read/write.",
|
|
70
|
+
"Metadata stays read-only automatically.",
|
|
71
|
+
"Click Generate token, then paste the token here. It usually starts with github_pat_.",
|
|
72
|
+
"Keep it secret. Aegis saves it to .aegis/.env, which should not be committed.",
|
|
73
|
+
]);
|
|
74
|
+
config.githubToken = await promptText("Paste GitHub token:", config.githubToken);
|
|
75
|
+
config.githubAppId = undefined;
|
|
76
|
+
config.githubAppPrivateKey = undefined;
|
|
77
|
+
config.githubInstallationId = undefined;
|
|
51
78
|
}
|
|
52
|
-
else {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
else if (method === "app-flow") {
|
|
80
|
+
if (!config.monitoredRepo) {
|
|
81
|
+
consola.warn("Set the monitored repo first.");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
printStep("Create the GitHub App in your browser", [
|
|
85
|
+
"Aegis will open a local setup page.",
|
|
86
|
+
"Click Create GitHub App.",
|
|
87
|
+
"Then click Install and choose Only select repositories.",
|
|
88
|
+
"Select the repo from Step 1, then approve the install.",
|
|
89
|
+
"When GitHub sends you back, this CLI saves the credentials automatically.",
|
|
90
|
+
]);
|
|
91
|
+
try {
|
|
92
|
+
const app = await runGitHubAppFlow({
|
|
93
|
+
monitoredRepo: config.monitoredRepo,
|
|
94
|
+
workerUrl: config.workerUrl,
|
|
95
|
+
});
|
|
96
|
+
config.githubAppId = app.appId;
|
|
97
|
+
config.githubAppPrivateKey = Buffer.from(app.privateKey, "utf-8").toString("base64");
|
|
98
|
+
config.githubInstallationId = app.installationId;
|
|
99
|
+
config.githubWebhookSecret = app.webhookSecret;
|
|
100
|
+
config.githubToken = undefined;
|
|
101
|
+
consola.success("Saved GitHub App credentials from GitHub.");
|
|
64
102
|
}
|
|
65
|
-
|
|
66
|
-
|
|
103
|
+
catch (error) {
|
|
104
|
+
consola.warn(error instanceof Error ? error.message : String(error));
|
|
105
|
+
consola.info("Falling back to manual GitHub App credentials.");
|
|
106
|
+
await setupGitHubAppManual(config);
|
|
67
107
|
}
|
|
68
|
-
config.githubInstallationId = await promptText("GitHub App installation ID:", config.githubInstallationId);
|
|
69
108
|
}
|
|
109
|
+
else {
|
|
110
|
+
await setupGitHubAppManual(config);
|
|
111
|
+
}
|
|
112
|
+
if (config.githubWebhookSecret) {
|
|
113
|
+
consola.info("GitHub webhook secret is already configured.");
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
printStep("GitHub webhook secret", [
|
|
117
|
+
"This protects webhook calls from GitHub after you deploy.",
|
|
118
|
+
"Choose yes and Aegis will generate a random secret for you.",
|
|
119
|
+
"You do not need to remember it; it is saved in .aegis/.env.",
|
|
120
|
+
]);
|
|
70
121
|
const generateSecret = (await consola.prompt("Generate a GitHub webhook secret?", {
|
|
71
122
|
type: "confirm",
|
|
72
123
|
initial: !config.githubWebhookSecret,
|
|
@@ -78,14 +129,51 @@ async function setupGitHub(config) {
|
|
|
78
129
|
consola.info("Use this same value when you add the GitHub App or repo webhook.");
|
|
79
130
|
}
|
|
80
131
|
}
|
|
132
|
+
async function setupGitHubAppManual(config) {
|
|
133
|
+
printStep("Paste existing GitHub App credentials", [
|
|
134
|
+
"Use this only if you already created a GitHub App manually.",
|
|
135
|
+
"You need the App ID, the private key .pem file, and the installation ID.",
|
|
136
|
+
"If that sounds unfamiliar, cancel and rerun setup with the one-click GitHub App option.",
|
|
137
|
+
]);
|
|
138
|
+
config.githubAppId = await promptText("GitHub App ID:", config.githubAppId);
|
|
139
|
+
const keyPath = await promptText("Path to GitHub App private key .pem:", undefined);
|
|
140
|
+
if (keyPath) {
|
|
141
|
+
const resolved = resolve(keyPath.replace(/^~/, process.env.HOME ?? "~"));
|
|
142
|
+
if (existsSync(resolved)) {
|
|
143
|
+
config.githubAppPrivateKey = Buffer.from(readFileSync(resolved, "utf-8")).toString("base64");
|
|
144
|
+
consola.success("Loaded private key");
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
consola.warn(`File not found: ${resolved}`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (!config.githubAppPrivateKey) {
|
|
151
|
+
config.githubAppPrivateKey = Buffer.from(await promptText("Paste GitHub App private key PEM:", config.githubAppPrivateKey)).toString("base64");
|
|
152
|
+
}
|
|
153
|
+
config.githubInstallationId = await promptText("GitHub App installation ID:", config.githubInstallationId);
|
|
154
|
+
config.githubToken = undefined;
|
|
155
|
+
}
|
|
81
156
|
async function setupLinear(config) {
|
|
157
|
+
printStep("Step 4: optional Linear connection", [
|
|
158
|
+
"Use this only if your team tracks bugs in Linear.",
|
|
159
|
+
"If you only use GitHub Issues, choose no.",
|
|
160
|
+
"You can rerun setup later to add Linear.",
|
|
161
|
+
]);
|
|
82
162
|
const enable = (await consola.prompt("Connect Linear too?", {
|
|
83
163
|
type: "confirm",
|
|
84
164
|
initial: Boolean(config.linearApiKey),
|
|
85
165
|
}));
|
|
86
166
|
if (!enable)
|
|
87
167
|
return;
|
|
168
|
+
printStep("Linear API key", [
|
|
169
|
+
"Open Linear settings, create a personal API key, then paste it here.",
|
|
170
|
+
"Aegis uses it to read ready bug tickets and comment with status updates.",
|
|
171
|
+
]);
|
|
88
172
|
config.linearApiKey = await promptText("Linear API key:", config.linearApiKey);
|
|
173
|
+
printStep("Linear webhook secret", [
|
|
174
|
+
"This protects Linear webhook calls after deploy.",
|
|
175
|
+
"Choose yes and Aegis will generate one.",
|
|
176
|
+
]);
|
|
89
177
|
const generateSecret = (await consola.prompt("Generate a Linear webhook signing secret?", {
|
|
90
178
|
type: "confirm",
|
|
91
179
|
initial: !config.linearWebhookSecret,
|
|
@@ -93,8 +181,16 @@ async function setupLinear(config) {
|
|
|
93
181
|
config.linearWebhookSecret = generateSecret
|
|
94
182
|
? crypto.randomUUID()
|
|
95
183
|
: await promptText("Linear webhook signing secret:", config.linearWebhookSecret);
|
|
184
|
+
printStep("Linear team/project", [
|
|
185
|
+
"Team ID is required so Aegis knows which Linear team to watch.",
|
|
186
|
+
"Project ID is optional. Leave it blank to watch the whole team.",
|
|
187
|
+
]);
|
|
96
188
|
config.linearTeamId = await promptText("Linear team ID:", config.linearTeamId);
|
|
97
189
|
config.linearProjectId = await promptText("Linear project ID (optional):", config.linearProjectId);
|
|
190
|
+
printStep("Linear statuses and labels", [
|
|
191
|
+
"These names must match your Linear workflow.",
|
|
192
|
+
"If your team uses the default names, press Enter through these prompts.",
|
|
193
|
+
]);
|
|
98
194
|
config.linearReadyStatus = await promptText("Linear ready status name:", config.linearReadyStatus ?? "Ready to Implement");
|
|
99
195
|
config.linearInProgressStatus = await promptText("Linear in-progress status name:", config.linearInProgressStatus ?? "In Progress");
|
|
100
196
|
config.linearNeedsInfoStatus = await promptText("Linear needs-info status name:", config.linearNeedsInfoStatus ?? "Needs Info");
|
|
@@ -102,8 +198,18 @@ async function setupLinear(config) {
|
|
|
102
198
|
config.linearBugLabel = await promptText("Linear bug label:", config.linearBugLabel ?? "bug");
|
|
103
199
|
}
|
|
104
200
|
async function setupAutomation(config) {
|
|
201
|
+
printStep("Step 5: GitHub labels Aegis should watch", [
|
|
202
|
+
"Aegis only picks up open issues with both labels.",
|
|
203
|
+
"Default labels are bug and ready to implement.",
|
|
204
|
+
"Create these labels in GitHub after setup if they do not exist yet.",
|
|
205
|
+
]);
|
|
105
206
|
config.readyLabel = await promptText("GitHub ready label:", config.readyLabel ?? "ready to implement");
|
|
106
207
|
config.bugLabel = await promptText("GitHub bug label:", config.bugLabel ?? "bug");
|
|
208
|
+
printStep("Step 6: automation mode", [
|
|
209
|
+
"Choose plan-first for the first real use.",
|
|
210
|
+
"Plan-first means Aegis investigates and asks for approval before changing code.",
|
|
211
|
+
"Auto-low-risk is for later, after you trust the workflow.",
|
|
212
|
+
]);
|
|
107
213
|
config.automationMode = (await consola.prompt("Automation mode:", {
|
|
108
214
|
type: "select",
|
|
109
215
|
options: [
|
|
@@ -112,10 +218,24 @@ async function setupAutomation(config) {
|
|
|
112
218
|
],
|
|
113
219
|
initial: config.automationMode ?? "plan-first",
|
|
114
220
|
}));
|
|
221
|
+
printStep("Step 7: AI model", [
|
|
222
|
+
"Use the default unless you know you want a different Flue-supported model.",
|
|
223
|
+
"You also need the matching provider API key.",
|
|
224
|
+
]);
|
|
115
225
|
config.agentModel = await promptText("Flue model:", config.agentModel ?? "openai/gpt-5.1");
|
|
116
|
-
|
|
226
|
+
printStep("OpenAI API key", [
|
|
227
|
+
"Paste your OpenAI API key if using an openai/... model.",
|
|
228
|
+
"It is stored in .aegis/.env and later copied to Cloudflare secrets during deploy.",
|
|
229
|
+
"Leave blank only if you configured a different model provider yourself.",
|
|
230
|
+
]);
|
|
231
|
+
config.openaiApiKey = await promptText("OpenAI API key:", config.openaiApiKey);
|
|
117
232
|
}
|
|
118
233
|
async function setupProductionContext(config) {
|
|
234
|
+
printStep("Step 8: production context", [
|
|
235
|
+
"Start with Minimal. It uses only issue text and repo code.",
|
|
236
|
+
"Production context lets Aegis inspect read-only database data and Vercel logs.",
|
|
237
|
+
"Do not choose Production until the basic dry-run works.",
|
|
238
|
+
]);
|
|
119
239
|
const profile = (await consola.prompt("Context profile:", {
|
|
120
240
|
type: "select",
|
|
121
241
|
options: [
|
|
@@ -127,21 +247,37 @@ async function setupProductionContext(config) {
|
|
|
127
247
|
config.contextProfile = profile;
|
|
128
248
|
if (profile !== "production")
|
|
129
249
|
return;
|
|
130
|
-
|
|
250
|
+
printStep("Production context details", [
|
|
251
|
+
"Use a read-only DB user or read replica. Do not give Aegis write access.",
|
|
252
|
+
"All fields here are optional. Leave unknown fields blank.",
|
|
253
|
+
]);
|
|
131
254
|
config.databaseUrl = await promptText("Read-only DATABASE_URL (optional):", config.databaseUrl);
|
|
132
255
|
config.vercelToken = await promptText("Vercel API token (optional):", config.vercelToken);
|
|
133
256
|
config.vercelProjectId = await promptText("Vercel project ID (optional):", config.vercelProjectId);
|
|
134
257
|
config.vercelTeamId = await promptText("Vercel team ID (optional):", config.vercelTeamId);
|
|
135
258
|
}
|
|
136
259
|
async function setupTelegram(config) {
|
|
260
|
+
printStep("Step 9: optional Telegram approval pings", [
|
|
261
|
+
"Use this if you want Aegis to message you when it needs approval.",
|
|
262
|
+
"For the first local dry-run, choose no.",
|
|
263
|
+
"You can rerun setup later to add Telegram.",
|
|
264
|
+
]);
|
|
137
265
|
const enable = (await consola.prompt("Enable Telegram approval pings?", {
|
|
138
266
|
type: "confirm",
|
|
139
267
|
initial: Boolean(config.telegramBotToken),
|
|
140
268
|
}));
|
|
141
269
|
if (!enable)
|
|
142
270
|
return;
|
|
271
|
+
printStep("Telegram bot", [
|
|
272
|
+
"Create a bot with BotFather, paste the bot token, then paste your chat ID.",
|
|
273
|
+
"Aegis will send short approval summaries to that chat.",
|
|
274
|
+
]);
|
|
143
275
|
config.telegramBotToken = await promptText("Telegram bot token:", config.telegramBotToken);
|
|
144
276
|
config.telegramChatId = await promptText("Telegram chat ID:", config.telegramChatId);
|
|
277
|
+
printStep("Telegram webhook secret", [
|
|
278
|
+
"This protects Telegram webhook calls after deploy.",
|
|
279
|
+
"Choose yes and Aegis will generate one.",
|
|
280
|
+
]);
|
|
145
281
|
const generateSecret = (await consola.prompt("Generate a Telegram webhook secret?", {
|
|
146
282
|
type: "confirm",
|
|
147
283
|
initial: !config.telegramWebhookSecret,
|
|
@@ -151,6 +287,11 @@ async function setupTelegram(config) {
|
|
|
151
287
|
: await promptText("Telegram webhook secret:", config.telegramWebhookSecret);
|
|
152
288
|
}
|
|
153
289
|
async function setupWorker(config) {
|
|
290
|
+
printStep("Step 10: Worker URL", [
|
|
291
|
+
"Leave this blank before your first deploy.",
|
|
292
|
+
"After deploy, Aegis saves the Worker URL automatically.",
|
|
293
|
+
"If you are rerunning setup after deploy, paste the workers.dev URL here.",
|
|
294
|
+
]);
|
|
154
295
|
config.workerUrl = await promptText("Deployed Worker URL (can fill after first deploy):", config.workerUrl);
|
|
155
296
|
}
|
|
156
297
|
async function promptText(message, initial) {
|
|
@@ -160,4 +301,36 @@ async function promptText(message, initial) {
|
|
|
160
301
|
}));
|
|
161
302
|
return value?.trim() ?? "";
|
|
162
303
|
}
|
|
304
|
+
function normalizeGitHubRepo(input) {
|
|
305
|
+
const value = input
|
|
306
|
+
.trim()
|
|
307
|
+
.replace(/\.git$/, "")
|
|
308
|
+
.replace(/\/$/, "");
|
|
309
|
+
const urlMatch = value.match(/github\.com[:/]([^/\s]+)\/([^/\s]+)$/i);
|
|
310
|
+
if (urlMatch)
|
|
311
|
+
return `${urlMatch[1]}/${urlMatch[2]}`;
|
|
312
|
+
const shorthandMatch = value.match(/^([^/\s]+)\/([^/\s]+)$/);
|
|
313
|
+
if (shorthandMatch)
|
|
314
|
+
return `${shorthandMatch[1]}/${shorthandMatch[2]}`;
|
|
315
|
+
return value;
|
|
316
|
+
}
|
|
317
|
+
function detectCurrentBranch() {
|
|
318
|
+
try {
|
|
319
|
+
const branch = readFileSync(".git/HEAD", "utf-8").trim();
|
|
320
|
+
if (branch.startsWith("ref: refs/heads/")) {
|
|
321
|
+
return branch.replace("ref: refs/heads/", "");
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
// Ignore and fall back to the normal default.
|
|
326
|
+
}
|
|
327
|
+
return "main";
|
|
328
|
+
}
|
|
329
|
+
function printStep(title, lines) {
|
|
330
|
+
consola.log(`\n${title}`);
|
|
331
|
+
for (const line of lines) {
|
|
332
|
+
consola.log(` - ${line}`);
|
|
333
|
+
}
|
|
334
|
+
consola.log("");
|
|
335
|
+
}
|
|
163
336
|
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","source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|
+
import { type ManifestResult } from "../github/manifest.js";
|
|
2
|
+
export type GitHubAppFlowResult = ManifestResult & {
|
|
3
|
+
installationId: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function runGitHubAppFlow(options: {
|
|
6
|
+
monitoredRepo: string;
|
|
7
|
+
workerUrl?: string;
|
|
8
|
+
}): Promise<GitHubAppFlowResult>;
|
|
9
|
+
//# sourceMappingURL=github-app-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-app-flow.d.ts","sourceRoot":"","sources":["../../src/cli/github-app-flow.ts"],"names":[],"mappings":"AAIA,OAAO,EACN,KAAK,cAAc,EAInB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAClD,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAIF,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA2G/B"}
|