feat: gate code tools by task mode

This commit is contained in:
John
2026-07-02 07:12:18 +08:00
parent c9b7252832
commit e17dcaf4a8
11 changed files with 338 additions and 19 deletions
+6
View File
@@ -275,6 +275,10 @@ async function writeMetadata() {
path.join(root, 'scripts', 'runtime-worker-drain.mjs'),
path.join(runtimeRoot, 'scripts', 'runtime-worker-drain.mjs'),
);
await fs.copyFile(
path.join(root, 'scripts', 'check-tool-runtime.mjs'),
path.join(runtimeRoot, 'scripts', 'check-tool-runtime.mjs'),
);
await writeFile(
path.join(runtimeRoot, 'RUNBOOK.txt'),
[
@@ -318,6 +322,7 @@ async function writeMetadata() {
' node scripts/runtime-worker-drain.mjs status',
' node scripts/runtime-worker-drain.mjs drain goosed-3',
' node scripts/runtime-worker-drain.mjs undrain goosed-3',
' node scripts/check-tool-runtime.mjs',
'',
].join('\n'),
);
@@ -337,6 +342,7 @@ async function main() {
await fs.chmod(path.join(runtimeRoot, 'scripts', 'wechat-mp-menu.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'check-stream-runtime.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'runtime-worker-drain.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'check-tool-runtime.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'memind-portal-tunnel.sh'), 0o755);
console.log('');
console.log(`Portal runtime 已生成: ${runtimeRoot}`);