mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
fix(sdk): address approval interface review findings
This commit is contained in:
1 parent
0ff3d1ddd2
commit
50fb069e7e
19 files changed
+52
-37
No files matched your search
@@ -76,7 +76,7 @@ with HarnessClient(HarnessConfig(dsh_home="/absolute/path/to/dsh-home")) as clie
|
||||
print(question.toolName, question.reason)
|
||||
client.respond(request.id, {"outcome": "rejected"})
|
||||
else:
|
||||
client.respond_error(request.id, -32601, "Unsupported client request")
|
||||
client.respond_error(request.id, code=-32601, message="Unsupported client request")
|
||||
```
|
||||
|
||||
## Customize plugins
|
||||
|
||||
@@ -76,7 +76,7 @@ with HarnessClient(HarnessConfig(dsh_home="/absolute/path/to/dsh-home")) as clie
|
||||
print(question.toolName, question.reason)
|
||||
client.respond(request.id, {"outcome": "rejected"})
|
||||
else:
|
||||
client.respond_error(request.id, -32601, "Unsupported client request")
|
||||
client.respond_error(request.id, code=-32601, message="Unsupported client request")
|
||||
```
|
||||
|
||||
## 自定义插件
|
||||
|
||||
@@ -23,7 +23,7 @@ def test_python_approval_controls_runtime_operation(tmp_path: Path, outcome: str
|
||||
binary = repo / "apps/cli/lib/bin.js"
|
||||
if node is None or not binary.exists():
|
||||
pytest.skip("requires Node and built dsh CLI")
|
||||
fixture = repo / "apps/cli/tests/profiles/sdk/fixtures/approval.mjs"
|
||||
fixture = repo / "packages/sdk/server/tests/fixtures/approval.mjs"
|
||||
marker = tmp_path / "approved.txt"
|
||||
patch = tmp_path / "approval.patch.yml"
|
||||
patch.write_text("- insert:\n - id: approval-fixture\n name: " + json.dumps(str(fixture))
|
||||
|
||||
Reference in new issue
Block a user