Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ dev = [

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
norecursedirs = ["reference"]
4 changes: 3 additions & 1 deletion src/astra/permissions/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ def check(self, tool_name: str, tool_input: dict[str, Any]) -> PermissionDecisio
return PermissionDecision.ALLOW
if tool_name in ALWAYS_ASK_DEFAULT:
return PermissionDecision.ASK
return PermissionDecision.ALLOW
# Unknown tools not in ALWAYS_ALLOW or ALWAYS_ASK_DEFAULT require
# confirmation in DEFAULT mode rather than silently executing.
return PermissionDecision.ASK
2 changes: 2 additions & 0 deletions src/astra/session/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def save(self, session_id: str, messages: list[dict], usage: Usage) -> str:
"usage": {
"input_tokens": usage.input_tokens,
"output_tokens": usage.output_tokens,
"cache_creation_input_tokens": usage.cache_creation_input_tokens,
"cache_read_input_tokens": usage.cache_read_input_tokens,
},
}
path.write_text(json.dumps(data, indent=2, default=str))
Expand Down
Loading