mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 21:10:48 +00:00
fix(automation): gate ready-state follow-ups and research web denials
Only automation bot PRs re-check source-issue pending comments before mark-ready, so maintainer Fixes-only PRs are not stuck draft. Write WebSearch/WebFetch denials after the isolated research pass so classify and follow-up research can still call those tools.
This commit is contained in:
1 parent
46864fce51
commit
2840463b3d
4 files changed
+208
-21
No files matched your search
@@ -521,19 +521,13 @@ jobs:
|
||||
mkdir -p .cursor-runtime
|
||||
agent sandbox reset
|
||||
agent sandbox enable
|
||||
# Enable sandbox + block shell network only. Do NOT deny built-in
|
||||
# web tools yet — the isolated research pass must still call them.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.sandbox = { ...(c.sandbox || {}), mode: "enabled", networkAccess: "user_config" };
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
agent sandbox run --sandbox bash -c 'touch .cursor-runtime/sandbox-check'
|
||||
@@ -626,6 +620,26 @@ jobs:
|
||||
if-no-files-found: error
|
||||
overwrite: true
|
||||
|
||||
- name: Deny WebSearch and WebFetch after classification research
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
run: |
|
||||
# Research has finished. Block web tools for classify and later agents
|
||||
# that share this HOME / user-level cli-config.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
|
||||
- name: Classify with Cursor CLI
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
env:
|
||||
@@ -1087,19 +1101,13 @@ jobs:
|
||||
mkdir -p .cursor-runtime
|
||||
agent sandbox reset
|
||||
agent sandbox enable
|
||||
# Enable sandbox + block shell network only. Do NOT deny built-in
|
||||
# web tools yet — the isolated research pass must still call them.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.sandbox = { ...(c.sandbox || {}), mode: "enabled", networkAccess: "user_config" };
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
agent sandbox run --sandbox bash -c 'touch .cursor-runtime/followup-sandbox-check'
|
||||
@@ -1181,6 +1189,26 @@ jobs:
|
||||
);
|
||||
'
|
||||
|
||||
- name: Deny WebSearch and WebFetch after follow-up research
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
run: |
|
||||
# Research has finished. Block web tools for the follow-up agent and
|
||||
# any later steps that share this HOME / user-level cli-config.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
|
||||
- name: Review follow-up with Cursor CLI
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user