unique_orchestrator 2026.44.0.dev0__tar.gz → 2026.44.0.dev2__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.
- unique_orchestrator-2026.44.0.dev2/PKG-INFO +27 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/pyproject.toml +10 -10
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/unique_ai.py +42 -5
- unique_orchestrator-2026.44.0.dev0/PKG-INFO +0 -27
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/README.md +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/__init__.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/__init__.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/history_manager.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/inject_tool_reminders.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/loop_iteration_runner.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/open_file_setup.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/_builders/skill_setup.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/config.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/prompts/generic_reference_prompt.jinja2 +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/prompts/system_prompt.jinja2 +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/prompts/user_message_prompt.jinja2 +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/settings.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_agent_config_rjsf_ui_schema.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_build_loop_iteration_runner.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_config_services_validators.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_qwen_max_loop_iterations.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_register_code_interpreter_postprocessors.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_async_modify.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_execution_timing.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_get_filtered_user_metadata.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_log_tool_calls.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_loop_debug_params.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_persist_tool_calls.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_plan_or_execute_include.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_reference_order.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_render_system_prompt_user_instructions.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_unique_ai_token_usage.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/tests/test_utils_resolve_other_options.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/unique_ai_builder.py +0 -0
- {unique_orchestrator-2026.44.0.dev0 → unique_orchestrator-2026.44.0.dev2}/unique_orchestrator/utils.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: unique-orchestrator
|
|
3
|
+
Version: 2026.44.0.dev2
|
|
4
|
+
Summary:
|
|
5
|
+
Author: Andreas Hauri
|
|
6
|
+
Author-email: Andreas Hauri <andreas.hauri@unique.ai>
|
|
7
|
+
License: Proprietary
|
|
8
|
+
Requires-Dist: pydantic>=2.8.2,<3
|
|
9
|
+
Requires-Dist: pydantic-settings>=2.10.1,<3
|
|
10
|
+
Requires-Dist: typing-extensions>=4.9.0,<5
|
|
11
|
+
Requires-Dist: jinja2>=3.1.0,<4
|
|
12
|
+
Requires-Dist: unique-toolkit>=2026.44.0.dev7,<2026.44.0rc0
|
|
13
|
+
Requires-Dist: unique-stock-ticker>=2026.44.0.dev1,<2026.44.0rc0
|
|
14
|
+
Requires-Dist: unique-follow-up-questions>=2026.44.0.dev1,<2026.44.0rc0
|
|
15
|
+
Requires-Dist: unique-internal-search>=2026.44.0.dev1,<2026.44.0rc0
|
|
16
|
+
Requires-Dist: unique-deep-research>=2026.44.0.dev1,<2026.44.0rc0
|
|
17
|
+
Requires-Dist: unique-web-search>=2026.44.0.dev1,<2026.44.0rc0
|
|
18
|
+
Requires-Dist: unique-swot>=2026.44.0.dev1,<2026.44.0rc0
|
|
19
|
+
Requires-Dist: unique-skill-tool>=2026.44.0.dev1,<2026.44.0rc0
|
|
20
|
+
Requires-Dist: unique-user-memory>=2026.44.0.dev1,<2026.44.0rc0
|
|
21
|
+
Requires-Dist: openai>=1.109.1,<3
|
|
22
|
+
Requires-Python: >=3.12, <4
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Unique Orchestrator
|
|
26
|
+
|
|
27
|
+
Unique AI orchestrator agent to struct and direct subagents, tools and services
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "unique_orchestrator"
|
|
3
|
-
version = "2026.44.0.
|
|
3
|
+
version = "2026.44.0.dev2"
|
|
4
4
|
description = ""
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "Proprietary" }
|
|
@@ -13,15 +13,15 @@ dependencies = [
|
|
|
13
13
|
"pydantic-settings>=2.10.1,<3",
|
|
14
14
|
"typing-extensions>=4.9.0,<5",
|
|
15
15
|
"jinja2>=3.1.0,<4",
|
|
16
|
-
"unique-toolkit>=2026.44.0.
|
|
17
|
-
"unique-stock-ticker>=2026.44.0.
|
|
18
|
-
"unique-follow-up-questions>=2026.44.0.
|
|
19
|
-
"unique-internal-search>=2026.44.0.
|
|
20
|
-
"unique-deep-research>=2026.44.0.
|
|
21
|
-
"unique-web-search>=2026.44.0.
|
|
22
|
-
"unique-swot>=2026.44.0.
|
|
23
|
-
"unique-skill-tool>=2026.44.0.
|
|
24
|
-
"unique-user-memory>=2026.44.0.
|
|
16
|
+
"unique-toolkit>=2026.44.0.dev7,<2026.44.0rc0",
|
|
17
|
+
"unique-stock-ticker>=2026.44.0.dev1,<2026.44.0rc0",
|
|
18
|
+
"unique-follow-up-questions>=2026.44.0.dev1,<2026.44.0rc0",
|
|
19
|
+
"unique-internal-search>=2026.44.0.dev1,<2026.44.0rc0",
|
|
20
|
+
"unique-deep-research>=2026.44.0.dev1,<2026.44.0rc0",
|
|
21
|
+
"unique-web-search>=2026.44.0.dev1,<2026.44.0rc0",
|
|
22
|
+
"unique-swot>=2026.44.0.dev1,<2026.44.0rc0",
|
|
23
|
+
"unique-skill-tool>=2026.44.0.dev1,<2026.44.0rc0",
|
|
24
|
+
"unique-user-memory>=2026.44.0.dev1,<2026.44.0rc0",
|
|
25
25
|
"openai>=1.109.1,<3",
|
|
26
26
|
]
|
|
27
27
|
|
|
@@ -13,12 +13,17 @@ from unique_toolkit.agentic.debug_info_manager.debug_info_manager import (
|
|
|
13
13
|
)
|
|
14
14
|
from unique_toolkit.agentic.evaluation.evaluation_manager import EvaluationManager
|
|
15
15
|
from unique_toolkit.agentic.evaluation.schemas import EvaluationMetricName
|
|
16
|
+
from unique_toolkit.agentic.history_manager.context_overflow import (
|
|
17
|
+
ContextOverflowGuard,
|
|
18
|
+
is_context_window_exceeded_error,
|
|
19
|
+
)
|
|
16
20
|
from unique_toolkit.agentic.history_manager.history_manager import HistoryManager
|
|
17
21
|
from unique_toolkit.agentic.loop_runner import (
|
|
18
22
|
LoopIterationRunner,
|
|
19
23
|
ResponsesLoopIterationRunner,
|
|
20
24
|
SupportsInvocationStats,
|
|
21
25
|
)
|
|
26
|
+
from unique_toolkit.agentic.loop_runner.base import _LoopIterationRunnerKwargs
|
|
22
27
|
from unique_toolkit.agentic.message_log_manager.service import MessageStepLogger
|
|
23
28
|
from unique_toolkit.agentic.postprocessor.postprocessor_manager import (
|
|
24
29
|
PostprocessorManager,
|
|
@@ -631,7 +636,7 @@ class UniqueAI:
|
|
|
631
636
|
)
|
|
632
637
|
self._record_loop_debug_params(other_options)
|
|
633
638
|
|
|
634
|
-
kwargs:
|
|
639
|
+
kwargs: _LoopIterationRunnerKwargs = dict(
|
|
635
640
|
messages=messages,
|
|
636
641
|
iteration_index=self.current_iteration_index,
|
|
637
642
|
streaming_handler=self._streaming_handler, # type: ignore (constructor accepts only compatible arguments)
|
|
@@ -645,10 +650,36 @@ class UniqueAI:
|
|
|
645
650
|
other_options=other_options,
|
|
646
651
|
)
|
|
647
652
|
|
|
653
|
+
overflow_guard = ContextOverflowGuard(
|
|
654
|
+
logger=self._logger,
|
|
655
|
+
history_manager=self._history_manager,
|
|
656
|
+
token_counter=self._chat_service,
|
|
657
|
+
model=self._config.space.language_model,
|
|
658
|
+
)
|
|
659
|
+
|
|
660
|
+
async def _recompose() -> None:
|
|
661
|
+
await self._recompose_messages(kwargs)
|
|
662
|
+
|
|
663
|
+
await overflow_guard.preflight_token_budget(kwargs, _recompose)
|
|
664
|
+
|
|
665
|
+
try:
|
|
666
|
+
return await self._run_loop_iteration(kwargs)
|
|
667
|
+
except Exception as exc:
|
|
668
|
+
if not is_context_window_exceeded_error(exc):
|
|
669
|
+
raise
|
|
670
|
+
return await overflow_guard.retry_after_overflow(
|
|
671
|
+
exc,
|
|
672
|
+
recompose=_recompose,
|
|
673
|
+
run_iteration=lambda: self._run_loop_iteration(kwargs),
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
async def _run_loop_iteration(
|
|
677
|
+
self, kwargs: _LoopIterationRunnerKwargs
|
|
678
|
+
) -> LanguageModelStreamResponse:
|
|
648
679
|
# Experimental Feature UN-17905
|
|
649
680
|
if self._config.agent.experimental.open_file_tool_config.enabled:
|
|
650
681
|
try:
|
|
651
|
-
return await self._loop_iteration_runner(**kwargs)
|
|
682
|
+
return await self._loop_iteration_runner(**kwargs) # type: ignore[arg-type]
|
|
652
683
|
except Exception as exc:
|
|
653
684
|
if not self._open_file_runtime.should_retry_without_files(exc):
|
|
654
685
|
raise
|
|
@@ -658,13 +689,19 @@ class UniqueAI:
|
|
|
658
689
|
)
|
|
659
690
|
self._file_fallback_occurred = True
|
|
660
691
|
kwargs["messages"] = self._open_file_runtime.prepare_retry_messages(
|
|
661
|
-
messages=messages
|
|
692
|
+
messages=kwargs["messages"]
|
|
662
693
|
)
|
|
663
694
|
kwargs["tools"] = self._tool_manager.get_tool_definitions() # type: ignore (as above)
|
|
664
695
|
kwargs["tool_choices"] = self._tool_manager.get_forced_tools() # type: ignore (as above)
|
|
665
|
-
return await self._loop_iteration_runner(**kwargs)
|
|
696
|
+
return await self._loop_iteration_runner(**kwargs) # type: ignore[arg-type]
|
|
697
|
+
|
|
698
|
+
return await self._loop_iteration_runner(**kwargs) # type: ignore[arg-type]
|
|
666
699
|
|
|
667
|
-
|
|
700
|
+
async def _recompose_messages(self, kwargs: _LoopIterationRunnerKwargs) -> None:
|
|
701
|
+
kwargs["messages"] = await self._compose_message_plan_execution()
|
|
702
|
+
kwargs["content_chunks"] = (
|
|
703
|
+
self._history_manager.get_content_chunks_for_backend()
|
|
704
|
+
)
|
|
668
705
|
|
|
669
706
|
async def _process_plan(self, loop_response: LanguageModelStreamResponse) -> bool:
|
|
670
707
|
self._logger.info(
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: unique-orchestrator
|
|
3
|
-
Version: 2026.44.0.dev0
|
|
4
|
-
Summary:
|
|
5
|
-
Author: Andreas Hauri
|
|
6
|
-
Author-email: Andreas Hauri <andreas.hauri@unique.ai>
|
|
7
|
-
License: Proprietary
|
|
8
|
-
Requires-Dist: pydantic>=2.8.2,<3
|
|
9
|
-
Requires-Dist: pydantic-settings>=2.10.1,<3
|
|
10
|
-
Requires-Dist: typing-extensions>=4.9.0,<5
|
|
11
|
-
Requires-Dist: jinja2>=3.1.0,<4
|
|
12
|
-
Requires-Dist: unique-toolkit>=2026.44.0.dev0,<2026.44.0rc0
|
|
13
|
-
Requires-Dist: unique-stock-ticker>=2026.44.0.dev0,<2026.44.0rc0
|
|
14
|
-
Requires-Dist: unique-follow-up-questions>=2026.44.0.dev0,<2026.44.0rc0
|
|
15
|
-
Requires-Dist: unique-internal-search>=2026.44.0.dev0,<2026.44.0rc0
|
|
16
|
-
Requires-Dist: unique-deep-research>=2026.44.0.dev0,<2026.44.0rc0
|
|
17
|
-
Requires-Dist: unique-web-search>=2026.44.0.dev0,<2026.44.0rc0
|
|
18
|
-
Requires-Dist: unique-swot>=2026.44.0.dev0,<2026.44.0rc0
|
|
19
|
-
Requires-Dist: unique-skill-tool>=2026.44.0.dev0,<2026.44.0rc0
|
|
20
|
-
Requires-Dist: unique-user-memory>=2026.44.0.dev0,<2026.44.0rc0
|
|
21
|
-
Requires-Dist: openai>=1.109.1,<3
|
|
22
|
-
Requires-Python: >=3.12, <4
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
|
|
25
|
-
# Unique Orchestrator
|
|
26
|
-
|
|
27
|
-
Unique AI orchestrator agent to struct and direct subagents, tools and services
|
|
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
|