agent-framework-lib 0.8.1.post3__tar.gz → 0.8.1.post4__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.
- {agent_framework_lib-0.8.1.post3/agent_framework_lib.egg-info → agent_framework_lib-0.8.1.post4}/PKG-INFO +3 -2
- {agent_framework_lib-0.8.1.post3/agent_framework/web/docs → agent_framework_lib-0.8.1.post4}/README.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/activity_formatter.py +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/base_agent.py +51 -4
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/step_display_config.py +4 -4
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/file/SKILL.md +148 -3
- agent_framework_lib-0.8.1.post4/agent_framework/skills/builtin/skills/file/read_file.py +285 -0
- agent_framework_lib-0.8.1.post4/agent_framework/skills/builtin/skills/web_news_search/SKILL.md +90 -0
- agent_framework_lib-0.8.1.post4/agent_framework/tools/web_search_tool.py +137 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4/agent_framework/web}/docs/BUILTIN_SKILLS_REFERENCE.md +24 -12
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/CREATING_AGENTS.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/CUSTOM_SKILLS_GUIDE.md +4 -12
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4/agent_framework/web/docs}/README.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4/agent_framework/web}/docs/TOOLS_AND_MCP_GUIDE.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/helper_agent.py +2 -2
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4/agent_framework_lib.egg-info}/PKG-INFO +3 -2
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework_lib.egg-info/SOURCES.txt +3 -3
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework_lib.egg-info/requires.txt +1 -0
- {agent_framework_lib-0.8.1.post3/agent_framework/web → agent_framework_lib-0.8.1.post4}/docs/BUILTIN_SKILLS_REFERENCE.md +24 -12
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/CREATING_AGENTS.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/CUSTOM_SKILLS_GUIDE.md +4 -12
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/STREAMING_EVENTS_FRONTEND.md +1 -1
- {agent_framework_lib-0.8.1.post3/agent_framework/web → agent_framework_lib-0.8.1.post4}/docs/TOOLS_AND_MCP_GUIDE.md +1 -1
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/pyproject.toml +5 -4
- agent_framework_lib-0.8.1.post3/agent_framework/skills/builtin/skills/file/read_file.py +0 -62
- agent_framework_lib-0.8.1.post3/agent_framework/skills/builtin/skills/web_search/SKILL.md +0 -141
- agent_framework_lib-0.8.1.post3/agent_framework/skills/builtin/skills/web_search/web_search.py +0 -75
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/ARCHITECTURE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/LICENSE +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/MANIFEST.in +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/base.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/a2a_router.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/agent_card_builder.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/agent_card_skill_builder.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/jsonrpc_dispatcher.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/models_jsonrpc.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/sse_wrapper.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/endpoints/translation_layer.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/models.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/providers/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/providers/elasticsearch_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/a2a/providers/postgres_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/capabilities/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/capabilities/resolver.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/chart_generation/llm_refinement_loop.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/agent_interface.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/agent_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/context_budget.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/context_summarizer.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/elasticsearch_config_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/implementation_validator.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/knowledge_state.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/loop_detector.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/model_clients.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/model_config.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/model_router.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/models.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/provider_calibration.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/scratchpad_compressor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/state_manager.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/core/streaming_parts_accumulator.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/implementations/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/implementations/budget_aware_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/implementations/llamaindex_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/implementations/llamaindex_memory_adapter.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/implementations/microsoft_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/agent_mixin.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/base.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/config.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/manager.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/personalization.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/providers/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/providers/graphiti_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/providers/memori_provider.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/memory/tools.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/api_timing_tracker.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/elasticsearch_circuit_breaker.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/elasticsearch_logging.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/error_handling.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/error_logging.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/llm_auto_instrumentor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/llm_metrics.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/llm_metrics_collector.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/llm_metrics_extractor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/metrics_aggregator.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/metrics_config.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/observability_manager.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/otel_instrumentor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/otel_logging_handler.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/otel_metrics_recorder.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/otel_setup.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/performance_monitor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/progress_tracker.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/resource_manager.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/resource_metrics_collector.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/streaming_latency_tracer.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/timing_tracker.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/token_counter.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/monitoring/tracing_context.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/notifications/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/notifications/hub.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/processing/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/processing/ai_content_management.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/processing/markdown_converter.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/processing/multimodal_integration.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/processing/rich_content_validation.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/py.typed +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/session/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/session/elasticsearch_session_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/session/session_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/agent_mixin.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/base.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/scripts/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/scripts/create_and_register.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/scripts/register_to_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/chart/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/chart/chart_to_image.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/code_format/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/code_format/format_python.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/csv/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/csv/create_csv.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/csv/read_csv.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/csv/transform_csv.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/data_format/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/data_format/json_to_yaml.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/data_format/yaml_to_json.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/drawio/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/drawio/create_drawio.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/email_template/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/excel/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/excel/create_excel.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/file/create_file.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/file/list_files.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/file_access/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/file_access/get_file_path.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/form/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/image_display/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/image_gen/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/image_gen/create_image.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/image_gen/generate_image.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/mermaid/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/mermaid/mermaid_to_image.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/multimodal/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/optionsblock/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/powerpoint/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/powerpoint/create_powerpoint.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/skill_creator/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/table/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/table/table_to_image.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/unified_pdf/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/unified_pdf/create_pdf.py +0 -0
- {agent_framework_lib-0.8.1.post3/agent_framework/skills/builtin/skills/web_search → agent_framework_lib-0.8.1.post4/agent_framework/skills/builtin/skills/web_news_search}/web_news_search.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/word/SKILL.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/builtin/skills/word/create_word.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/custom_skill_manager.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/discovery_prompt.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/markdown_loader.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/skills/tools.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/storage/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/storage/file_storages.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/storage/file_system_management.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/storage/storage_optimizer.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/executor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/message_injector.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/message_queue.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/retrigger.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/subagents/spawn_tool.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/activity_callback.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/adaptive_pdf_css.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/base.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/html_content_analyzer.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/multimodal_tools.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/pdf_image_scaler.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/shell_tool.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/sizing_config.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/tools/web_fetch_tool.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/path_utils.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/post_install.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/session_title_generator.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/source_detector.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/utils/special_blocks.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/admin_auth.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/admin_models.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/admin_router.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/admin_services.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/api_timing_middleware.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/A2A_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/DOCKER_SETUP.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/Dockerfile +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/GETTING_STARTED.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/MEMORY_INSTALLATION.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/WORKSPACE_INTEGRATION.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/api-reference.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/configuration.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/docker-compose.yml +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_example_multi_skills.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_file_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_mcp.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_memory.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_memory_graphiti.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_memory_hybrid.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/agent_with_memory_simple.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/custom_framework_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/simple_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/examples/skills_demo_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/docs/installation-guide.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/documentation_generator.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/helper_ui.html +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/modern_ui.html +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/observability/kibana-llm-dashboard-setup.json +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/observability/kibana-resource-metrics-dashboard.json +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/otel_tracing_middleware.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/server.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/skills_router.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/web/test_app.html +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/__init__.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/artefacts.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/client.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/config.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/context.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/cursor.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/memory.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/models.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/poller.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/preferences.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/router.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/session.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework/workspace/subscription.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework_lib.egg-info/dependency_links.txt +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework_lib.egg-info/entry_points.txt +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/agent_framework_lib.egg-info/top_level.txt +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/A2A_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/ACTIVITY_OUTPUT_PART.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/ARCHITECTURE_DIAGRAM.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/CONCURRENCE_VS_PARALLELISME_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/DOCKER_SETUP.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/ELASTICSEARCH_DATA_STRUCTURES.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/FILE_DOWNLOAD_LINKS.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/FILE_STORAGE_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/GETTING_STARTED.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/HISTORY_MESSAGE_FORMAT.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/IMPLEMENTATION_GUIDE_NEW_AGENT.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/MEMORY_INSTALLATION.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/MODIFICATIONS_CONCURRENCE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/MULTIMODAL_TOOLS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/OBSERVABILITY_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/PYPI_PUBLISHING.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/QA_STREAMING_LATENCY.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/SCREENSHOTS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/SPEC_CROSS_MODEL_HISTORY_CONVERSION.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/SSE_NOTIFICATIONS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/WORKSPACE_INTEGRATION.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/api-reference.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/configuration.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/framework_audit_remarques.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/index.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/docs/installation-guide.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/README.md +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_context_budget_test.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_example_multi_skills.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_exemple_test.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_training_with_apo.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_custom_tools_file_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_file_storage.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_mcp.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_memory_graphiti.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_memory_hybrid.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_memory_simple.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/agent_with_personalization.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/biagenttest.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/custom_framework_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/dependencies/docker-compose.yaml +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/pyproject.toml +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/simple_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/skills_demo_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/examples/workspace_test_agent.py +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/setup.cfg +0 -0
- {agent_framework_lib-0.8.1.post3 → agent_framework_lib-0.8.1.post4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-framework-lib
|
|
3
|
-
Version: 0.8.1.
|
|
3
|
+
Version: 0.8.1.post4
|
|
4
4
|
Summary: A comprehensive Python framework for building and serving conversational AI agents with FastAPI
|
|
5
5
|
Author-email: Sebastian Pavel <sebastian@cinco.ai>, Elliott Girard <elliott.girard@icloud.com>
|
|
6
6
|
Maintainer-email: Sebastian Pavel <sebastian@cinco.ai>
|
|
@@ -72,6 +72,7 @@ Requires-Dist: openpyxl>=3.1.5
|
|
|
72
72
|
Requires-Dist: python-pptx>=1.0.0
|
|
73
73
|
Requires-Dist: python-docx>=1.1.0
|
|
74
74
|
Requires-Dist: jsonschema>=4.20.0
|
|
75
|
+
Requires-Dist: pymupdf>=1.27.2.2
|
|
75
76
|
Provides-Extra: llamaindex
|
|
76
77
|
Requires-Dist: llama-index>=0.14.16; extra == "llamaindex"
|
|
77
78
|
Requires-Dist: llama-index-core>=0.14.16; extra == "llamaindex"
|
|
@@ -902,7 +903,7 @@ class MySkillsAgent(LlamaIndexAgent):
|
|
|
902
903
|
|----------|--------|
|
|
903
904
|
| **Visualization** | chart, mermaid, table |
|
|
904
905
|
| **Document** | file, unified_pdf, file_access, excel, drawio, **powerpoint**, **word** |
|
|
905
|
-
| **Web** |
|
|
906
|
+
| **Web** | web_news_search |
|
|
906
907
|
| **Multimodal** | multimodal, **image_gen** |
|
|
907
908
|
| **UI** | form, optionsblock, image_display, **email_template**, **skill_creator** |
|
|
908
909
|
| **Data** | **csv**, **data_format** |
|
|
@@ -753,7 +753,7 @@ class MySkillsAgent(LlamaIndexAgent):
|
|
|
753
753
|
|----------|--------|
|
|
754
754
|
| **Visualization** | chart, mermaid, table |
|
|
755
755
|
| **Document** | file, unified_pdf, file_access, excel, drawio, **powerpoint**, **word** |
|
|
756
|
-
| **Web** |
|
|
756
|
+
| **Web** | web_news_search |
|
|
757
757
|
| **Multimodal** | multimodal, **image_gen** |
|
|
758
758
|
| **UI** | form, optionsblock, image_display, **email_template**, **skill_creator** |
|
|
759
759
|
| **Data** | **csv**, **data_format** |
|
|
@@ -161,7 +161,7 @@ SKILL_DESCRIPTIONS: dict[str, str] = {
|
|
|
161
161
|
"pdf_with_images": "Création de PDF avec images intégrées automatiquement",
|
|
162
162
|
"file": "Création, lecture et listage de fichiers",
|
|
163
163
|
"file_access": "Obtention des chemins et URLs des fichiers stockés",
|
|
164
|
-
"
|
|
164
|
+
"web_news_search": "Recherche d'actualités sur le web",
|
|
165
165
|
"multimodal": "Description, OCR et analyse d'images par IA",
|
|
166
166
|
"form": "Génération de formulaires interactifs",
|
|
167
167
|
"optionsblock": "Génération de boutons d'options interactifs",
|
|
@@ -578,6 +578,44 @@ class BaseAgent(SkillsMixin, MemoryMixin, AgentInterface):
|
|
|
578
578
|
logger.error(f"Error creating skill management tools: {e}")
|
|
579
579
|
return []
|
|
580
580
|
|
|
581
|
+
def _get_native_skill_tools(self) -> list[callable]:
|
|
582
|
+
"""Get native tools always available to the agent.
|
|
583
|
+
|
|
584
|
+
Includes:
|
|
585
|
+
- ``shell_exec`` — required by skills to run scripts.
|
|
586
|
+
- ``web_fetch`` — fetch text content from a URL.
|
|
587
|
+
- ``web_search`` — search the web via DuckDuckGo.
|
|
588
|
+
|
|
589
|
+
Returns:
|
|
590
|
+
List of callable tool functions.
|
|
591
|
+
"""
|
|
592
|
+
if not SKILLS_AVAILABLE or not self._enable_skills:
|
|
593
|
+
return []
|
|
594
|
+
|
|
595
|
+
tools: list[callable] = []
|
|
596
|
+
try:
|
|
597
|
+
from ..tools.shell_tool import ShellTool
|
|
598
|
+
|
|
599
|
+
tools.append(ShellTool(default_timeout=120).get_tool_function())
|
|
600
|
+
except Exception as e:
|
|
601
|
+
logger.warning(f"Could not create ShellTool: {e}")
|
|
602
|
+
|
|
603
|
+
try:
|
|
604
|
+
from ..tools.web_fetch_tool import WebFetchTool
|
|
605
|
+
|
|
606
|
+
tools.append(WebFetchTool().get_tool_function())
|
|
607
|
+
except Exception as e:
|
|
608
|
+
logger.warning(f"Could not create WebFetchTool: {e}")
|
|
609
|
+
|
|
610
|
+
try:
|
|
611
|
+
from ..tools.web_search_tool import WebSearchTool
|
|
612
|
+
|
|
613
|
+
tools.append(WebSearchTool().get_tool_function())
|
|
614
|
+
except Exception as e:
|
|
615
|
+
logger.warning(f"Could not create WebSearchTool: {e}")
|
|
616
|
+
|
|
617
|
+
return tools
|
|
618
|
+
|
|
581
619
|
async def _get_all_tools(self) -> list[callable]:
|
|
582
620
|
"""
|
|
583
621
|
Get all tools including agent-defined tools, skill management, memory, and spawn tools.
|
|
@@ -585,8 +623,9 @@ class BaseAgent(SkillsMixin, MemoryMixin, AgentInterface):
|
|
|
585
623
|
Tool Loading Order:
|
|
586
624
|
1. Agent's custom tools (from get_agent_tools())
|
|
587
625
|
2. Skill management tools (list_skills, load_skill, unload_skill)
|
|
588
|
-
3.
|
|
589
|
-
4.
|
|
626
|
+
3. Native skill execution tools (shell_exec, web_fetch)
|
|
627
|
+
4. Memory tools (if memory is configured)
|
|
628
|
+
5. SubagentSpawnTool (if executor + capability_set configured)
|
|
590
629
|
|
|
591
630
|
Returns:
|
|
592
631
|
Combined list of all available tools for this agent.
|
|
@@ -604,7 +643,15 @@ class BaseAgent(SkillsMixin, MemoryMixin, AgentInterface):
|
|
|
604
643
|
f"🎯 Added {len(skill_mgmt_tools)} skill management tools to agent {self.agent_id}"
|
|
605
644
|
)
|
|
606
645
|
|
|
607
|
-
|
|
646
|
+
# 3. Add native skill execution tools (shell_exec, web_fetch)
|
|
647
|
+
native_tools = self._get_native_skill_tools()
|
|
648
|
+
if native_tools:
|
|
649
|
+
tools = tools + native_tools
|
|
650
|
+
logger.info(
|
|
651
|
+
f"🐚 Added {len(native_tools)} native skill execution tools to agent {self.agent_id}"
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
# 4. Add memory tools if memory is configured
|
|
608
655
|
if MEMORY_AVAILABLE and hasattr(self, "_ensure_memory_initialized"):
|
|
609
656
|
try:
|
|
610
657
|
# Initialize memory if configured (this is async)
|
|
@@ -619,7 +666,7 @@ class BaseAgent(SkillsMixin, MemoryMixin, AgentInterface):
|
|
|
619
666
|
except Exception as e:
|
|
620
667
|
logger.warning(f"Failed to add memory tools: {e}")
|
|
621
668
|
|
|
622
|
-
#
|
|
669
|
+
# 5. Add subagent spawn tool if configured
|
|
623
670
|
try:
|
|
624
671
|
spawn_tool = self._create_subagent_spawn_tool()
|
|
625
672
|
if spawn_tool is not None:
|
|
@@ -634,10 +634,10 @@ DEFAULT_TOOL_DISPLAY: dict[str, StepDisplayInfo] = {
|
|
|
634
634
|
icon="🔗",
|
|
635
635
|
category="skill",
|
|
636
636
|
),
|
|
637
|
-
"skill:
|
|
638
|
-
id="skill:
|
|
639
|
-
friendly_name="
|
|
640
|
-
description="Recherche d'
|
|
637
|
+
"skill:web_news_search": StepDisplayInfo(
|
|
638
|
+
id="skill:web_news_search",
|
|
639
|
+
friendly_name="📰 Recherche d'actualités",
|
|
640
|
+
description="Recherche d'actualités sur le web",
|
|
641
641
|
icon="🔍",
|
|
642
642
|
category="skill",
|
|
643
643
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: file
|
|
3
|
-
description: "Create, list, and read files from storage"
|
|
3
|
+
description: "Create, list, and read files from storage (supports TXT, DOCX, XLSX, PPTX, PDF)"
|
|
4
4
|
display_name: "Gestion de fichiers"
|
|
5
5
|
metadata:
|
|
6
6
|
config:
|
|
@@ -14,6 +14,17 @@ metadata:
|
|
|
14
14
|
- write file
|
|
15
15
|
- text file
|
|
16
16
|
- store file
|
|
17
|
+
- word document
|
|
18
|
+
- excel spreadsheet
|
|
19
|
+
- powerpoint presentation
|
|
20
|
+
- docx
|
|
21
|
+
- xlsx
|
|
22
|
+
- pptx
|
|
23
|
+
- pdf
|
|
24
|
+
- read docx
|
|
25
|
+
- read xlsx
|
|
26
|
+
- read pptx
|
|
27
|
+
- read pdf
|
|
17
28
|
requires:
|
|
18
29
|
bins:
|
|
19
30
|
- uv
|
|
@@ -23,6 +34,20 @@ metadata:
|
|
|
23
34
|
|
|
24
35
|
Perform file operations (create, list, read) by running standalone scripts via `shell_exec`.
|
|
25
36
|
|
|
37
|
+
### Supported File Formats for Reading
|
|
38
|
+
|
|
39
|
+
The `read_file.py` script supports multiple file formats:
|
|
40
|
+
|
|
41
|
+
| Format | Extension | Description | Extracted Content |
|
|
42
|
+
|--------|-----------|-------------|-------------------|
|
|
43
|
+
| **Text** | `.txt`, `.md`, `.json`, `.csv`, etc. | Plain text files | Raw text content |
|
|
44
|
+
| **Word** | `.docx` | Microsoft Word documents | Paragraphs + tables |
|
|
45
|
+
| **Excel** | `.xlsx` | Microsoft Excel spreadsheets | All sheets with cell values |
|
|
46
|
+
| **PowerPoint** | `.pptx` | Microsoft PowerPoint presentations | Slide titles, content, notes |
|
|
47
|
+
| **PDF** | `.pdf` | PDF documents | Text from all pages |
|
|
48
|
+
|
|
49
|
+
**Note:** Binary files and images within documents are not extracted.
|
|
50
|
+
|
|
26
51
|
---
|
|
27
52
|
|
|
28
53
|
### 1. Create a File
|
|
@@ -144,8 +169,103 @@ uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "/p
|
|
|
144
169
|
|
|
145
170
|
#### Output Format (stdout)
|
|
146
171
|
|
|
172
|
+
The output format now includes file type and metadata:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"status": "success",
|
|
177
|
+
"results": "The file content as a string...",
|
|
178
|
+
"file_type": "text",
|
|
179
|
+
"metadata": {
|
|
180
|
+
"encoding": "utf-8"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Metadata by file type:**
|
|
186
|
+
|
|
187
|
+
| File Type | Metadata Fields |
|
|
188
|
+
|-----------|----------------|
|
|
189
|
+
| `text` | `encoding` |
|
|
190
|
+
| `docx` | `num_paragraphs`, `num_tables` |
|
|
191
|
+
| `xlsx` | `num_sheets`, `sheet_names` (list) |
|
|
192
|
+
| `pptx` | `num_slides` |
|
|
193
|
+
| `pdf` | `num_pages` |
|
|
194
|
+
|
|
195
|
+
#### Examples by Format
|
|
196
|
+
|
|
197
|
+
**Read a Word document (.docx):**
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "report.docx"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Output:
|
|
147
204
|
```json
|
|
148
|
-
{
|
|
205
|
+
{
|
|
206
|
+
"status": "success",
|
|
207
|
+
"results": "Document Title\n\nParagraph 1...\n\nParagraph 2...\n\nHeader 1 | Header 2\nValue 1 | Value 2",
|
|
208
|
+
"file_type": "docx",
|
|
209
|
+
"metadata": {
|
|
210
|
+
"num_paragraphs": 3,
|
|
211
|
+
"num_tables": 1
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Read an Excel spreadsheet (.xlsx):**
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "data.xlsx"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Output:
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"status": "success",
|
|
226
|
+
"results": "Sheet: Sheet1\nName | Age | City\nAlice | 30 | Paris\nBob | 25 | London\n\nSheet: Sheet2\nProduct | Price\nLaptop | 999.99",
|
|
227
|
+
"file_type": "xlsx",
|
|
228
|
+
"metadata": {
|
|
229
|
+
"num_sheets": 2,
|
|
230
|
+
"sheet_names": ["Sheet1", "Sheet2"]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Read a PowerPoint presentation (.pptx):**
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "presentation.pptx"
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Output:
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"status": "success",
|
|
245
|
+
"results": "Slide 1:\nIntroduction\nWelcome to our presentation\n\nSlide 2:\nAgenda\nPoint 1\nPoint 2\nNotes: Remember to explain each point",
|
|
246
|
+
"file_type": "pptx",
|
|
247
|
+
"metadata": {
|
|
248
|
+
"num_slides": 2
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Read a PDF document (.pdf):**
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "document.pdf"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Output:
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"status": "success",
|
|
263
|
+
"results": "Page 1:\nDocument Title\nContent of page 1...\n\nPage 2:\nContinued content...",
|
|
264
|
+
"file_type": "pdf",
|
|
265
|
+
"metadata": {
|
|
266
|
+
"num_pages": 2
|
|
267
|
+
}
|
|
268
|
+
}
|
|
149
269
|
```
|
|
150
270
|
|
|
151
271
|
#### Error Handling (stderr)
|
|
@@ -159,6 +279,7 @@ uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "/p
|
|
|
159
279
|
| 1 | Empty file path | `"File path cannot be empty"` |
|
|
160
280
|
| 1 | File not found | `"File not found: /path/to/missing.txt"` |
|
|
161
281
|
| 1 | Path is a directory | `"Path is a directory, not a file: /path/to/dir"` |
|
|
282
|
+
| 1 | Missing dependency | `"python-docx is required to read .docx files. Install with: uv add python-docx"` |
|
|
162
283
|
| 2 | Missing required arguments | argparse usage message |
|
|
163
284
|
|
|
164
285
|
---
|
|
@@ -184,4 +305,28 @@ uv run python -m agent_framework.skills.builtin.skills.file.read_file --path "/p
|
|
|
184
305
|
|
|
185
306
|
- All scripts output JSON to stdout on success and JSON to stderr on failure.
|
|
186
307
|
- Supported file types for creation: any text-based format (.txt, .json, .md, .csv, etc.).
|
|
187
|
-
-
|
|
308
|
+
- Supported file types for reading: text files, DOCX, XLSX, PPTX, PDF.
|
|
309
|
+
|
|
310
|
+
### Dependencies
|
|
311
|
+
|
|
312
|
+
The following Python packages are **already included** in AgentFramework:
|
|
313
|
+
|
|
314
|
+
| Format | Required Package | Version |
|
|
315
|
+
|--------|-----------------|---------|
|
|
316
|
+
| DOCX | `python-docx` | >=1.1.0 |
|
|
317
|
+
| XLSX | `openpyxl` | >=3.1.5 |
|
|
318
|
+
| PPTX | `python-pptx` | >=1.0.0 |
|
|
319
|
+
| PDF | `pymupdf` | (optional, install if needed) |
|
|
320
|
+
|
|
321
|
+
**Note:** If you get a "module not found" error, install the missing package:
|
|
322
|
+
```bash
|
|
323
|
+
uv add python-docx openpyxl python-pptx pymupdf
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Limitations
|
|
327
|
+
|
|
328
|
+
- **Images**: Images within documents are not extracted (text only).
|
|
329
|
+
- **Formatting**: Text formatting (bold, italic, colors) is not preserved.
|
|
330
|
+
- **Formulas**: Excel formulas are evaluated and only their results are extracted.
|
|
331
|
+
- **OCR**: Scanned PDFs without text layer will appear empty (OCR not supported).
|
|
332
|
+
- **Password-protected files**: Encrypted documents cannot be read.
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Standalone CLI script for reading file contents.
|
|
3
|
+
|
|
4
|
+
Reads a file from the filesystem and outputs its content
|
|
5
|
+
as a JSON result on stdout.
|
|
6
|
+
|
|
7
|
+
Supports multiple formats:
|
|
8
|
+
- Text files (.txt, .md, .json, .csv, etc.)
|
|
9
|
+
- Word documents (.docx)
|
|
10
|
+
- Excel spreadsheets (.xlsx)
|
|
11
|
+
- PowerPoint presentations (.pptx)
|
|
12
|
+
- PDF documents (.pdf)
|
|
13
|
+
"""
|
|
14
|
+
import argparse
|
|
15
|
+
import json
|
|
16
|
+
import os
|
|
17
|
+
import sys
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from typing import Any
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def extract_docx_text(path: str) -> tuple[str, dict[str, Any]]:
|
|
23
|
+
"""Extract text from a Word document (.docx).
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
path: Path to the .docx file.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
Tuple of (extracted_text, metadata)
|
|
30
|
+
|
|
31
|
+
Raises:
|
|
32
|
+
ImportError: If python-docx is not installed.
|
|
33
|
+
"""
|
|
34
|
+
try:
|
|
35
|
+
from docx import Document
|
|
36
|
+
except ImportError:
|
|
37
|
+
raise ImportError(
|
|
38
|
+
"python-docx is required to read .docx files. "
|
|
39
|
+
"Install with: uv add python-docx"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
doc = Document(path)
|
|
43
|
+
|
|
44
|
+
# Extract paragraphs
|
|
45
|
+
paragraphs = [para.text for para in doc.paragraphs if para.text.strip()]
|
|
46
|
+
|
|
47
|
+
# Extract tables
|
|
48
|
+
table_texts = []
|
|
49
|
+
for table in doc.tables:
|
|
50
|
+
for row in table.rows:
|
|
51
|
+
row_text = " | ".join(cell.text.strip() for cell in row.cells)
|
|
52
|
+
if row_text.strip():
|
|
53
|
+
table_texts.append(row_text)
|
|
54
|
+
|
|
55
|
+
# Combine all text
|
|
56
|
+
all_text = "\n\n".join(paragraphs)
|
|
57
|
+
if table_texts:
|
|
58
|
+
all_text += "\n\n" + "\n".join(table_texts)
|
|
59
|
+
|
|
60
|
+
metadata = {
|
|
61
|
+
"num_paragraphs": len(paragraphs),
|
|
62
|
+
"num_tables": len(doc.tables),
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return all_text, metadata
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def extract_xlsx_text(path: str) -> tuple[str, dict[str, Any]]:
|
|
69
|
+
"""Extract text from an Excel spreadsheet (.xlsx).
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
path: Path to the .xlsx file.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
Tuple of (extracted_text, metadata)
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
ImportError: If openpyxl is not installed.
|
|
79
|
+
"""
|
|
80
|
+
try:
|
|
81
|
+
from openpyxl import load_workbook
|
|
82
|
+
except ImportError:
|
|
83
|
+
raise ImportError(
|
|
84
|
+
"openpyxl is required to read .xlsx files. "
|
|
85
|
+
"Install with: uv add openpyxl"
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
workbook = load_workbook(path, data_only=True)
|
|
89
|
+
sheets_text = []
|
|
90
|
+
|
|
91
|
+
for sheet_name in workbook.sheetnames:
|
|
92
|
+
sheet = workbook[sheet_name]
|
|
93
|
+
sheet_text = [f"Sheet: {sheet_name}"]
|
|
94
|
+
|
|
95
|
+
for row in sheet.iter_rows(values_only=True):
|
|
96
|
+
# Filter out None values and convert to strings
|
|
97
|
+
row_values = [str(cell) for cell in row if cell is not None]
|
|
98
|
+
if row_values:
|
|
99
|
+
sheet_text.append(" | ".join(row_values))
|
|
100
|
+
|
|
101
|
+
if len(sheet_text) > 1: # More than just the sheet name
|
|
102
|
+
sheets_text.append("\n".join(sheet_text))
|
|
103
|
+
|
|
104
|
+
all_text = "\n\n".join(sheets_text)
|
|
105
|
+
|
|
106
|
+
metadata = {
|
|
107
|
+
"num_sheets": len(workbook.sheetnames),
|
|
108
|
+
"sheet_names": workbook.sheetnames,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return all_text, metadata
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def extract_pptx_text(path: str) -> tuple[str, dict[str, Any]]:
|
|
115
|
+
"""Extract text from a PowerPoint presentation (.pptx).
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
path: Path to the .pptx file.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Tuple of (extracted_text, metadata)
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
ImportError: If python-pptx is not installed.
|
|
125
|
+
"""
|
|
126
|
+
try:
|
|
127
|
+
from pptx import Presentation
|
|
128
|
+
except ImportError:
|
|
129
|
+
raise ImportError(
|
|
130
|
+
"python-pptx is required to read .pptx files. "
|
|
131
|
+
"Install with: uv add python-pptx"
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
prs = Presentation(path)
|
|
135
|
+
slides_text = []
|
|
136
|
+
|
|
137
|
+
for i, slide in enumerate(prs.slides, 1):
|
|
138
|
+
slide_text = [f"Slide {i}:"]
|
|
139
|
+
|
|
140
|
+
# Extract text from shapes
|
|
141
|
+
for shape in slide.shapes:
|
|
142
|
+
if hasattr(shape, "text") and shape.text.strip():
|
|
143
|
+
slide_text.append(shape.text.strip())
|
|
144
|
+
|
|
145
|
+
# Extract notes
|
|
146
|
+
if slide.has_notes_slide:
|
|
147
|
+
notes_text = slide.notes_slide.notes_text_frame.text.strip()
|
|
148
|
+
if notes_text:
|
|
149
|
+
slide_text.append(f"Notes: {notes_text}")
|
|
150
|
+
|
|
151
|
+
if len(slide_text) > 1: # More than just "Slide N:"
|
|
152
|
+
slides_text.append("\n".join(slide_text))
|
|
153
|
+
|
|
154
|
+
all_text = "\n\n".join(slides_text)
|
|
155
|
+
|
|
156
|
+
metadata = {
|
|
157
|
+
"num_slides": len(prs.slides),
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return all_text, metadata
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def extract_pdf_text(path: str) -> tuple[str, dict[str, Any]]:
|
|
164
|
+
"""Extract text from a PDF document (.pdf).
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
path: Path to the .pdf file.
|
|
168
|
+
|
|
169
|
+
Returns:
|
|
170
|
+
Tuple of (extracted_text, metadata)
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
ImportError: If PyMuPDF is not installed.
|
|
174
|
+
"""
|
|
175
|
+
try:
|
|
176
|
+
import fitz # PyMuPDF
|
|
177
|
+
except ImportError:
|
|
178
|
+
raise ImportError(
|
|
179
|
+
"PyMuPDF is required to read .pdf files. "
|
|
180
|
+
"Install with: uv add pymupdf"
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
doc = fitz.open(path)
|
|
184
|
+
pages_text = []
|
|
185
|
+
|
|
186
|
+
for page_num in range(len(doc)):
|
|
187
|
+
page = doc[page_num]
|
|
188
|
+
text = page.get_text()
|
|
189
|
+
if text.strip():
|
|
190
|
+
pages_text.append(f"Page {page_num + 1}:\n{text.strip()}")
|
|
191
|
+
|
|
192
|
+
all_text = "\n\n".join(pages_text)
|
|
193
|
+
|
|
194
|
+
metadata = {
|
|
195
|
+
"num_pages": len(doc),
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
doc.close()
|
|
199
|
+
|
|
200
|
+
return all_text, metadata
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def read_file(path: str) -> tuple[str, str, dict[str, Any]]:
|
|
204
|
+
"""Read the contents of a file.
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
path: Path to the file to read.
|
|
208
|
+
|
|
209
|
+
Returns:
|
|
210
|
+
Tuple of (file_content, file_type, metadata)
|
|
211
|
+
|
|
212
|
+
Raises:
|
|
213
|
+
ValueError: If path is empty or file format is unsupported.
|
|
214
|
+
FileNotFoundError: If the file does not exist.
|
|
215
|
+
IsADirectoryError: If the path points to a directory.
|
|
216
|
+
"""
|
|
217
|
+
if not path or not path.strip():
|
|
218
|
+
raise ValueError("File path cannot be empty")
|
|
219
|
+
|
|
220
|
+
path = os.path.abspath(path)
|
|
221
|
+
|
|
222
|
+
if not os.path.exists(path):
|
|
223
|
+
raise FileNotFoundError(f"File not found: {path}")
|
|
224
|
+
|
|
225
|
+
if os.path.isdir(path):
|
|
226
|
+
raise IsADirectoryError(f"Path is a directory, not a file: {path}")
|
|
227
|
+
|
|
228
|
+
# Detect file type
|
|
229
|
+
file_ext = Path(path).suffix.lower()
|
|
230
|
+
|
|
231
|
+
# Extract based on file type
|
|
232
|
+
try:
|
|
233
|
+
if file_ext == ".docx":
|
|
234
|
+
content, metadata = extract_docx_text(path)
|
|
235
|
+
return content, "docx", metadata
|
|
236
|
+
|
|
237
|
+
elif file_ext == ".xlsx":
|
|
238
|
+
content, metadata = extract_xlsx_text(path)
|
|
239
|
+
return content, "xlsx", metadata
|
|
240
|
+
|
|
241
|
+
elif file_ext == ".pptx":
|
|
242
|
+
content, metadata = extract_pptx_text(path)
|
|
243
|
+
return content, "pptx", metadata
|
|
244
|
+
|
|
245
|
+
elif file_ext == ".pdf":
|
|
246
|
+
content, metadata = extract_pdf_text(path)
|
|
247
|
+
return content, "pdf", metadata
|
|
248
|
+
|
|
249
|
+
else:
|
|
250
|
+
# Default: read as plain text
|
|
251
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
252
|
+
content = f.read()
|
|
253
|
+
return content, "text", {"encoding": "utf-8"}
|
|
254
|
+
|
|
255
|
+
except ImportError as e:
|
|
256
|
+
raise ValueError(str(e))
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def main() -> None:
|
|
260
|
+
parser = argparse.ArgumentParser(
|
|
261
|
+
description="Read a file and output its content as JSON on stdout."
|
|
262
|
+
)
|
|
263
|
+
parser.add_argument(
|
|
264
|
+
"--path",
|
|
265
|
+
required=True,
|
|
266
|
+
help="Path to the file to read (absolute or relative to current directory)",
|
|
267
|
+
)
|
|
268
|
+
args = parser.parse_args()
|
|
269
|
+
|
|
270
|
+
try:
|
|
271
|
+
content, file_type, metadata = read_file(args.path)
|
|
272
|
+
result = {
|
|
273
|
+
"status": "success",
|
|
274
|
+
"results": content,
|
|
275
|
+
"file_type": file_type,
|
|
276
|
+
"metadata": metadata,
|
|
277
|
+
}
|
|
278
|
+
print(json.dumps(result))
|
|
279
|
+
except Exception as e:
|
|
280
|
+
print(json.dumps({"status": "error", "message": str(e)}), file=sys.stderr)
|
|
281
|
+
sys.exit(1)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
if __name__ == "__main__":
|
|
285
|
+
main()
|