kweaver-dolphin 0.2.0__tar.gz → 0.2.2__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.
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/PKG-INFO +1 -1
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/pyproject.toml +3 -16
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/runner/runner.py +20 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/ui/console.py +29 -11
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/utils/helpers.py +4 -4
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/agent/base_agent.py +2 -2
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/basic_code_block.py +140 -30
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/explore_block.py +353 -29
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/explore_block_v2.py +21 -17
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/explore_strategy.py +1 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/judge_block.py +10 -1
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/skill_call_deduplicator.py +32 -10
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/tool_block.py +12 -3
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/constants.py +25 -1
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/config/global_config.py +35 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context/context.py +168 -5
- kweaver_dolphin-0.2.2/src/dolphin/core/context/cow_context.py +392 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/flags/definitions.py +2 -2
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/runtime/runtime_instance.py +31 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/context_retention.py +3 -3
- kweaver_dolphin-0.2.2/src/dolphin/core/task_registry.py +404 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/__init__.py +0 -2
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/__init__.py +2 -2
- kweaver_dolphin-0.2.2/src/dolphin/lib/skillkits/plan_skillkit.py +756 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/system_skillkit.py +103 -30
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/skill/global_skills.py +43 -3
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/kweaver_dolphin.egg-info/PKG-INFO +1 -1
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/kweaver_dolphin.egg-info/SOURCES.txt +3 -1
- kweaver_dolphin-0.2.2/src/kweaver_dolphin.egg-info/entry_points.txt +15 -0
- kweaver_dolphin-0.2.0/src/dolphin/lib/skillkits/plan_act_skillkit.py +0 -452
- kweaver_dolphin-0.2.0/src/kweaver_dolphin.egg-info/entry_points.txt +0 -27
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/LICENSE.txt +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/README.md +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/setup.cfg +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/DolphinLanguageSDK/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/args/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/args/parser.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/builtin_agents/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/commands/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/interrupt/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/interrupt/handler.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/interrupt/keyboard.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/main.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/multimodal/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/multimodal/clipboard.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/multimodal/handler.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/multimodal/image_processor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/multimodal/input_parser.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/runner/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/ui/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/ui/input.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/ui/layout.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/ui/stream_renderer.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/utils/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/cli/utils/version.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/agent/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/agent/agent_state.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/agent_init_block.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/assign_block.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/prompt_block.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/enums.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/exceptions.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/multimodal.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/object_type.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/output_format.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/common/types.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/config/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/config/ontology_config.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context/context_manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context/var_output.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context/variable_pool.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/config/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/config/settings.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/core/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/core/budget_manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/core/context_assembler.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/core/context_manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/core/tokenizer_service.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/example/incremental_example.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/example/traditional_example.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/services/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/services/compressor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/utils/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/utils/context_utils.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/utils/message_formatter.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/context_engineer/utils/token_utils.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/context_snapshot.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/context_snapshot_profile.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/context_snapshot_store.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/execution_frame.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/execution_state_registry.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/resume_handle.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/coroutine/step_result.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/executor/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/executor/debug_controller.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/executor/dolphin_executor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/executor/executor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/flags/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/flags/manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/hook/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/hook/expression_evaluator.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/hook/hook_dispatcher.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/hook/hook_types.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/hook/isolated_variable_pool.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/interfaces.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/llm/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/llm/llm.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/llm/llm_call.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/llm/llm_client.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/llm/message_sanitizer.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/logging/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/logging/logger.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/message/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/message/compressor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/parser/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/parser/parser.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/runtime/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/runtime/runtime_graph.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/skill_function.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/skill_matcher.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/skill/skillset.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/trajectory/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/trajectory/recorder.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/trajectory/trajectory.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/utils/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/utils/cache_kv.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/utils/tools.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/debug/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/debug/visualizer.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/async_processor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/llm_calls.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/sandbox.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/storage.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/memory/utils.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/basic/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/basic/base.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/basic/concept.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/basic/object.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/basic/relation.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/datasource/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/datasource/datasource.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/datasource/oracle_datasource.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/datasource/sql.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/mapping.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/ontology.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/ontology_context.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/ontology/ontology_manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/cache_backend.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/result_processor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/result_reference.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/skillkit_hook.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/strategies.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skill_results/strategy_registry.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/agent_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/cognitive_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/env_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/mcp_adapter.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/mcp_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/memory_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/noop_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/ontology_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/models/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/models/skill_config.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/models/skill_meta.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/resource_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/skill_cache.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/skill_loader.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource/skill_validator.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/resource_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/search_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/sql_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/skillkits/vm_skillkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/utils/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/utils/data_process.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/utils/handle_progress.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/utils/security.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/utils/text_retrieval.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/vm/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/vm/env_executor.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/vm/python_session_manager.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/lib/vm/vm.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/agent/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/agent/agent_factory.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/agent/dolphin_agent.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/api/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/runtime/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/runtime/env.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/skill/__init__.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/sdk/skill/traditional_toolkit.py +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/kweaver_dolphin.egg-info/dependency_links.txt +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/kweaver_dolphin.egg-info/requires.txt +0 -0
- {kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/kweaver_dolphin.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "kweaver-dolphin"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Dolphin Language - An intelligent agent framework"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "AnyData", email = "contact@anydata.com"}
|
|
@@ -82,26 +82,13 @@ search = "dolphin.lib.skillkits.search_skillkit:SearchSkillkit"
|
|
|
82
82
|
sql = "dolphin.lib.skillkits.sql_skillkit:SQLSkillkit"
|
|
83
83
|
memory = "dolphin.lib.skillkits.memory_skillkit:MemorySkillkit"
|
|
84
84
|
ontology = "dolphin.lib.skillkits.ontology_skillkit:OntologySkillkit"
|
|
85
|
-
|
|
85
|
+
plan = "dolphin.lib.skillkits.plan_skillkit:PlanSkillkit"
|
|
86
86
|
cognitive = "dolphin.lib.skillkits.cognitive_skillkit:CognitiveSkillkit"
|
|
87
87
|
vm = "dolphin.lib.skillkits.vm_skillkit:VMSkillkit"
|
|
88
88
|
noop = "dolphin.lib.skillkits.noop_skillkit:NoopSkillkit"
|
|
89
89
|
mcp = "dolphin.lib.skillkits.mcp_skillkit:MCPSkillkit"
|
|
90
90
|
resource = "dolphin.lib.skillkits.resource_skillkit:ResourceSkillkit"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
# Legacy entry points (for backward compatibility)
|
|
94
|
-
[project.entry-points."DolphinLanguageSDK.skillkits"]
|
|
95
|
-
search = "DolphinLanguageSDK.skill.installed.search_skillkit:SearchSkillkit"
|
|
96
|
-
sql = "DolphinLanguageSDK.skill.installed.sql_skillkit:SQLSkillkit"
|
|
97
|
-
memory = "DolphinLanguageSDK.skill.installed.memory_skillkit:MemorySkillkit"
|
|
98
|
-
ontology = "DolphinLanguageSDK.skill.installed.ontology_skillkit:OntologySkillkit"
|
|
99
|
-
plan_act = "DolphinLanguageSDK.skill.installed.plan_act_skillkit:PlanActSkillkit"
|
|
100
|
-
cognitive = "DolphinLanguageSDK.skill.installed.cognitive_skillkit:CognitiveSkillkit"
|
|
101
|
-
vm = "DolphinLanguageSDK.skill.installed.vm_skillkit:VMSkillkit"
|
|
102
|
-
noop = "DolphinLanguageSDK.skill.installed.noop_skillkit:NoopSkillkit"
|
|
103
|
-
mcp = "DolphinLanguageSDK.skill.installed.mcp_skillkit:MCPSkillkit"
|
|
104
|
-
resource_skillkit = "DolphinLanguageSDK.skill.installed.resource_skillkit:ResourceSkillkit"
|
|
91
|
+
env = "dolphin.lib.skillkits.env_skillkit:EnvSkillkit"
|
|
105
92
|
|
|
106
93
|
[tool.setuptools.packages.find]
|
|
107
94
|
where = ["src"]
|
|
@@ -36,6 +36,22 @@ from dolphin.cli.interrupt.handler import InterruptToken
|
|
|
36
36
|
from dolphin.cli.ui.layout import LayoutManager
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
def _print_flags_status():
|
|
40
|
+
"""Print current status of all feature flags."""
|
|
41
|
+
all_flags = flags.get_all()
|
|
42
|
+
for flag_name, flag_value in sorted(all_flags.items()):
|
|
43
|
+
state = "Enabled" if flag_value else "Disabled"
|
|
44
|
+
console(f"[Flag] {flag_name}: {state}")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _should_print_flags_status(args: Args) -> bool:
|
|
48
|
+
"""Return whether feature flags should be printed to console."""
|
|
49
|
+
if flags.is_enabled(flags.DEBUG_MODE):
|
|
50
|
+
return True
|
|
51
|
+
log_level = str(getattr(args, "logLevel", "") or "").upper()
|
|
52
|
+
return log_level == "DEBUG"
|
|
53
|
+
|
|
54
|
+
|
|
39
55
|
async def initializeEnvironment(args: Args):
|
|
40
56
|
"""Initialize Dolphin environment
|
|
41
57
|
|
|
@@ -51,6 +67,10 @@ async def initializeEnvironment(args: Args):
|
|
|
51
67
|
globalConfigPath = args.config if args.config else "./config/global.yaml"
|
|
52
68
|
globalConfig = GlobalConfig.from_yaml(globalConfigPath)
|
|
53
69
|
|
|
70
|
+
# Print flags status after loading config (flags may be set by config file)
|
|
71
|
+
if _should_print_flags_status(args):
|
|
72
|
+
_print_flags_status()
|
|
73
|
+
|
|
54
74
|
env = Env(
|
|
55
75
|
globalConfig=globalConfig,
|
|
56
76
|
agentFolderPath=args.folder,
|
|
@@ -1347,6 +1347,15 @@ class ConsoleUI:
|
|
|
1347
1347
|
elif v is None:
|
|
1348
1348
|
val_display = f"{Theme.NULL_VALUE}null{Theme.RESET}"
|
|
1349
1349
|
lines.append(f" {Theme.PARAM_KEY}{display_key}{Theme.RESET}:{padding} {val_display}")
|
|
1350
|
+
# Special case for tasks list in PlanSkillkit
|
|
1351
|
+
elif key_lower == "tasks" and isinstance(v, list) and v and isinstance(v[0], dict):
|
|
1352
|
+
lines.append(f" {Theme.PARAM_KEY}{display_key}{Theme.RESET}:{padding}")
|
|
1353
|
+
for i, task in enumerate(v[:10]):
|
|
1354
|
+
task_id = task.get("id", f"task_{i+1}")
|
|
1355
|
+
task_name = task.get("name", "Unnamed Task")
|
|
1356
|
+
lines.append(f" {Theme.MUTED}•{Theme.RESET} [{Theme.SUCCESS}{task_id}{Theme.RESET}] {Theme.PARAM_VALUE}{task_name}{Theme.RESET}")
|
|
1357
|
+
if len(v) > 10:
|
|
1358
|
+
lines.append(f" {self._format_hidden_lines_hint(len(v) - 10, prefix=' ')}")
|
|
1350
1359
|
else:
|
|
1351
1360
|
# Complex types: use existing json highlighter
|
|
1352
1361
|
val_display = self._highlight_json(v, indent=0, max_depth=1)
|
|
@@ -2250,7 +2259,7 @@ class ConsoleUI:
|
|
|
2250
2259
|
print(f" {Theme.MUTED}… +{len(details) - 10} more{Theme.RESET}")
|
|
2251
2260
|
|
|
2252
2261
|
# ─────────────────────────────────────────────────────────────
|
|
2253
|
-
# Plan
|
|
2262
|
+
# Plan Renderer (Codex-style)
|
|
2254
2263
|
# ─────────────────────────────────────────────────────────────
|
|
2255
2264
|
|
|
2256
2265
|
def _get_visual_width(self, text: str) -> int:
|
|
@@ -2275,7 +2284,7 @@ class ConsoleUI:
|
|
|
2275
2284
|
return width
|
|
2276
2285
|
|
|
2277
2286
|
# ─────────────────────────────────────────────────────────────
|
|
2278
|
-
# Plan
|
|
2287
|
+
# Plan Renderer (Codex-style)
|
|
2279
2288
|
# ─────────────────────────────────────────────────────────────
|
|
2280
2289
|
|
|
2281
2290
|
def plan_update(
|
|
@@ -2289,10 +2298,10 @@ class ConsoleUI:
|
|
|
2289
2298
|
verbose: Optional[bool] = None
|
|
2290
2299
|
) -> None:
|
|
2291
2300
|
"""
|
|
2292
|
-
Render a complete plan update in a
|
|
2301
|
+
Render a complete plan update in a plan-focused visual style.
|
|
2293
2302
|
|
|
2294
|
-
This is
|
|
2295
|
-
|
|
2303
|
+
This renderer is intended for plan orchestration tools (e.g., plan_skillkit)
|
|
2304
|
+
and can be used by callers who want a dedicated plan visualization.
|
|
2296
2305
|
|
|
2297
2306
|
Args:
|
|
2298
2307
|
tasks: List of tasks with 'content', 'status'
|
|
@@ -2756,10 +2765,15 @@ if __name__ == "__main__":
|
|
|
2756
2765
|
|
|
2757
2766
|
# Demo skill call
|
|
2758
2767
|
ui.skill_call_start(
|
|
2759
|
-
"
|
|
2768
|
+
"_plan_tasks",
|
|
2760
2769
|
{
|
|
2761
|
-
"
|
|
2762
|
-
"
|
|
2770
|
+
"exec_mode": "seq",
|
|
2771
|
+
"max_concurrency": 3,
|
|
2772
|
+
"tasks": [
|
|
2773
|
+
{"id": "task_1", "name": "Load Excel file", "prompt": "Load the Excel file"},
|
|
2774
|
+
{"id": "task_2", "name": "Analyze structure", "prompt": "Analyze the file structure"},
|
|
2775
|
+
{"id": "task_3", "name": "Generate insights", "prompt": "Generate key insights"},
|
|
2776
|
+
],
|
|
2763
2777
|
}
|
|
2764
2778
|
)
|
|
2765
2779
|
|
|
@@ -2767,11 +2781,15 @@ if __name__ == "__main__":
|
|
|
2767
2781
|
time.sleep(0.5)
|
|
2768
2782
|
|
|
2769
2783
|
ui.skill_call_end(
|
|
2770
|
-
"
|
|
2784
|
+
"_plan_tasks",
|
|
2771
2785
|
{
|
|
2772
2786
|
"status": "success",
|
|
2773
|
-
"tasks": [
|
|
2774
|
-
|
|
2787
|
+
"tasks": [
|
|
2788
|
+
{"id": "task_1", "name": "Load Excel file"},
|
|
2789
|
+
{"id": "task_2", "name": "Analyze structure"},
|
|
2790
|
+
{"id": "task_3", "name": "Generate insights"},
|
|
2791
|
+
],
|
|
2792
|
+
"next_step": "Execute task_1",
|
|
2775
2793
|
},
|
|
2776
2794
|
duration_ms=156.3
|
|
2777
2795
|
)
|
|
@@ -115,6 +115,10 @@ def setupFlagsFromArgs(args: Args) -> None:
|
|
|
115
115
|
|
|
116
116
|
Args:
|
|
117
117
|
args: Parsed CLI arguments
|
|
118
|
+
|
|
119
|
+
Note:
|
|
120
|
+
Flags status may be printed after config is loaded in initializeEnvironment()
|
|
121
|
+
when running in debug/verbose logging modes.
|
|
118
122
|
"""
|
|
119
123
|
from dolphin.core import flags
|
|
120
124
|
|
|
@@ -129,7 +133,3 @@ def setupFlagsFromArgs(args: Args) -> None:
|
|
|
129
133
|
boolValue = bool(flagValue)
|
|
130
134
|
|
|
131
135
|
flags.set_flag(flagName, boolValue)
|
|
132
|
-
# Cleaner flag output
|
|
133
|
-
state = "Enabled" if boolValue else "Disabled"
|
|
134
|
-
console(f"[Flag] {flagName}: {state}")
|
|
135
|
-
|
|
@@ -423,8 +423,8 @@ class BaseAgent(ABC):
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
# For ToolInterrupt, include tool data from frame.error (same as step mode)
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
frame_error = getattr(self._current_frame, "error", None) if self._current_frame else None
|
|
427
|
+
if run_result.is_tool_interrupted and frame_error:
|
|
428
428
|
if frame_error.get("error_type") == "ToolInterrupt":
|
|
429
429
|
interrupt_response["data"] = {
|
|
430
430
|
"tool_name": frame_error.get("tool_name", ""),
|
{kweaver_dolphin-0.2.0 → kweaver_dolphin-0.2.2}/src/dolphin/core/code_block/basic_code_block.py
RENAMED
|
@@ -90,8 +90,12 @@ class BasicCodeBlock:
|
|
|
90
90
|
self.recorder: Optional[Recorder] = None
|
|
91
91
|
# tool_choice support (auto|none|required|provider-specific)
|
|
92
92
|
self.tool_choice: Optional[str] = None
|
|
93
|
-
# Whether to enable skill deduplication (used only in explore blocks
|
|
94
|
-
|
|
93
|
+
# Whether to enable skill deduplication (used only in explore blocks)
|
|
94
|
+
# Default is False to avoid incorrectly blocking legitimate repeated detection/polling tool calls.
|
|
95
|
+
# Recent observations show that deduplication can prematurely stop valid polling scenarios
|
|
96
|
+
# (e.g., repeatedly checking task status until completion).
|
|
97
|
+
# Set to True explicitly via /explore/(enable_skill_deduplicator=true) when needed.
|
|
98
|
+
self.enable_skill_deduplicator: bool = False
|
|
95
99
|
self.skills = None
|
|
96
100
|
self.system_prompt = ""
|
|
97
101
|
|
|
@@ -115,6 +119,26 @@ class BasicCodeBlock:
|
|
|
115
119
|
if context:
|
|
116
120
|
context.set_skillkit_hook(self.skillkit_hook)
|
|
117
121
|
|
|
122
|
+
@staticmethod
|
|
123
|
+
def _normalize_bool_param(value: Any, default: bool) -> bool:
|
|
124
|
+
"""Normalize boolean-like params from DPH parsing.
|
|
125
|
+
|
|
126
|
+
DPH params may be parsed as strings such as "true"/"false".
|
|
127
|
+
"""
|
|
128
|
+
if isinstance(value, bool):
|
|
129
|
+
return value
|
|
130
|
+
if value is None:
|
|
131
|
+
return default
|
|
132
|
+
if isinstance(value, (int, float)):
|
|
133
|
+
return bool(value)
|
|
134
|
+
if isinstance(value, str):
|
|
135
|
+
normalized = value.strip().lower()
|
|
136
|
+
if normalized in {"true", "1", "yes", "y", "on"}:
|
|
137
|
+
return True
|
|
138
|
+
if normalized in {"false", "0", "no", "n", "off"}:
|
|
139
|
+
return False
|
|
140
|
+
return default
|
|
141
|
+
|
|
118
142
|
def validate(self, content):
|
|
119
143
|
"""Verify the correctness of the content
|
|
120
144
|
:param content: The content to be verified
|
|
@@ -658,11 +682,11 @@ class BasicCodeBlock:
|
|
|
658
682
|
self._validate_skills()
|
|
659
683
|
|
|
660
684
|
self.ttc_mode = params_dict.get("ttc_mode", None)
|
|
661
|
-
self.no_cache = params_dict.get("no_cache", False)
|
|
685
|
+
self.no_cache = self._normalize_bool_param(params_dict.get("no_cache", False), False)
|
|
662
686
|
self.flags = params_dict.get("flags", "")
|
|
663
687
|
# 是否启用技能调用去重(仅 explore 块会实际使用该参数)
|
|
664
|
-
self.enable_skill_deduplicator =
|
|
665
|
-
"enable_skill_deduplicator",
|
|
688
|
+
self.enable_skill_deduplicator = self._normalize_bool_param(
|
|
689
|
+
params_dict.get("enable_skill_deduplicator", False), False
|
|
666
690
|
)
|
|
667
691
|
|
|
668
692
|
# 处理输出格式参数
|
|
@@ -1150,23 +1174,79 @@ class BasicCodeBlock:
|
|
|
1150
1174
|
return
|
|
1151
1175
|
|
|
1152
1176
|
# Create initial SKILL stage to track skill execution start
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1177
|
+
# Only create new stage if this is a new tool call (intervention=True)
|
|
1178
|
+
# For resumed tool calls (intervention=False), update the existing stage using saved_stage_id
|
|
1179
|
+
if props is None:
|
|
1180
|
+
props = {}
|
|
1181
|
+
|
|
1182
|
+
is_resumed_call = not props.get('intervention', True)
|
|
1183
|
+
saved_stage_id = props.get('saved_stage_id')
|
|
1184
|
+
|
|
1185
|
+
if not is_resumed_call:
|
|
1186
|
+
# First-time call: create new Stage
|
|
1187
|
+
assert self.recorder, "recorder is None"
|
|
1188
|
+
self.recorder.getProgress().add_stage(
|
|
1189
|
+
agent_name=skill_name,
|
|
1190
|
+
stage=TypeStage.SKILL,
|
|
1191
|
+
status=Status.PROCESSING,
|
|
1192
|
+
skill_info=SkillInfo.build(
|
|
1193
|
+
skill_type=SkillType.TOOL,
|
|
1194
|
+
skill_name=skill_name,
|
|
1195
|
+
skill_args=skill_params_json,
|
|
1196
|
+
),
|
|
1197
|
+
input_content=str(skill_params_json),
|
|
1198
|
+
interrupted=False,
|
|
1199
|
+
)
|
|
1200
|
+
|
|
1201
|
+
# ✅ FIX: Save the newly created Stage ID to intervention_vars for potential interrupt
|
|
1202
|
+
# This must be done AFTER creating the stage, not before
|
|
1203
|
+
# Determine the correct intervention_vars key based on source_type
|
|
1204
|
+
progress = self.recorder.getProgress()
|
|
1205
|
+
if len(progress.stages) > 0:
|
|
1206
|
+
new_stage_id = progress.stages[-1].id
|
|
1207
|
+
|
|
1208
|
+
# Map source_type to intervention_vars key
|
|
1209
|
+
# Priority: judge_block > tool_block (both use SourceType.SKILL) > explore_block
|
|
1210
|
+
var_key = None
|
|
1211
|
+
intervention_vars = None
|
|
1212
|
+
|
|
1213
|
+
if source_type == SourceType.EXPLORE:
|
|
1214
|
+
var_key = "intervention_explore_block_vars"
|
|
1215
|
+
intervention_vars = self.context.get_var_value(var_key)
|
|
1216
|
+
elif source_type == SourceType.SKILL:
|
|
1217
|
+
# Check judge block first (also uses SourceType.SKILL)
|
|
1218
|
+
judge_vars = self.context.get_var_value("intervention_judge_block_vars")
|
|
1219
|
+
if judge_vars is not None:
|
|
1220
|
+
var_key = "intervention_judge_block_vars"
|
|
1221
|
+
intervention_vars = judge_vars
|
|
1222
|
+
else:
|
|
1223
|
+
var_key = "intervention_tool_block_vars"
|
|
1224
|
+
intervention_vars = self.context.get_var_value(var_key)
|
|
1225
|
+
|
|
1226
|
+
# Update the intervention_vars with the correct Stage ID
|
|
1227
|
+
if intervention_vars is not None and var_key is not None:
|
|
1228
|
+
intervention_vars["stage_id"] = new_stage_id
|
|
1229
|
+
self.context.set_variable(var_key, intervention_vars)
|
|
1166
1230
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1231
|
+
# notify app
|
|
1232
|
+
async for result in self.yield_message(answer="", think=""):
|
|
1233
|
+
yield result
|
|
1234
|
+
else:
|
|
1235
|
+
# *** FIX: Resumed call - Set _next_stage_id to use saved ID ***
|
|
1236
|
+
# Don't create stage here; let the normal flow handle it
|
|
1237
|
+
# This avoids creating extra stages and ensures consistency
|
|
1238
|
+
assert self.recorder, "recorder is None"
|
|
1239
|
+
|
|
1240
|
+
if saved_stage_id:
|
|
1241
|
+
# Set _next_stage_id so the next add_stage() call will use this ID
|
|
1242
|
+
progress = self.recorder.getProgress()
|
|
1243
|
+
progress._next_stage_id = saved_stage_id
|
|
1244
|
+
logger.debug(f"Resumed tool call for {skill_name}, set _next_stage_id = {saved_stage_id}")
|
|
1245
|
+
else:
|
|
1246
|
+
logger.debug(f"Resumed tool call for {skill_name}, no saved_stage_id provided")
|
|
1247
|
+
|
|
1248
|
+
# NOTE: Do NOT call yield_message() in resume branch!
|
|
1249
|
+
# The resumed tool execution will create the stage naturally through recorder.update()
|
|
1170
1250
|
|
|
1171
1251
|
agent_as_skill = self.context.get_agent_skill(skill)
|
|
1172
1252
|
if agent_as_skill is not None:
|
|
@@ -1196,8 +1276,7 @@ class BasicCodeBlock:
|
|
|
1196
1276
|
have_answer = False
|
|
1197
1277
|
cur_agent = self.context.get_cur_agent()
|
|
1198
1278
|
|
|
1199
|
-
|
|
1200
|
-
props = {}
|
|
1279
|
+
# props already initialized above, just update it
|
|
1201
1280
|
props.update({"gvp": self.context})
|
|
1202
1281
|
try:
|
|
1203
1282
|
# Check for tool interrupt configuration (ToolInterrupt mechanism)
|
|
@@ -1205,10 +1284,8 @@ class BasicCodeBlock:
|
|
|
1205
1284
|
# Skip interrupt check if this is a resumed tool call (intervention=False)
|
|
1206
1285
|
if props.get('intervention', True):
|
|
1207
1286
|
interrupt_config = getattr(skill, 'interrupt_config', None)
|
|
1208
|
-
logger.debug(f"[DEBUG skill_run] skill_name={skill_name}, interrupt_config={interrupt_config}, intervention={props.get('intervention', True)}")
|
|
1209
1287
|
|
|
1210
1288
|
if interrupt_config and interrupt_config.get('requires_confirmation'):
|
|
1211
|
-
logger.debug(f"[DEBUG skill_run] Tool {skill_name} requires confirmation, raising ToolInterrupt")
|
|
1212
1289
|
# Format confirmation message (support parameter interpolation)
|
|
1213
1290
|
message = interrupt_config.get('confirmation_message', 'Tool requires confirmation')
|
|
1214
1291
|
if message and skill_params_json:
|
|
@@ -1231,8 +1308,6 @@ class BasicCodeBlock:
|
|
|
1231
1308
|
tool_args=tool_args,
|
|
1232
1309
|
tool_config=interrupt_config
|
|
1233
1310
|
)
|
|
1234
|
-
else:
|
|
1235
|
-
logger.debug(f"[DEBUG skill_run] Tool {skill_name} does not require confirmation, proceeding with execution")
|
|
1236
1311
|
|
|
1237
1312
|
console_skill_call(
|
|
1238
1313
|
skill_name, skill_params_json, verbose=self.context.verbose, skill=skill
|
|
@@ -1309,13 +1384,33 @@ class BasicCodeBlock:
|
|
|
1309
1384
|
if agent_as_skill is not None:
|
|
1310
1385
|
self.context.set_cur_agent(cur_agent)
|
|
1311
1386
|
|
|
1312
|
-
|
|
1387
|
+
# *** FIX: Update stage status to COMPLETED ***
|
|
1388
|
+
# This updates the stage status and triggers set_variable() to update _progress in context
|
|
1389
|
+
self.recorder.update(
|
|
1313
1390
|
item=result,
|
|
1314
1391
|
source_type=SourceType.SKILL,
|
|
1315
1392
|
skill_name=skill_name,
|
|
1316
1393
|
skill_args=skill_params_json,
|
|
1317
1394
|
is_completed=True,
|
|
1318
1395
|
)
|
|
1396
|
+
|
|
1397
|
+
# *** FIX: Yield completion update in a format that explore_block_v2 recognizes ***
|
|
1398
|
+
# Use a nested structure that matches the check in explore_block_v2.py line 422-427
|
|
1399
|
+
# This prevents explore_block_v2 from calling recorder.update() again
|
|
1400
|
+
if self.context:
|
|
1401
|
+
progress_var = self.context.get_var_value("_progress")
|
|
1402
|
+
completion_data = {
|
|
1403
|
+
"answer": {
|
|
1404
|
+
"answer": result.get("output") if isinstance(result, dict) else str(result),
|
|
1405
|
+
"think": "",
|
|
1406
|
+
},
|
|
1407
|
+
"_status": "running",
|
|
1408
|
+
"_progress": progress_var if progress_var else []
|
|
1409
|
+
}
|
|
1410
|
+
yield completion_data
|
|
1411
|
+
else:
|
|
1412
|
+
yield result
|
|
1413
|
+
|
|
1319
1414
|
if agent_as_skill is not None:
|
|
1320
1415
|
console_agent_skill_exit(skill_name, verbose=self.context.verbose)
|
|
1321
1416
|
except ToolInterrupt as e:
|
|
@@ -1849,6 +1944,21 @@ class BasicCodeBlock:
|
|
|
1849
1944
|
)
|
|
1850
1945
|
continue
|
|
1851
1946
|
|
|
1947
|
+
# SDK automatically adds interrupt_config to ALL dynamically loaded tools
|
|
1948
|
+
# This ensures dynamic tools require user confirmation for safety
|
|
1949
|
+
# Dynamic tools do not need to provide interrupt_config themselves
|
|
1950
|
+
tool_description = tool_def.get("description", tool_name)
|
|
1951
|
+
auto_interrupt_config = {
|
|
1952
|
+
"requires_confirmation": True,
|
|
1953
|
+
"confirmation_message": (
|
|
1954
|
+
f"即将调用「{tool_name}」工具,是否确认执行?"
|
|
1955
|
+
)
|
|
1956
|
+
}
|
|
1957
|
+
tool_instance.interrupt_config = auto_interrupt_config
|
|
1958
|
+
self.context.debug(
|
|
1959
|
+
f"[_load_dynamic_tools] Auto-applied interrupt protection to dynamic tool: {tool_name}"
|
|
1960
|
+
)
|
|
1961
|
+
|
|
1852
1962
|
# Add tool instance to skillkit
|
|
1853
1963
|
current_skillkit.addSkill(tool_instance)
|
|
1854
1964
|
loaded_count += 1
|
|
@@ -1870,7 +1980,7 @@ class BasicCodeBlock:
|
|
|
1870
1980
|
f"[_load_dynamic_tools] self.skills does not exist on {type(self).__name__}"
|
|
1871
1981
|
)
|
|
1872
1982
|
|
|
1873
|
-
self.context.debug(f"
|
|
1983
|
+
self.context.debug(f"[OK] Dynamically loaded tool: {tool_name}")
|
|
1874
1984
|
|
|
1875
1985
|
except Exception as e:
|
|
1876
1986
|
tool_name = (
|
|
@@ -1878,7 +1988,7 @@ class BasicCodeBlock:
|
|
|
1878
1988
|
if isinstance(tool_def, dict)
|
|
1879
1989
|
else "unknown"
|
|
1880
1990
|
)
|
|
1881
|
-
self.context.error(f"
|
|
1991
|
+
self.context.error(f"[ERROR] Failed to load dynamic tool {tool_name}: {e}")
|
|
1882
1992
|
import traceback
|
|
1883
1993
|
|
|
1884
1994
|
self.context.debug(f"Error traceback: {traceback.format_exc()}")
|