phosphor-harness 0.4.3 → 0.4.4
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/package.json +1 -1
- package/pyproject.toml +1 -1
- package/sophon_harness/ornith.py +4 -0
- package/sophon_harness/tools.py +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phosphor-harness",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Local multimodal voice, vision and tool harness for Phosphor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {"type": "git", "url": "git+https://github.com/robit-man/phosphor-harness.git"},
|
package/pyproject.toml
CHANGED
package/sophon_harness/ornith.py
CHANGED
|
@@ -368,6 +368,10 @@ class OrnithBackplane:
|
|
|
368
368
|
rendered = _system_instruction(rendered, "Tool discovery only opened the matching schemas. "
|
|
369
369
|
"For a requested action or current observation, call the matching tool "
|
|
370
370
|
"and use its receipt before answering.")
|
|
371
|
+
if "subagent_delegate" in result_names:
|
|
372
|
+
rendered = _system_instruction(rendered, "A successful delegation receipt includes the completed task ID. "
|
|
373
|
+
"Use that same ID with subagent_result or subagent_forget if requested. "
|
|
374
|
+
"A new delegation starts separate work.")
|
|
371
375
|
if media is not None and media.visual_evidence and not rounds:
|
|
372
376
|
rendered = _system_instruction(
|
|
373
377
|
rendered, "Use visual observations only as evidence for user-specified conditions. "
|
package/sophon_harness/tools.py
CHANGED
|
@@ -77,6 +77,9 @@ def active_tools(definitions, messages, audio_index, *, explicitly_requested=Non
|
|
|
77
77
|
if message.get("name") == "peripheral_inventory" and envelope.get("status") == "ok":
|
|
78
78
|
observed = data.get("observed_device_categories", [])
|
|
79
79
|
chosen.update(tool for key, tool in _DEVICE_TOOLS.items() if key in data or key in observed)
|
|
80
|
+
if (message.get("name") == "subagent_delegate" and envelope.get("status") == "ok"
|
|
81
|
+
and data.get("status") == "completed" and isinstance(data.get("task_id"), str)):
|
|
82
|
+
chosen.update(("subagent_result", "subagent_forget"))
|
|
80
83
|
return [item for item in definitions if item["function"]["name"] in chosen]
|
|
81
84
|
|
|
82
85
|
|