feat: add agent run guard rollout controls

This commit is contained in:
Your Name
2026-07-02 11:36:46 +08:00
parent 212e163006
commit 80b762053b
6 changed files with 3662 additions and 1 deletions
+13
View File
@@ -335,6 +335,14 @@ async function writeMetadata() {
path.join(root, 'scripts', 'check-agent-run-worker.mjs'),
path.join(runtimeRoot, 'scripts', 'check-agent-run-worker.mjs'),
);
await fs.copyFile(
path.join(root, 'scripts', 'agent-run-guard.mjs'),
path.join(runtimeRoot, 'scripts', 'agent-run-guard.mjs'),
);
await fs.copyFile(
path.join(root, 'scripts', 'install-agent-run-guard-agent.sh'),
path.join(runtimeRoot, 'scripts', 'install-agent-run-guard-agent.sh'),
);
await writeFile(
path.join(runtimeRoot, 'RUNBOOK.txt'),
[
@@ -397,6 +405,9 @@ async function writeMetadata() {
' node scripts/agent-run-worker.mjs --once',
' bash scripts/install-agent-run-worker-agent.sh # installs disabled by default',
' node scripts/check-agent-run-worker.mjs # read-only LaunchAgent/queue check',
' node scripts/agent-run-guard.mjs # dry-run auto-pause guard check',
' node scripts/agent-run-guard.mjs --apply # stop worker and disable code-run gate when thresholds trip',
' bash scripts/install-agent-run-guard-agent.sh # installs guard LaunchAgent',
'',
].join('\n'),
);
@@ -425,6 +436,8 @@ async function main() {
await fs.chmod(path.join(runtimeRoot, 'scripts', 'install-runtime-heartbeat-agent.sh'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'install-runtime-slo-report-agent.sh'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'install-agent-run-worker-agent.sh'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'agent-run-guard.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'install-agent-run-guard-agent.sh'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'check-tool-runtime.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'check-agent-run-worker.mjs'), 0o755);
await fs.chmod(path.join(runtimeRoot, 'scripts', 'memind-portal-tunnel.sh'), 0o755);