@ethlete/cli 2.1.0-next.12 → 2.1.0-next.15
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/CHANGELOG.md +25 -0
- package/README.md +9 -2
- package/package.json +1 -1
- package/src/lib/config/local-config.d.ts +1 -1
- package/src/lib/update/agent-setup.d.ts +33 -0
- package/src/lib/update/agent-setup.js +124 -0
- package/src/lib/update/agent-setup.js.map +1 -0
- package/src/lib/update/ai.d.ts +18 -3
- package/src/lib/update/ai.js +131 -21
- package/src/lib/update/ai.js.map +1 -1
- package/src/lib/update/args.d.ts +2 -0
- package/src/lib/update/args.js +14 -1
- package/src/lib/update/args.js.map +1 -1
- package/src/lib/update/commits.d.ts +63 -0
- package/src/lib/update/commits.js +146 -0
- package/src/lib/update/commits.js.map +1 -0
- package/src/lib/update/gitignore.d.ts +6 -0
- package/src/lib/update/gitignore.js +8 -4
- package/src/lib/update/gitignore.js.map +1 -1
- package/src/lib/update/index.d.ts +1 -0
- package/src/lib/update/index.js +1 -0
- package/src/lib/update/index.js.map +1 -1
- package/src/lib/update/pending.d.ts +3 -0
- package/src/lib/update/pending.js +15 -4
- package/src/lib/update/pending.js.map +1 -1
- package/src/lib/update/registry.d.ts +4 -0
- package/src/lib/update/registry.js +10 -1
- package/src/lib/update/registry.js.map +1 -1
- package/src/lib/update/run-migrations.d.ts +1 -0
- package/src/lib/update/run-migrations.js +17 -11
- package/src/lib/update/run-migrations.js.map +1 -1
- package/src/lib/update/update-command.js +127 -34
- package/src/lib/update/update-command.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @ethlete/cli
|
|
2
2
|
|
|
3
|
+
## 2.1.0-next.15
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- `et update --ai` ends an interactive agent session by itself once the agent writes the task's `.finished` file, then commits the task and starts the next one. `/exit` still works.
|
|
8
|
+
|
|
9
|
+
## 2.1.0-next.14
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- `et update` commits each step by itself - the version bump, each codemod, the agent rules sync and each finished `--ai` task - and never a file that was dirty before the run; `--no-commit` turns this off.
|
|
14
|
+
- `et update --ai` without `updateAgentCommand` lists the agent CLIs on `PATH` and saves the one you pick, as an interactive session or a headless run.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- The Claude Code choices in `et update --ai` start the agent in auto mode, so it can run its checks without asking.
|
|
19
|
+
- `et update --ai` tells you, for each task and in the agent's last message, to type `/exit` so the next task starts.
|
|
20
|
+
|
|
21
|
+
## 2.1.0-next.13
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- `et update` hands the migrations to the newly installed `et` when the update moves `@ethlete/cli`, so steps a newer CLI added, such as the agent rules sync, run in that same update.
|
|
26
|
+
- `et update` follows the dist tag that holds the newest version of the installed prerelease line, so a package that changesets published to `latest`, such as `@ethlete/agent-rules`, no longer stays on the older `next` version.
|
|
27
|
+
|
|
3
28
|
## 2.1.0-next.12
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ yarn et update --tag latest # leave the prerelease line
|
|
|
47
47
|
yarn et update core --to 5.0.0-next.55 # an exact version for the package you name
|
|
48
48
|
yarn et update --continue # finish a run that stopped
|
|
49
49
|
yarn et update --ai # hand every agent-assisted task to an agent
|
|
50
|
+
yarn et update --no-commit # leave every change uncommitted
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
The target follows the dist tag the installed version is on, so a repo on a `-next` prerelease stays
|
|
@@ -67,8 +68,14 @@ needs a decision), `assisted` (written as a prompt for an agent) or `unsupported
|
|
|
67
68
|
has no Nx to run, with the command to run it by hand).
|
|
68
69
|
|
|
69
70
|
`--ai` hands each open assisted task to the command in `updateAgentCommand` in
|
|
70
|
-
`ethlete.config.local.json` (for example `claude --permission-mode
|
|
71
|
-
and reports each run. It also works on the tasks an earlier run left.
|
|
71
|
+
`ethlete.config.local.json` (for example `claude --permission-mode auto`), one run per task,
|
|
72
|
+
and reports each run. It also works on the tasks an earlier run left. When the key is missing, `--ai`
|
|
73
|
+
lists the agent CLIs on `PATH` and saves the command you pick.
|
|
74
|
+
|
|
75
|
+
Each step is committed by itself: the version bump with the lockfile, each codemod that changed files,
|
|
76
|
+
the agent rules sync, and each agent task that ends done. A commit takes only the paths its step
|
|
77
|
+
changed, and a step that touched a file you had changed before the run is left uncommitted.
|
|
78
|
+
`--no-commit` commits nothing.
|
|
72
79
|
|
|
73
80
|
A package declares its migrations in `migrations.json` at its own root, pointed at from `package.json`
|
|
74
81
|
with `"ethlete": { "migrations": "./migrations.json" }`. The full format is on the docs site.
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ export type LocalConfig = {
|
|
|
15
15
|
apiRepoPaths?: Record<string, string>;
|
|
16
16
|
/** Branch that represents each API's deployed state, keyed by app name. `"*"` matches any app. */
|
|
17
17
|
apiRepoBranches?: Record<string, string>;
|
|
18
|
-
/** Command `et update --ai` hands an assisted migration task to, for example `claude --permission-mode
|
|
18
|
+
/** Command `et update --ai` hands an assisted migration task to, for example `claude --permission-mode auto`. */
|
|
19
19
|
updateAgentCommand?: string;
|
|
20
20
|
};
|
|
21
21
|
export declare const LOCAL_CONFIG_KEYS: (keyof LocalConfig)[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type AgentCli = {
|
|
2
|
+
binary: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** Opens a session the developer can answer questions in, and exits when they close it. */
|
|
5
|
+
interactive: string;
|
|
6
|
+
/** Runs to the end without a question, so a task that needs a decision stays open. */
|
|
7
|
+
headless: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const AGENT_CLIS: readonly AgentCli[];
|
|
10
|
+
export type AgentChoice = {
|
|
11
|
+
label: string;
|
|
12
|
+
command: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const onPath: (options: {
|
|
15
|
+
binary: string;
|
|
16
|
+
env?: NodeJS.ProcessEnv;
|
|
17
|
+
platform?: NodeJS.Platform;
|
|
18
|
+
}) => boolean;
|
|
19
|
+
/** The commands of every installed agent CLI, the interactive one of each first. */
|
|
20
|
+
export declare const agentChoices: (options?: {
|
|
21
|
+
env?: NodeJS.ProcessEnv;
|
|
22
|
+
platform?: NodeJS.Platform;
|
|
23
|
+
}) => AgentChoice[];
|
|
24
|
+
/**
|
|
25
|
+
* Asks which agent command `--ai` uses and saves the answer in the local config. Without a terminal it
|
|
26
|
+
* names the key and the installed CLIs instead. Returns `undefined` when there is no command to use.
|
|
27
|
+
*/
|
|
28
|
+
export declare const setUpAgentCommand: (options: {
|
|
29
|
+
root: string;
|
|
30
|
+
env?: NodeJS.ProcessEnv;
|
|
31
|
+
platform?: NodeJS.Platform;
|
|
32
|
+
isTTY?: boolean;
|
|
33
|
+
}) => Promise<string | undefined>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setUpAgentCommand = exports.agentChoices = exports.onPath = exports.AGENT_CLIS = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const local_config_1 = require("../config/local-config");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const ai_1 = require("./ai");
|
|
10
|
+
const gitignore_1 = require("./gitignore");
|
|
11
|
+
exports.AGENT_CLIS = [
|
|
12
|
+
{
|
|
13
|
+
binary: 'claude',
|
|
14
|
+
label: 'Claude Code',
|
|
15
|
+
interactive: 'claude --permission-mode auto',
|
|
16
|
+
headless: 'claude --permission-mode auto -p',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
binary: 'codex',
|
|
20
|
+
label: 'Codex',
|
|
21
|
+
interactive: 'codex --sandbox workspace-write',
|
|
22
|
+
headless: 'codex exec --sandbox workspace-write',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
binary: 'gemini',
|
|
26
|
+
label: 'Gemini CLI',
|
|
27
|
+
interactive: 'gemini --approval-mode auto_edit -i',
|
|
28
|
+
headless: 'gemini --approval-mode auto_edit -p',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
binary: 'copilot',
|
|
32
|
+
label: 'GitHub Copilot CLI',
|
|
33
|
+
interactive: 'copilot --allow-all-tools -i',
|
|
34
|
+
headless: 'copilot --allow-all-tools -p',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
binary: 'cursor-agent',
|
|
38
|
+
label: 'Cursor Agent',
|
|
39
|
+
interactive: 'cursor-agent --force',
|
|
40
|
+
headless: 'cursor-agent --force -p',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
const isExecutable = (path, platform) => {
|
|
44
|
+
try {
|
|
45
|
+
(0, fs_1.accessSync)(path, platform === 'win32' ? fs_1.constants.F_OK : fs_1.constants.X_OK);
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
catch (_a) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const onPath = (options) => {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
const { binary, env = process.env, platform = process.platform } = options;
|
|
55
|
+
const dirs = ((_b = (_a = env['PATH']) !== null && _a !== void 0 ? _a : env['Path']) !== null && _b !== void 0 ? _b : '').split(path_1.delimiter).filter(Boolean);
|
|
56
|
+
const extensions = platform === 'win32' ? ['', ...((_c = env['PATHEXT']) !== null && _c !== void 0 ? _c : '.EXE;.CMD;.BAT').split(';')] : [''];
|
|
57
|
+
return dirs.some((dir) => extensions.some((extension) => isExecutable((0, path_1.join)(dir, binary + extension), platform)));
|
|
58
|
+
};
|
|
59
|
+
exports.onPath = onPath;
|
|
60
|
+
/** The commands of every installed agent CLI, the interactive one of each first. */
|
|
61
|
+
const agentChoices = (options = {}) => exports.AGENT_CLIS.filter(({ binary }) => (0, exports.onPath)(Object.assign({ binary }, options))).flatMap((cli) => [
|
|
62
|
+
{ label: `${cli.label}, interactive: you can answer its questions`, command: cli.interactive },
|
|
63
|
+
{ label: `${cli.label}, headless: a task that needs a decision stays open`, command: cli.headless },
|
|
64
|
+
]);
|
|
65
|
+
exports.agentChoices = agentChoices;
|
|
66
|
+
const missingKeyMessage = `--ai needs "${ai_1.AGENT_COMMAND_KEY}" in ${local_config_1.LOCAL_CONFIG_FILE_NAME}, for example "${ai_1.AGENT_COMMAND_EXAMPLE}".`;
|
|
67
|
+
const pick = (choices) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
const list = choices.map((choice, index) => ` ${index + 1}. ${choice.label}\n ${choice.command}`).join('\n');
|
|
70
|
+
const question = choices.length > 0
|
|
71
|
+
? `${list}\n\nPick a number, or type a command of your own. Press Enter for 1, or Ctrl+C to stop: `
|
|
72
|
+
: 'No agent CLI was found on PATH. Type the command to hand a task to, or press Enter to stop: ';
|
|
73
|
+
const answer = (yield (0, utils_1.askQuestion)(`\n${missingKeyMessage}\n\n${question}`)).trim();
|
|
74
|
+
if (answer === '')
|
|
75
|
+
return (_a = choices[0]) === null || _a === void 0 ? void 0 : _a.command;
|
|
76
|
+
const index = /^\d+$/.test(answer) ? Number(answer) - 1 : -1;
|
|
77
|
+
if (index >= 0)
|
|
78
|
+
return (_b = choices[index]) === null || _b === void 0 ? void 0 : _b.command;
|
|
79
|
+
return answer;
|
|
80
|
+
});
|
|
81
|
+
/** The file the key goes in: the one that holds the local config now, or a new `ethlete.config.local.json`. */
|
|
82
|
+
const targetFile = (root) => {
|
|
83
|
+
const primary = (0, local_config_1.readLocalConfigFile)((0, path_1.join)(root, local_config_1.LOCAL_CONFIG_FILE_NAME));
|
|
84
|
+
if (primary.status === 'ok')
|
|
85
|
+
return { fileName: local_config_1.LOCAL_CONFIG_FILE_NAME, config: primary.config };
|
|
86
|
+
if (primary.status !== 'absent')
|
|
87
|
+
return undefined;
|
|
88
|
+
const legacy = (0, local_config_1.readLocalConfigFile)((0, path_1.join)(root, local_config_1.LEGACY_LOCAL_CONFIG_FILE_NAME));
|
|
89
|
+
if (legacy.status === 'ok')
|
|
90
|
+
return { fileName: local_config_1.LEGACY_LOCAL_CONFIG_FILE_NAME, config: legacy.config };
|
|
91
|
+
return { fileName: local_config_1.LOCAL_CONFIG_FILE_NAME, config: {} };
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Asks which agent command `--ai` uses and saves the answer in the local config. Without a terminal it
|
|
95
|
+
* names the key and the installed CLIs instead. Returns `undefined` when there is no command to use.
|
|
96
|
+
*/
|
|
97
|
+
const setUpAgentCommand = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
98
|
+
const { root, isTTY = process.stdin.isTTY === true } = options;
|
|
99
|
+
const choices = (0, exports.agentChoices)(options);
|
|
100
|
+
if (!isTTY) {
|
|
101
|
+
const found = choices.map(({ command }) => ` ${command}`).join('\n');
|
|
102
|
+
console.error(`${missingKeyMessage}\n` +
|
|
103
|
+
(found ? `Commands for the agent CLIs on PATH:\n${found}\n` : '') +
|
|
104
|
+
'Nothing was changed.');
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
const target = targetFile(root);
|
|
108
|
+
if (!target) {
|
|
109
|
+
console.error(`${missingKeyMessage}\n${local_config_1.LOCAL_CONFIG_FILE_NAME} cannot be read, so it stays as it is. Nothing was changed.`);
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
const command = yield pick(choices);
|
|
113
|
+
if (!command) {
|
|
114
|
+
console.error('No agent command was picked. Nothing was changed.');
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(root, target.fileName), `${JSON.stringify(Object.assign(Object.assign({}, target.config), { [ai_1.AGENT_COMMAND_KEY]: command }), null, 2)}\n`, 'utf8');
|
|
118
|
+
console.log(`\n Saved "${ai_1.AGENT_COMMAND_KEY}": "${command}" in ${target.fileName}.`);
|
|
119
|
+
if ((0, gitignore_1.ignoreEntry)({ root, entry: target.fileName }))
|
|
120
|
+
console.log(` Added ${target.fileName} to .gitignore.`);
|
|
121
|
+
return command;
|
|
122
|
+
});
|
|
123
|
+
exports.setUpAgentCommand = setUpAgentCommand;
|
|
124
|
+
//# sourceMappingURL=agent-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-setup.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/lib/update/agent-setup.ts"],"names":[],"mappings":";;;;AAAA,2BAA0D;AAC1D,+BAAuC;AACvC,yDAAoH;AACpH,oCAAuC;AACvC,6BAAgE;AAChE,2CAA0C;AAW7B,QAAA,UAAU,GAAwB;IAC7C;QACE,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,kCAAkC;KAC7C;IACD;QACE,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,sCAAsC;KACjD;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,qCAAqC;QAClD,QAAQ,EAAE,qCAAqC;KAChD;IACD;QACE,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,8BAA8B;KACzC;IACD;QACE,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,sBAAsB;QACnC,QAAQ,EAAE,yBAAyB;KACpC;CACF,CAAC;AAIF,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,QAAyB,EAAE,EAAE;IAC/D,IAAI,CAAC;QACH,IAAA,eAAU,EAA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Where the agent command sits in `ethlete.config.local.json`. */
|
|
3
3
|
export declare const AGENT_COMMAND_KEY = "updateAgentCommand";
|
|
4
|
-
/** An agent command that can edit files without asking, for the
|
|
5
|
-
export declare const AGENT_COMMAND_EXAMPLE = "claude --permission-mode
|
|
4
|
+
/** An interactive agent command that can edit files without asking, for the error that names the key. */
|
|
5
|
+
export declare const AGENT_COMMAND_EXAMPLE = "claude --permission-mode auto";
|
|
6
6
|
/** Where the command template takes the whole prompt. */
|
|
7
7
|
export declare const PROMPT_PLACEHOLDER = "<prompt>";
|
|
8
8
|
/** Where the command template takes only the path of the task file. */
|
|
9
9
|
export declare const FILE_PLACEHOLDER = "<file>";
|
|
10
|
+
/** The file an agent writes to tell `et update` that it is finished with a task. */
|
|
11
|
+
export declare const finishedPath: (taskPath: string) => string;
|
|
10
12
|
/** The prompt one assisted task is handed to an agent with. */
|
|
11
13
|
export declare const agentPrompt: (taskPath: string) => string;
|
|
12
14
|
export declare const PROMPT_ENV = "ETHLETE_UPDATE_PROMPT";
|
|
13
15
|
export declare const FILE_ENV = "ETHLETE_UPDATE_TASK_FILE";
|
|
16
|
+
export declare const FINISHED_ENV = "ETHLETE_UPDATE_FINISHED_FILE";
|
|
14
17
|
/**
|
|
15
18
|
* The command that hands one task to an agent. `<prompt>` becomes the prompt, `<file>` the path of the
|
|
16
19
|
* task file; a template with neither gets the prompt appended, which is what `claude -p` needs. Both
|
|
@@ -23,6 +26,7 @@ export declare const agentCommand: (options: {
|
|
|
23
26
|
export declare const agentEnv: (taskPath: string) => {
|
|
24
27
|
ETHLETE_UPDATE_PROMPT: string;
|
|
25
28
|
ETHLETE_UPDATE_TASK_FILE: string;
|
|
29
|
+
ETHLETE_UPDATE_FINISHED_FILE: string;
|
|
26
30
|
};
|
|
27
31
|
export type AgentRunState = 'done' | 'open' | 'failed';
|
|
28
32
|
export type AgentRun = {
|
|
@@ -33,12 +37,23 @@ export type AgentRun = {
|
|
|
33
37
|
};
|
|
34
38
|
/** The tasks an agent can work on: the ones whose instructions were written as a prompt. */
|
|
35
39
|
export declare const assistedTasks: (tasks: readonly UpdateTask[]) => UpdateTask[];
|
|
40
|
+
/** `settleMs` lets the agent print its last message after it writes the finished file; `killMs` is the SIGTERM grace. */
|
|
41
|
+
export type AgentTiming = {
|
|
42
|
+
pollMs: number;
|
|
43
|
+
settleMs: number;
|
|
44
|
+
killMs: number;
|
|
45
|
+
};
|
|
36
46
|
/**
|
|
37
47
|
* Runs the configured agent once per assisted task, in order, so each run has one change to make, and
|
|
38
48
|
* reports each one as it ends. The command is a user-written string, so it runs through a shell.
|
|
49
|
+
* A run ends when the agent exits, or shortly after it writes the finished file the prompt names.
|
|
50
|
+
* `afterRun` runs after each task, before the next one starts; it is how `et update` commits a task that
|
|
51
|
+
* ended done, so the report of any other task says it is not committed.
|
|
39
52
|
*/
|
|
40
53
|
export declare const runAgentTasks: (options: {
|
|
41
54
|
root: string;
|
|
42
55
|
template: string;
|
|
43
56
|
tasks: readonly UpdateTask[];
|
|
44
|
-
|
|
57
|
+
afterRun?: (run: AgentRun) => void;
|
|
58
|
+
timing?: Partial<AgentTiming>;
|
|
59
|
+
}) => Promise<AgentRun[]>;
|
package/src/lib/update/ai.js
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runAgentTasks = exports.assistedTasks = exports.agentEnv = exports.agentCommand = exports.FILE_ENV = exports.PROMPT_ENV = exports.agentPrompt = exports.FILE_PLACEHOLDER = exports.PROMPT_PLACEHOLDER = exports.AGENT_COMMAND_EXAMPLE = exports.AGENT_COMMAND_KEY = void 0;
|
|
3
|
+
exports.runAgentTasks = exports.assistedTasks = exports.agentEnv = exports.agentCommand = exports.FINISHED_ENV = exports.FILE_ENV = exports.PROMPT_ENV = exports.agentPrompt = exports.finishedPath = exports.FILE_PLACEHOLDER = exports.PROMPT_PLACEHOLDER = exports.AGENT_COMMAND_EXAMPLE = exports.AGENT_COMMAND_KEY = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const fs_1 = require("fs");
|
|
6
7
|
const path_1 = require("path");
|
|
8
|
+
const promises_1 = require("timers/promises");
|
|
7
9
|
/** Where the agent command sits in `ethlete.config.local.json`. */
|
|
8
10
|
exports.AGENT_COMMAND_KEY = 'updateAgentCommand';
|
|
9
|
-
/** An agent command that can edit files without asking, for the
|
|
10
|
-
exports.AGENT_COMMAND_EXAMPLE = 'claude --permission-mode
|
|
11
|
+
/** An interactive agent command that can edit files without asking, for the error that names the key. */
|
|
12
|
+
exports.AGENT_COMMAND_EXAMPLE = 'claude --permission-mode auto';
|
|
11
13
|
/** Where the command template takes the whole prompt. */
|
|
12
14
|
exports.PROMPT_PLACEHOLDER = '<prompt>';
|
|
13
15
|
/** Where the command template takes only the path of the task file. */
|
|
14
16
|
exports.FILE_PLACEHOLDER = '<file>';
|
|
17
|
+
/** The file an agent writes to tell `et update` that it is finished with a task. */
|
|
18
|
+
const finishedPath = (taskPath) => `${taskPath.replace(/\.md$/, '')}.finished`;
|
|
19
|
+
exports.finishedPath = finishedPath;
|
|
15
20
|
/** The prompt one assisted task is handed to an agent with. */
|
|
16
21
|
const agentPrompt = (taskPath) => `Apply the migration task described in ${taskPath} to this repository. ` +
|
|
17
|
-
'Follow its instructions, then delete that file once the change is complete.'
|
|
22
|
+
'Follow its instructions, then delete that file once the change is complete. ' +
|
|
23
|
+
'Do not commit: et update commits your change. ' +
|
|
24
|
+
`When you are finished and the user has no more questions for you, create the empty file ${(0, exports.finishedPath)(taskPath)} ` +
|
|
25
|
+
'as your very last step: et update then ends this session, commits the change and starts the next task.';
|
|
18
26
|
exports.agentPrompt = agentPrompt;
|
|
19
27
|
exports.PROMPT_ENV = 'ETHLETE_UPDATE_PROMPT';
|
|
20
28
|
exports.FILE_ENV = 'ETHLETE_UPDATE_TASK_FILE';
|
|
29
|
+
exports.FINISHED_ENV = 'ETHLETE_UPDATE_FINISHED_FILE';
|
|
21
30
|
const reference = (options) => {
|
|
22
31
|
const { name, platform, insideQuotes } = options;
|
|
23
32
|
const bare = platform === 'win32' ? `%${name}%` : `$${name}`;
|
|
@@ -55,49 +64,150 @@ const agentCommand = (options) => {
|
|
|
55
64
|
return command;
|
|
56
65
|
};
|
|
57
66
|
exports.agentCommand = agentCommand;
|
|
58
|
-
const agentEnv = (taskPath) => ({
|
|
67
|
+
const agentEnv = (taskPath) => ({
|
|
68
|
+
[exports.PROMPT_ENV]: (0, exports.agentPrompt)(taskPath),
|
|
69
|
+
[exports.FILE_ENV]: taskPath,
|
|
70
|
+
[exports.FINISHED_ENV]: (0, exports.finishedPath)(taskPath),
|
|
71
|
+
});
|
|
59
72
|
exports.agentEnv = agentEnv;
|
|
60
73
|
/** The tasks an agent can work on: the ones whose instructions were written as a prompt. */
|
|
61
74
|
const assistedTasks = (tasks) => tasks.filter((task) => task.kind === 'assisted' && task.instructionsFile !== undefined);
|
|
62
75
|
exports.assistedTasks = assistedTasks;
|
|
63
|
-
const
|
|
76
|
+
const DEFAULT_TIMING = { pollMs: 250, settleMs: 2000, killMs: 5000 };
|
|
77
|
+
/**
|
|
78
|
+
* The shell and its children: `sh -c` does not always exec the command, so the shell can exit on SIGTERM
|
|
79
|
+
* while the agent under it lives on.
|
|
80
|
+
*/
|
|
81
|
+
const processTree = (pid) => {
|
|
64
82
|
var _a;
|
|
65
|
-
|
|
83
|
+
if (process.platform === 'win32')
|
|
84
|
+
return [pid];
|
|
85
|
+
const children = (_a = (0, child_process_1.spawnSync)('pgrep', ['-P', String(pid)], { encoding: 'utf8' }).stdout) !== null && _a !== void 0 ? _a : '';
|
|
86
|
+
return [pid, ...children.split('\n').filter(Boolean).map(Number)];
|
|
87
|
+
};
|
|
88
|
+
const signal = (pid, name) => {
|
|
89
|
+
if (process.platform === 'win32') {
|
|
90
|
+
(0, child_process_1.spawnSync)('taskkill', ['/pid', String(pid), '/T', ...(name === 'SIGKILL' ? ['/F'] : [])], { stdio: 'ignore' });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
process.kill(pid, name);
|
|
95
|
+
}
|
|
96
|
+
catch (_a) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const isAlive = (pid) => {
|
|
101
|
+
try {
|
|
102
|
+
process.kill(pid, 0);
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
catch (_a) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
/** Alternate screen, mouse, focus events and bracketed paste off; kitty keyboard modes popped; cursor shown. */
|
|
110
|
+
const TERMINAL_RESET = '\x1b[?1049l\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?1004l\x1b[?2004l\x1b[<10u\x1b[?25h';
|
|
111
|
+
/** An agent ended by a signal can leave the terminal raw with its screen modes on: Codex 0.157 does. */
|
|
112
|
+
const restoreTerminal = () => {
|
|
113
|
+
if (process.stdout.isTTY)
|
|
114
|
+
process.stdout.write(TERMINAL_RESET);
|
|
115
|
+
if (process.platform !== 'win32' && process.stdin.isTTY)
|
|
116
|
+
(0, child_process_1.spawnSync)('stty', ['sane'], { stdio: 'inherit' });
|
|
117
|
+
};
|
|
118
|
+
const ignoreInterrupt = () => undefined;
|
|
119
|
+
const wait = (ms, signal) => (0, promises_1.setTimeout)(ms, undefined, { signal }).catch(() => undefined);
|
|
120
|
+
const watchFor = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
+
const { path, pollMs, signal } = options;
|
|
122
|
+
while (!signal.aborted) {
|
|
123
|
+
if ((0, fs_1.existsSync)(path))
|
|
124
|
+
return true;
|
|
125
|
+
yield wait(pollMs, signal);
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
});
|
|
129
|
+
const endTree = (pid, timing) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
130
|
+
const targets = processTree(pid);
|
|
131
|
+
const started = Date.now();
|
|
132
|
+
let killed = false;
|
|
133
|
+
targets.forEach((target) => signal(target, 'SIGTERM'));
|
|
134
|
+
while (targets.some(isAlive)) {
|
|
135
|
+
if (!killed && Date.now() - started >= timing.killMs) {
|
|
136
|
+
killed = true;
|
|
137
|
+
targets.filter(isAlive).forEach((target) => signal(target, 'SIGKILL'));
|
|
138
|
+
}
|
|
139
|
+
yield wait(timing.pollMs);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
const runOne = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
+
var _a;
|
|
144
|
+
const { root, template, task, timing } = options;
|
|
66
145
|
const taskPath = (0, path_1.join)(root, (_a = task.instructionsFile) !== null && _a !== void 0 ? _a : '');
|
|
146
|
+
const finishedFile = (0, exports.finishedPath)(taskPath);
|
|
67
147
|
const command = (0, exports.agentCommand)({ template });
|
|
68
148
|
console.log(` ${command}\n ${exports.FILE_ENV}=${taskPath}\n`);
|
|
69
|
-
|
|
149
|
+
(0, fs_1.rmSync)(finishedFile, { force: true });
|
|
150
|
+
// Ctrl+C belongs to the agent while it runs: an interactive CLI uses it to cancel, not to quit.
|
|
151
|
+
process.on('SIGINT', ignoreInterrupt);
|
|
152
|
+
const child = (0, child_process_1.spawn)(command, {
|
|
70
153
|
cwd: root,
|
|
71
154
|
stdio: 'inherit',
|
|
72
155
|
shell: true,
|
|
73
156
|
env: Object.assign(Object.assign({}, process.env), (0, exports.agentEnv)(taskPath)),
|
|
74
157
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
158
|
+
const exited = new AbortController();
|
|
159
|
+
const exit = new Promise((resolve) => {
|
|
160
|
+
child.on('error', (error) => resolve({ status: null, error }));
|
|
161
|
+
child.on('exit', (status) => resolve({ status }));
|
|
162
|
+
}).finally(() => exited.abort());
|
|
163
|
+
let ended = false;
|
|
164
|
+
if (yield watchFor({ path: finishedFile, pollMs: timing.pollMs, signal: exited.signal })) {
|
|
165
|
+
console.log('\n The agent is finished, so et update ends the session.');
|
|
166
|
+
yield wait(timing.settleMs, exited.signal);
|
|
167
|
+
if (!exited.signal.aborted && child.pid !== undefined) {
|
|
168
|
+
ended = true;
|
|
169
|
+
yield endTree(child.pid, timing);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const { status, error } = yield exit;
|
|
173
|
+
process.off('SIGINT', ignoreInterrupt);
|
|
174
|
+
if (ended)
|
|
175
|
+
restoreTerminal();
|
|
176
|
+
(0, fs_1.rmSync)(finishedFile, { force: true });
|
|
177
|
+
if (error)
|
|
178
|
+
return { task, command, state: 'failed', reason: error.message };
|
|
179
|
+
if (!ended && status !== 0)
|
|
180
|
+
return { task, command, state: 'failed', reason: `exited with ${status}` };
|
|
79
181
|
if ((0, fs_1.existsSync)(taskPath)) {
|
|
80
182
|
return { task, command, state: 'open', reason: `the agent left ${task.instructionsFile}, so the task stays open` };
|
|
81
183
|
}
|
|
82
184
|
return { task, command, state: 'done' };
|
|
83
|
-
};
|
|
185
|
+
});
|
|
84
186
|
/**
|
|
85
187
|
* Runs the configured agent once per assisted task, in order, so each run has one change to make, and
|
|
86
188
|
* reports each one as it ends. The command is a user-written string, so it runs through a shell.
|
|
189
|
+
* A run ends when the agent exits, or shortly after it writes the finished file the prompt names.
|
|
190
|
+
* `afterRun` runs after each task, before the next one starts; it is how `et update` commits a task that
|
|
191
|
+
* ended done, so the report of any other task says it is not committed.
|
|
87
192
|
*/
|
|
88
|
-
const runAgentTasks = (options) => {
|
|
193
|
+
const runAgentTasks = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
194
|
+
const { afterRun } = options;
|
|
89
195
|
const { root, template } = options;
|
|
196
|
+
const timing = Object.assign(Object.assign({}, DEFAULT_TIMING), options.timing);
|
|
90
197
|
const tasks = (0, exports.assistedTasks)(options.tasks);
|
|
91
|
-
|
|
198
|
+
const runs = [];
|
|
199
|
+
for (const [index, task] of tasks.entries()) {
|
|
92
200
|
const label = `[${index + 1}/${tasks.length}] ${task.packageName} ${task.name}`;
|
|
93
|
-
console.log(`\n ${label}
|
|
94
|
-
const run = runOne({ root, template, task });
|
|
201
|
+
console.log(`\n ${label}\n An interactive session ends by itself when the agent is finished. Type /exit to end it sooner.`);
|
|
202
|
+
const run = yield runOne({ root, template, task, timing });
|
|
95
203
|
if (run.state === 'done')
|
|
96
204
|
console.log(`\n ${label}: done`);
|
|
97
205
|
else
|
|
98
|
-
console.error(`\n ${label}: ${run.reason}`);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
206
|
+
console.error(`\n ${label}: ${run.reason}${afterRun ? ', so it is not committed' : ''}`);
|
|
207
|
+
afterRun === null || afterRun === void 0 ? void 0 : afterRun(run);
|
|
208
|
+
runs.push(run);
|
|
209
|
+
}
|
|
210
|
+
return runs;
|
|
211
|
+
});
|
|
102
212
|
exports.runAgentTasks = runAgentTasks;
|
|
103
213
|
//# sourceMappingURL=ai.js.map
|
package/src/lib/update/ai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/lib/update/ai.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/lib/update/ai.ts"],"names":[],"mappings":";;;;AAAA,iDAAiD;AACjD,2BAAwC;AACxC,+BAA4B;AAC5B,8CAAsD;AAGtD,mEAAmE;AACtD,QAAA,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD,yGAAyG;AAC5F,QAAA,qBAAqB,GAAG,+BAA+B,CAAC;AAErE,yDAAyD;AAC5C,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAE7C,uEAAuE;AAC1D,QAAA,gBAAgB,GAAG,QAAQ,CAAC;AAEzC,oFAAoF;AAC7E,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAA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seUpdateArgs = exports.fullPackageName = void 0;
|
|
4
4
|
const packages_1 = require("./packages");
|
|
5
5
|
const VALUE_FLAGS = ['--tag', '--to', '--from'];
|
|
6
|
-
const BOOLEAN_FLAGS = [
|
|
6
|
+
const BOOLEAN_FLAGS = [
|
|
7
|
+
'--check',
|
|
8
|
+
'--dry-run',
|
|
9
|
+
'--no-install',
|
|
10
|
+
'--no-commit',
|
|
11
|
+
'--continue',
|
|
12
|
+
'--ai',
|
|
13
|
+
'--force',
|
|
14
|
+
'--help',
|
|
15
|
+
'-h',
|
|
16
|
+
];
|
|
7
17
|
/** `core` and `@ethlete/core` both name the same package on the command line. */
|
|
8
18
|
const fullPackageName = (name) => (name.includes('/') ? name : `${packages_1.ETHLETE_SCOPE}${name}`);
|
|
9
19
|
exports.fullPackageName = fullPackageName;
|
|
@@ -22,6 +32,7 @@ const parseUpdateArgs = (argv) => {
|
|
|
22
32
|
check: false,
|
|
23
33
|
dryRun: false,
|
|
24
34
|
install: true,
|
|
35
|
+
commit: true,
|
|
25
36
|
resume: false,
|
|
26
37
|
ai: false,
|
|
27
38
|
force: false,
|
|
@@ -68,6 +79,8 @@ const parseUpdateArgs = (argv) => {
|
|
|
68
79
|
args.dryRun = true;
|
|
69
80
|
if (flag === '--no-install')
|
|
70
81
|
args.install = false;
|
|
82
|
+
if (flag === '--no-commit')
|
|
83
|
+
args.commit = false;
|
|
71
84
|
if (flag === '--continue')
|
|
72
85
|
args.resume = true;
|
|
73
86
|
if (flag === '--ai')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/lib/update/args.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/lib/update/args.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAsB3C,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,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