assistant 2.2.1b1__tar.gz → 2.2.2b1__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.
Files changed (120) hide show
  1. {assistant-2.2.1b1/assistant.egg-info → assistant-2.2.2b1}/PKG-INFO +3 -2
  2. {assistant-2.2.1b1 → assistant-2.2.2b1}/README.md +1 -1
  3. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/__init__.py +2 -1
  4. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/agent.py +61 -6
  5. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/builtin_cmds.py +505 -68
  6. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/main.py +54 -29
  7. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/memory.py +15 -2
  8. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/__init__.py +1 -0
  9. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/google.py +2 -1
  10. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/llama_cpp.py +1 -0
  11. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/nim.py +2 -1
  12. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/ollama.py +1 -0
  13. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/openai.py +1 -0
  14. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/providers/openrouter.py +8 -3
  15. assistant-2.2.2b1/assistant/nlp/providers/vllm.py +38 -0
  16. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/shell.py +157 -15
  17. assistant-2.2.2b1/assistant/search_objects.py +230 -0
  18. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/setup_wizard.py +49 -15
  19. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/tools.py +134 -26
  20. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/traces/cmd.py +1 -0
  21. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/traces/store.py +35 -1
  22. {assistant-2.2.1b1 → assistant-2.2.2b1/assistant.egg-info}/PKG-INFO +3 -2
  23. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant.egg-info/SOURCES.txt +4 -0
  24. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant.egg-info/requires.txt +1 -0
  25. {assistant-2.2.1b1 → assistant-2.2.2b1}/setup.py +1 -0
  26. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_builtin_cmds.py +67 -67
  27. assistant-2.2.2b1/tests/test_builtin_echo.py +559 -0
  28. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_listen_interrupt.py +8 -8
  29. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_memory.py +20 -0
  30. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_model_compare.py +1 -1
  31. assistant-2.2.2b1/tests/test_reasoning_effort.py +280 -0
  32. assistant-2.2.2b1/tests/test_search_objects.py +139 -0
  33. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_tool_handling.py +47 -0
  34. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_tools.py +76 -6
  35. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_traces_agent.py +15 -7
  36. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_tts_streaming.py +4 -10
  37. {assistant-2.2.1b1 → assistant-2.2.2b1}/xontrib/assistant.py +4 -3
  38. assistant-2.2.1b1/assistant/nlp/providers/vllm.py +0 -22
  39. {assistant-2.2.1b1 → assistant-2.2.2b1}/LICENSE +0 -0
  40. {assistant-2.2.1b1 → assistant-2.2.2b1}/MANIFEST.in +0 -0
  41. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/__main__.py +0 -0
  42. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/as_client.py +0 -0
  43. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/as_service.py +0 -0
  44. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/codecache.py +0 -0
  45. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/compress.py +0 -0
  46. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/conditions.py +0 -0
  47. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/config.py +0 -0
  48. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/display.py +0 -0
  49. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/entry_points/__init__.py +0 -0
  50. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/entry_points/run_assistant.py +0 -0
  51. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/envindex.py +0 -0
  52. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/execer.py +0 -0
  53. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/history.py +0 -0
  54. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/listen/__init__.py +0 -0
  55. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/listen/__main__.py +0 -0
  56. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/listen/interface.py +0 -0
  57. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/listen/main.py +0 -0
  58. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/__init__.py +0 -0
  59. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/clear.py +0 -0
  60. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/exit.py +0 -0
  61. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/http_client.py +0 -0
  62. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/interface.py +0 -0
  63. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/message.py +0 -0
  64. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/think.py +0 -0
  65. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/nlp/xonsh.py +0 -0
  66. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/parser.py +0 -0
  67. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/projectfile.py +0 -0
  68. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/__init__.py +0 -0
  69. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/bindings.py +0 -0
  70. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/completer.py +0 -0
  71. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/dialogs.py +0 -0
  72. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/floats.py +0 -0
  73. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/layout.py +0 -0
  74. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/operators.py +0 -0
  75. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/strformat_utils.py +0 -0
  76. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/styles.py +0 -0
  77. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/toolbox.py +0 -0
  78. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/ptk_shell/windows.py +0 -0
  79. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/say/__init__.py +0 -0
  80. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/say/interface.py +0 -0
  81. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/time.py +0 -0
  82. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/tools_worker.py +0 -0
  83. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/traces/__init__.py +0 -0
  84. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/traces/export.py +0 -0
  85. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/traces/schema.py +0 -0
  86. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/utils.py +0 -0
  87. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/version.py +0 -0
  88. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant/vocabulary.py +0 -0
  89. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant.egg-info/dependency_links.txt +0 -0
  90. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant.egg-info/entry_points.txt +0 -0
  91. {assistant-2.2.1b1 → assistant-2.2.2b1}/assistant.egg-info/top_level.txt +0 -0
  92. {assistant-2.2.1b1 → assistant-2.2.2b1}/pyproject.toml +0 -0
  93. {assistant-2.2.1b1 → assistant-2.2.2b1}/setup.cfg +0 -0
  94. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_bindings.py +0 -0
  95. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_compaction.py +0 -0
  96. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_compress.py +0 -0
  97. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_config.py +0 -0
  98. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_display.py +0 -0
  99. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_envindex.py +0 -0
  100. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_envindex_suggestions.py +0 -0
  101. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_git_hook.py +0 -0
  102. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_history_bridge.py +0 -0
  103. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_http_client.py +0 -0
  104. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_init.py +0 -0
  105. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_interrupt.py +0 -0
  106. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_interrupt_real.py +0 -0
  107. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_join_live.py +0 -0
  108. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_memory_sqlite.py +0 -0
  109. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_projectfile.py +0 -0
  110. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_setup_wizard.py +0 -0
  111. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_startup_performance.py +0 -0
  112. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_thinking_loop.py +0 -0
  113. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_tmux_interactive.py +0 -0
  114. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_traces_cmd.py +0 -0
  115. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_traces_export.py +0 -0
  116. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_traces_schema.py +0 -0
  117. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_traces_store.py +0 -0
  118. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_utils.py +0 -0
  119. {assistant-2.2.1b1 → assistant-2.2.2b1}/tests/test_xontrib.py +0 -0
  120. {assistant-2.2.1b1 → assistant-2.2.2b1}/xontrib/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assistant
3
- Version: 2.2.1b1
3
+ Version: 2.2.2b1
4
4
  Summary: Your very own Assistant. Because you deserve it.
5
5
  Home-page: https://gitlab.com/waser-technologies/technologies/assistant
6
6
  Author: Danny Waser
@@ -29,6 +29,7 @@ Requires-Dist: xonsh
29
29
  Requires-Dist: prompt_toolkit>3.0.36
30
30
  Requires-Dist: questionary
31
31
  Requires-Dist: colorama
32
+ Requires-Dist: click
32
33
  Requires-Dist: rich
33
34
  Requires-Dist: halo
34
35
  Requires-Dist: requests
@@ -436,7 +437,7 @@ Toggle shortcuts (Ctrl+O, Ctrl+Q) update the config automatically when pressed,
436
437
 
437
438
  ## Use Assistant as Your Default Shell
438
439
 
439
- Assistant is a full Xonsh shell, so it reads the same RC files (`~/.config/xonsh/rc.xsh` or `~/.xonshrc`) which means your existing config carries over as-is.
440
+ Assistant is a full Xonsh shell, so it reads the same RC files (`~/.config/xonsh/rc.xsh` or `~/.config/xonsh/rc.d/`) which means your existing config carries over as-is.
440
441
 
441
442
  Read more about Xonsh [Installation Guide](https://xon.sh/install.html) and its [Run Control Files](https://xon.sh/xonshrc.html).
442
443
 
@@ -385,7 +385,7 @@ Toggle shortcuts (Ctrl+O, Ctrl+Q) update the config automatically when pressed,
385
385
 
386
386
  ## Use Assistant as Your Default Shell
387
387
 
388
- Assistant is a full Xonsh shell, so it reads the same RC files (`~/.config/xonsh/rc.xsh` or `~/.xonshrc`) which means your existing config carries over as-is.
388
+ Assistant is a full Xonsh shell, so it reads the same RC files (`~/.config/xonsh/rc.xsh` or `~/.config/xonsh/rc.d/`) which means your existing config carries over as-is.
389
389
 
390
390
  Read more about Xonsh [Installation Guide](https://xon.sh/install.html) and its [Run Control Files](https://xon.sh/xonshrc.html).
391
391
 
@@ -5,7 +5,7 @@ import warnings
5
5
  warnings.filterwarnings("ignore", category=DeprecationWarning, module="webrtcvad")
6
6
  warnings.filterwarnings("ignore", category=UserWarning, module="webrtcvad")
7
7
 
8
- __version__ = "2.2.1b1"
8
+ __version__ = "2.2.2b1"
9
9
 
10
10
  USERNAME = os.environ.get("USER", "root")
11
11
  HOME = os.environ.get("HOME", f"/home/{USERNAME}" if USERNAME != "root" else "/root")
@@ -62,6 +62,7 @@ DEFAULT_CONFIG = {
62
62
  "provider": "ollama",
63
63
  "context_length": 256000,
64
64
  "think": False,
65
+ "reasoning_effort": None,
65
66
  "temperature": 0.1,
66
67
  "max_token": 1,
67
68
  },
@@ -19,6 +19,19 @@ from assistant.tools import TOOL_REGISTRY
19
19
  from assistant.traces.store import store as trace_store
20
20
  from assistant.utils import count_message_tokens, count_messages_tokens
21
21
 
22
+ # Appended to a search tool's output so the model knows the structured result
23
+ # object landed in the session (see _process_tool_calls).
24
+ CONVERSATION_SEARCH_HINT = (
25
+ "\n\nResults assigned to __conversation__ in the session environment. "
26
+ "You can interact with them using the xonsh tool. Use `__conversation__?` "
27
+ "to get more information about them."
28
+ )
29
+ MEMORY_SEARCH_HINT = (
30
+ "\n\nResults assigned to __memory__ in the session environment. "
31
+ "You can interact with them using the xonsh tool. Use `__memory__?` "
32
+ "to get more information about them."
33
+ )
34
+
22
35
 
23
36
  # Handoff exception to break the tool loop and switch agents
24
37
  class AgentHandoff(Exception):
@@ -48,7 +61,7 @@ class Agent:
48
61
  # of 4096 tokens for the agent, so the completer's max_token=1 is safely overridden.
49
62
  self.max_tokens = max(4096, int(model_cfg.get("max_token", 4096)))
50
63
  self.think = model_cfg.get("think", False)
51
-
64
+ self.reasoning_effort = model_cfg.get("reasoning_effort", None)
52
65
  # Resolve Provider
53
66
  provider_id = model_cfg.get("provider", "ollama")
54
67
  provider_cfg = cfg.get_provider_config(provider_id)
@@ -262,7 +275,15 @@ class Orchestrator:
262
275
  try:
263
276
  from xonsh.built_ins import XSH
264
277
 
265
- vital = {k: v for k, v in XSH.ctx.items() if k.startswith("__")}
278
+ # Stale search results across a reset would mislead the next
279
+ # session — drop them (they start with __ and would otherwise
280
+ # survive the vital filter).
281
+ stale_search = ("__conversation__", "__memory__")
282
+ vital = {
283
+ k: v
284
+ for k, v in XSH.ctx.items()
285
+ if k.startswith("__") and k not in stale_search
286
+ }
266
287
  XSH.ctx.clear()
267
288
  XSH.ctx.update(vital)
268
289
  except Exception:
@@ -779,12 +800,16 @@ class Orchestrator:
779
800
  None if self._is_intro else (agent.tools if agent.tools else None)
780
801
  )
781
802
  use_think = False if self._is_intro else agent.think
803
+ use_reasoning_effort = (
804
+ None if self._is_intro else agent.reasoning_effort
805
+ )
782
806
 
783
807
  kwargs = agent.provider.build_chat_kwargs(
784
808
  model=agent.model_name,
785
809
  messages=api_messages,
786
810
  temperature=self._cfg.temperature,
787
811
  think=use_think,
812
+ reasoning_effort=use_reasoning_effort,
788
813
  tools=use_tools,
789
814
  max_tokens=agent.max_tokens,
790
815
  )
@@ -1413,6 +1438,7 @@ class Orchestrator:
1413
1438
  # user display (issue #10: they must always be the same).
1414
1439
  content = res["content"] or ""
1415
1440
  display_output = content
1441
+ compressed = False
1416
1442
  if content:
1417
1443
  bound = getattr(self._cfg, "max_tool_output_in_context", None)
1418
1444
  if not bound:
@@ -1430,6 +1456,22 @@ class Orchestrator:
1430
1456
  command=cmd_display if fn_name == "xonsh" else fn_name,
1431
1457
  limit=bound,
1432
1458
  )
1459
+ compressed = True
1460
+
1461
+ # Search tools inject a structured result object into the
1462
+ # session (__conversation__ / __memory__); surface that to the
1463
+ # model so it can refine/display them via the xonsh tool. The
1464
+ # hint rides both the display output and (when compressed) the
1465
+ # restored full output.
1466
+ result_kind = res.get("result_kind")
1467
+ if result_kind == "conversation":
1468
+ hint = CONVERSATION_SEARCH_HINT
1469
+ elif result_kind == "memory":
1470
+ hint = MEMORY_SEARCH_HINT
1471
+ else:
1472
+ hint = ""
1473
+ if hint:
1474
+ display_output += hint
1433
1475
 
1434
1476
  event = {
1435
1477
  "type": "tool_output",
@@ -1452,8 +1494,8 @@ class Orchestrator:
1452
1494
  "name": fn_name,
1453
1495
  "content": display_output,
1454
1496
  }
1455
- if display_output != content:
1456
- tool_msg["_full_output"] = content
1497
+ if compressed:
1498
+ tool_msg["_full_output"] = content + hint
1457
1499
  tool_msg["_compressed"] = True
1458
1500
  # Optimization: populate cache immediately
1459
1501
  tool_msg["_tokens"] = count_message_tokens(tool_msg)
@@ -1470,12 +1512,25 @@ class Orchestrator:
1470
1512
  return handoff_target
1471
1513
 
1472
1514
  def _get_tool_display_name(self, name, args):
1515
+ """Return the user-facing display text for a tool call.
1516
+
1517
+ Always shows the tool's primary argument value (when given) so the
1518
+ input box never repeats the ``tool_name(...)`` wrapper the title
1519
+ already provides. Falls back to the bare tool name when no argument
1520
+ is meaningful.
1521
+ """
1473
1522
  if name == "xonsh":
1474
1523
  return args.get("code", "")
1475
1524
  if name == "web_search":
1476
- return f'web_search("{args.get("query", "")}")'
1525
+ return args.get("query", "") or name
1477
1526
  if name == "memory_search":
1478
- return f'memory_search("{args.get("query", "")}")'
1527
+ return args.get("query", "") or name
1528
+ if name == "memory_add":
1529
+ return args.get("text", "") or name
1530
+ if name == "cmd_search":
1531
+ return args.get("query", "") or name
1532
+ if name == "search_conversation":
1533
+ return args.get("query", "") or name
1479
1534
  return name
1480
1535
 
1481
1536
  def _handle_handoff_return(self, agent_name, response, context_messages, agent_id):