Guide models to read-only inspection: prompt rules, pipes and find in the read-only gate, approval stats
This commit is contained in:
1 parent
8345d0f504
commit
37dfbc3102
7 files changed
+70
-11
No files matched your search
@@ -1,13 +1,13 @@
|
||||
"""Scripted fake of the Anthropic SSE API for end-to-end tests of `hx -p`.
|
||||
|
||||
Turn 1: tool_use write hello.txt. Turn 2: tool_use bash sort. Turn 3: final text.
|
||||
Turn 1: tool_use write hello.txt. Turn 2: tool_use bash sed. Turn 3: final text.
|
||||
Usage: python3 tests/fake_anthropic.py PORT [TURNS.json]
|
||||
"""
|
||||
import http.server, json, sys
|
||||
|
||||
TURNS = [
|
||||
[("tool_use", {"id": "t1", "name": "Write", "input": {"path": "hello.txt", "content": "hi from hx\n"}})],
|
||||
[("tool_use", {"id": "t2", "name": "Bash", "input": {"command": "sort hello.txt"}})],
|
||||
[("tool_use", {"id": "t2", "name": "Bash", "input": {"command": "sed -n p hello.txt"}})],
|
||||
[("text", "Done: file says hi from hx.")],
|
||||
]
|
||||
if len(sys.argv) > 2: # optional scripted turns: JSON [[["tool_use", {...}] | ["text", "..."], ...], ...]
|
||||
|
||||
Reference in new issue
Block a user