monkeybot-cli 0.7.0__tar.gz → 0.8.0__tar.gz
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.
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/PKG-INFO +1 -1
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/pyproject.toml +1 -1
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_session.py +36 -1
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/.gitignore +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/skills/monkeybot/SKILL.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/skills/monkeybot/references/config-sections.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/__init__.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_file_index.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_local_shell.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_renderer.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_status_bar.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_theme.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_tool_display.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_tui.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/chat_tui_widgets.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/__init__.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/chat.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/doctor.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/loop.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/new.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/refresh.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/run_cmd.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/talk.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/commands/validate.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/compat.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/config_resolve.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/exit_commands.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/extras_catalog.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/gateway_health.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/main.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/opensandbox_lifecycle.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/output.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/process_tree.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/providers.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/__init__.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/audio_io.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/client.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/gateway_manager.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/push_to_talk.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/session.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/session_controller.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/talk_ui.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/wire_encode.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/runtime_python.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/AGENT.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/Dockerfile +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/__init__.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/browser/SKILL.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/command_allowlist.yaml +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/dockerignore +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/env.example +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/goal/SKILL.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/image-generator/SKILL.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/image-generator/generate_image.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/loop/SKILL.md +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/mcp.json +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/monkeybot.example.yaml +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/opensandbox.docker.toml +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/otel-collector.example.yaml +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/permissions.yaml +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/session_controller.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/terminal_markdown.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_continue.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_e2e.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_errors.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_file_index.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_grounding.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_local_shell.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_renderer_parity.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_session.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_status_bar.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_theme.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_tool_display.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_chat_tui.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_cli.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_config_resolve.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_doctor.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_extras_catalog.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_gateway_health.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_opensandbox_lifecycle.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_realtime_session_controller.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_run_cmd.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_runtime_python.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_scaffold.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/tests/test_terminal_markdown.py +0 -0
- {monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/uv.lock +0 -0
|
@@ -16,6 +16,7 @@ from typing import Any, Literal
|
|
|
16
16
|
import httpx
|
|
17
17
|
from monkeybot.core.runtime.events import (
|
|
18
18
|
ActionRequiredEvent,
|
|
19
|
+
AskUserRequestEvent,
|
|
19
20
|
AssistantDelta,
|
|
20
21
|
ContextSummarized,
|
|
21
22
|
ContextSummarizing,
|
|
@@ -41,7 +42,12 @@ HitlReaderFn = Callable[["HitlRequest"], Any] # async (HitlRequest) -> HitlAnsw
|
|
|
41
42
|
|
|
42
43
|
HitlKind = Literal["confirm", "elicit", "frontend_unsupported"]
|
|
43
44
|
|
|
44
|
-
_HITL_TYPES = (
|
|
45
|
+
_HITL_TYPES = (
|
|
46
|
+
ToolConfirmationRequestEvent,
|
|
47
|
+
AskUserRequestEvent,
|
|
48
|
+
ActionRequiredEvent,
|
|
49
|
+
FrontendToolRequestEvent,
|
|
50
|
+
)
|
|
45
51
|
|
|
46
52
|
_RECONNECT_INITIAL_DELAY = 0.5
|
|
47
53
|
_RECONNECT_MAX_DELAY = 15.0
|
|
@@ -717,6 +723,9 @@ class ChatSessionController:
|
|
|
717
723
|
if isinstance(evt, ToolConfirmationRequestEvent):
|
|
718
724
|
await self._handle_tool_confirm(evt)
|
|
719
725
|
return
|
|
726
|
+
if isinstance(evt, AskUserRequestEvent):
|
|
727
|
+
await self._handle_ask_user(evt)
|
|
728
|
+
return
|
|
720
729
|
if isinstance(evt, ActionRequiredEvent):
|
|
721
730
|
await self._handle_elicit(evt)
|
|
722
731
|
|
|
@@ -753,6 +762,32 @@ class ChatSessionController:
|
|
|
753
762
|
if answer.cancelled or not ok:
|
|
754
763
|
self._turn_abort.set()
|
|
755
764
|
|
|
765
|
+
async def _handle_ask_user(self, evt: AskUserRequestEvent) -> None:
|
|
766
|
+
assert self.session_id is not None
|
|
767
|
+
choices = "\n".join(f"- {choice}" for choice in evt.choices)
|
|
768
|
+
prompt = evt.question or "The agent asked a question."
|
|
769
|
+
if choices:
|
|
770
|
+
prompt = f"{prompt}\n{choices}"
|
|
771
|
+
answer = await self._await_hitl(
|
|
772
|
+
HitlRequest(
|
|
773
|
+
kind="elicit",
|
|
774
|
+
prompt=prompt,
|
|
775
|
+
tool_call_id=evt.tool_call_id,
|
|
776
|
+
tool_name="ask_user",
|
|
777
|
+
)
|
|
778
|
+
)
|
|
779
|
+
text = "" if answer.cancelled else answer.text.strip()
|
|
780
|
+
if not text:
|
|
781
|
+
self.abort_turn()
|
|
782
|
+
return
|
|
783
|
+
ok = await self._post_hitl(
|
|
784
|
+
f"{self.base}/sessions/{self.session_id}/ask-user/{evt.tool_call_id}",
|
|
785
|
+
{"answer": text},
|
|
786
|
+
label="Ask user",
|
|
787
|
+
)
|
|
788
|
+
if not ok:
|
|
789
|
+
self.abort_turn()
|
|
790
|
+
|
|
756
791
|
async def _handle_elicit(self, evt: ActionRequiredEvent) -> None:
|
|
757
792
|
assert self.session_id is not None
|
|
758
793
|
payload = dict(evt.payload) if evt.payload else {}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/realtime/session_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/browser/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/dockerignore
RENAMED
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/goal/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/loop/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{monkeybot_cli-0.7.0 → monkeybot_cli-0.8.0}/src/monkeybot_cli/scaffold_defaults/permissions.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|