ai-project-manage-cli 7.1.9 → 7.1.10
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.
|
@@ -2599,25 +2599,6 @@ async function ensureWebIdeDraftPullRequests(cfg, taskId, workdir) {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
}
|
|
2601
2601
|
|
|
2602
|
-
// src/commands/connect/ensure-workspace-sandbox.ts
|
|
2603
|
-
import { mkdirSync as mkdirSync7, writeFileSync as writeFileSync9, existsSync as existsSync6 } from "fs";
|
|
2604
|
-
import { join as join8 } from "path";
|
|
2605
|
-
var DEFAULT_SANDBOX_JSON = `{
|
|
2606
|
-
"type": "workspace_readwrite",
|
|
2607
|
-
"networkPolicy": {
|
|
2608
|
-
"default": "allow"
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
`;
|
|
2612
|
-
function ensureWorkspaceSandboxConfig(workdir) {
|
|
2613
|
-
const cursorDir = toFsPath(join8(workdir, ".cursor"));
|
|
2614
|
-
const sandboxPath = toFsPath(join8(cursorDir, "sandbox.json"));
|
|
2615
|
-
if (existsSync6(sandboxPath)) return;
|
|
2616
|
-
mkdirSync7(cursorDir, { recursive: true });
|
|
2617
|
-
writeFileSync9(sandboxPath, DEFAULT_SANDBOX_JSON, "utf8");
|
|
2618
|
-
console.log(`[apm] \u5DF2\u5199\u5165\u5DE5\u4F5C\u533A sandbox \u914D\u7F6E\uFF1A${sandboxPath}`);
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
2602
|
// src/commands/connect/handle-webide-message.ts
|
|
2622
2603
|
async function updateStatus(cfg, messageId, status) {
|
|
2623
2604
|
const api = createApmApiClient(cfg);
|
|
@@ -2646,7 +2627,6 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
2646
2627
|
if (!didInit) {
|
|
2647
2628
|
assertApmGitignoredInRepo(workdir);
|
|
2648
2629
|
}
|
|
2649
|
-
ensureWorkspaceSandboxConfig(workdir);
|
|
2650
2630
|
resolveWorkspaceRepos(workdir);
|
|
2651
2631
|
if (shouldRunBranch(branchCacheKey, workdir)) {
|
|
2652
2632
|
if (signal.aborted) throw new Error("\u4EFB\u52A1\u5DF2\u53D6\u6D88");
|
|
@@ -2687,8 +2667,8 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
2687
2667
|
signal
|
|
2688
2668
|
}),
|
|
2689
2669
|
enableWebIdePlanTools: true,
|
|
2690
|
-
// sandbox
|
|
2691
|
-
enableSandbox:
|
|
2670
|
+
// 本地 SDK sandbox 会拦截 custom-user-tools MCP,WebIDE 先关闭
|
|
2671
|
+
enableSandbox: false,
|
|
2692
2672
|
taskId,
|
|
2693
2673
|
createRemoteLogSync: (agentId) => {
|
|
2694
2674
|
saveWebIdeAgentId(workdir, taskId, agentId);
|