@yahyahammad/venastine 0.1.0 → 0.2.0
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/README.md +19 -2
- package/agents/subagent_tool.py +49 -26
- package/agents/tui_commands.py +24 -9
- package/core/agent_activity.py +118 -0
- package/core/client.py +11 -0
- package/core/compaction.py +971 -959
- package/core/loop.py +1490 -1353
- package/core/memory.py +370 -370
- package/core/replay.py +183 -167
- package/main.py +3 -1
- package/memories/tui_commands.py +14 -2
- package/package.json +73 -73
- package/pyproject.toml +100 -100
- package/safety/policy_enforcement.py +746 -682
- package/storage.py +1005 -1005
- package/tools/registry.py +29 -1
- package/tui/app.py +707 -30
- package/tui/app.tcss +106 -8
- package/tui/commands.py +170 -61
- package/tui/history.py +128 -0
- package/tui/markdown.py +1279 -0
- package/tui/meters.py +268 -0
- package/tui/themes.py +559 -366
- package/tui/widgets.py +1168 -75
package/tools/registry.py
CHANGED
|
@@ -42,7 +42,8 @@ from security.permissions import (
|
|
|
42
42
|
)
|
|
43
43
|
from safety.policy_enforcement import (check_input_policy,
|
|
44
44
|
check_output_policy,
|
|
45
|
-
param_digest
|
|
45
|
+
param_digest,
|
|
46
|
+
redacted_values)
|
|
46
47
|
from agents import subagent_tool
|
|
47
48
|
|
|
48
49
|
logger = logging.getLogger(__name__)
|
|
@@ -68,6 +69,13 @@ _INJECTABLE_PARAMS = (
|
|
|
68
69
|
# comment above anticipated a third name arriving without touching
|
|
69
70
|
# dispatch() again; this is it.
|
|
70
71
|
"memory",
|
|
72
|
+
# Batch 59: the core/agent_activity.py sink, for spawn_subagent. A
|
|
73
|
+
# shell watching the agent stack has to learn about a run that
|
|
74
|
+
# happens INSIDE a tool call, which is the one place a LoopEvent
|
|
75
|
+
# cannot reach -- see that module for why. Injected rather than
|
|
76
|
+
# threaded through params because it is a run-scoped value, exactly
|
|
77
|
+
# like response_channel beside it.
|
|
78
|
+
"activity",
|
|
71
79
|
)
|
|
72
80
|
|
|
73
81
|
|
|
@@ -486,6 +494,24 @@ class ToolRegistry:
|
|
|
486
494
|
key = self.rationale_param(tool_name)
|
|
487
495
|
return param_digest(params, omit=(key,) if key else ())
|
|
488
496
|
|
|
497
|
+
def call_links(self, tool_name: str, params) -> tuple:
|
|
498
|
+
"""The untruncated values behind that summary (batch 65).
|
|
499
|
+
|
|
500
|
+
`call_digest` caps a value at 60 characters, which is shorter
|
|
501
|
+
than most real URLs, so the transcript resolves a truncated
|
|
502
|
+
span against these to arm a ctrl+click. Redacted, and with any
|
|
503
|
+
value the redactor rewrote dropped -- `redacted_values` says
|
|
504
|
+
why a target may never come from the raw params.
|
|
505
|
+
|
|
506
|
+
THE SAME `omit`, which is the whole reason this sits here
|
|
507
|
+
rather than being called direct (Section 42, RA3): the two
|
|
508
|
+
halves describe one call, and a candidate drawn from a
|
|
509
|
+
parameter the line does not show is a target no span could
|
|
510
|
+
resolve to.
|
|
511
|
+
"""
|
|
512
|
+
key = self.rationale_param(tool_name)
|
|
513
|
+
return redacted_values(params, omit=(key,) if key else ())
|
|
514
|
+
|
|
489
515
|
def request_kind(self, tool_name: str) -> str:
|
|
490
516
|
"""Which kind of question approving this tool asks (§23).
|
|
491
517
|
|
|
@@ -573,6 +599,7 @@ class ToolRegistry:
|
|
|
573
599
|
response_channel=None,
|
|
574
600
|
signoff=None,
|
|
575
601
|
memory=None,
|
|
602
|
+
activity=None,
|
|
576
603
|
) -> dict:
|
|
577
604
|
# Unknown-tool guard: ValueError, deliberately NOT ToolCallDenied.
|
|
578
605
|
# The two exception types separate "you misnamed it" from "policy
|
|
@@ -645,6 +672,7 @@ class ToolRegistry:
|
|
|
645
672
|
"response_channel": response_channel,
|
|
646
673
|
"signoff": signoff,
|
|
647
674
|
"memory": memory,
|
|
675
|
+
"activity": activity,
|
|
648
676
|
}
|
|
649
677
|
injected = {p: available[p] for p in self._injectable.get(tool_name, ())}
|
|
650
678
|
try:
|