@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/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: