@pontia/claude-client 0.8.2 → 0.8.3
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/dist/src/host.js +8 -3
- package/dist/src/main.js +3 -1
- package/dist/src/server.js +2 -1
- package/package.json +1 -1
package/dist/src/host.js
CHANGED
|
@@ -84,13 +84,18 @@ export class Host {
|
|
|
84
84
|
: {}),
|
|
85
85
|
includePartialMessages: true,
|
|
86
86
|
permissionMode: policy?.yolo ? "bypassPermissions" : "default",
|
|
87
|
-
...(policy?.yolo
|
|
87
|
+
...(policy?.yolo
|
|
88
|
+
? { allowDangerouslySkipPermissions: true, sandbox: { enabled: false } }
|
|
89
|
+
: {}),
|
|
88
90
|
...(tools ? { tools } : {}),
|
|
89
91
|
...(policy?.disable_mcp ? { strictMcpConfig: true, mcpServers: {} } : {}),
|
|
90
92
|
settingSources: ["user", "project", "local"],
|
|
91
93
|
settings: { env: { PONTIA_SESSION_ID: this.options.session_id } },
|
|
92
|
-
disallowedTools: [
|
|
93
|
-
|
|
94
|
+
disallowedTools: [
|
|
95
|
+
"AskUserQuestion",
|
|
96
|
+
...(policy?.disabled_tools ?? []),
|
|
97
|
+
...(policy?.disable_mcp ? ["mcp__*"] : []),
|
|
98
|
+
],
|
|
94
99
|
canUseTool: (tool, input, context) => {
|
|
95
100
|
if (!this.acceptsControl())
|
|
96
101
|
return Promise.resolve({ behavior: "deny", message: "Tool approval is unavailable." });
|
package/dist/src/main.js
CHANGED
|
@@ -35,7 +35,9 @@ async function main() {
|
|
|
35
35
|
throw new Error("bootstrap_missing");
|
|
36
36
|
}
|
|
37
37
|
main().catch((error) => {
|
|
38
|
-
if (process.argv[2] !== "preflight" &&
|
|
38
|
+
if (process.argv[2] !== "preflight" &&
|
|
39
|
+
process.argv[2] !== "history" &&
|
|
40
|
+
process.argv[2] !== "models") {
|
|
39
41
|
const systemCode = error instanceof Error && "code" in error ? error.code : undefined;
|
|
40
42
|
const code = typeof systemCode === "string" &&
|
|
41
43
|
["EACCES", "EADDRINUSE", "EINVAL", "ENOENT", "ENAMETOOLONG", "ENOTDIR", "EPERM"].includes(systemCode)
|
package/dist/src/server.js
CHANGED
|
@@ -37,7 +37,8 @@ export function bootstrap(value) {
|
|
|
37
37
|
!Array.isArray(policy.disabled_tools) ||
|
|
38
38
|
policy.disabled_tools.some((tool) => typeof tool !== "string" || !tool.trim()) ||
|
|
39
39
|
(policy.tools !== null &&
|
|
40
|
-
(!Array.isArray(policy.tools) ||
|
|
40
|
+
(!Array.isArray(policy.tools) ||
|
|
41
|
+
policy.tools.some((tool) => typeof tool !== "string" || !tool.trim()))))
|
|
41
42
|
throw new ControlError("rejected", "invalid_execution_policy");
|
|
42
43
|
result.execution_policy = {
|
|
43
44
|
tools: policy.tools,
|