evot-agent 0.5.3 → 0.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evot-agent",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "type": "module",
5
5
  "description": "Local browser agent for evot — browses sites with Claude or Codex and appends results as cells.",
6
6
  "license": "MIT",
@@ -64,6 +64,32 @@ export async function runClaudeJob(job) {
64
64
  strictMcpConfig: true,
65
65
  // MCP 툴은 프롬프트 없이 실행되도록 자동 승인 유지.
66
66
  allowedTools: ["mcp__playwright"],
67
+ // 두 번째 겹: Playwright 외 툴 호출은 hook에서 거부한다. disallowedTools는 이름 목록이라
68
+ // SDK가 새 내장 툴(REPL·Monitor·Workflow 등)을 추가하면 그대로 뚫리고, bypassPermissions라
69
+ // 확인 없이 실행된다. hook은 permissionMode와 무관하게 돌고 툴 목록은 건드리지 않으므로
70
+ // tools:[] 때처럼 Playwright가 사라지는 회귀는 없다(허용 접두어는 allowedTools와 동일).
71
+ hooks: {
72
+ PreToolUse: [
73
+ {
74
+ hooks: [
75
+ async (input) => {
76
+ const name = typeof input?.tool_name === "string" ? input.tool_name : "";
77
+ if (name.startsWith("mcp__playwright__")) return { continue: true };
78
+ console.warn(`[evot-agent] blocked tool call: ${name || "(unknown)"}`);
79
+ return {
80
+ continue: true,
81
+ hookSpecificOutput: {
82
+ hookEventName: "PreToolUse",
83
+ permissionDecision: "deny",
84
+ permissionDecisionReason:
85
+ "evot-agent: only Playwright browser tools are allowed",
86
+ },
87
+ };
88
+ },
89
+ ],
90
+ },
91
+ ],
92
+ },
67
93
  },
68
94
  })) {
69
95
  if (message.type === "assistant") {