iatoolkit 2.62.1__tar.gz → 2.64.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {iatoolkit-2.62.1/src/iatoolkit.egg-info → iatoolkit-2.64.0}/PKG-INFO +1 -1
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/pyproject.toml +1 -1
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/__init__.py +1 -1
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/routes.py +9 -0
- iatoolkit-2.64.0/src/iatoolkit/config/system_agents/memory_compiler.prompt +37 -0
- iatoolkit-2.64.0/src/iatoolkit/config/system_agents/memory_correction.prompt +22 -0
- iatoolkit-2.64.0/src/iatoolkit/config/system_agents/memory_question_review.prompt +23 -0
- iatoolkit-2.64.0/src/iatoolkit/config/system_agents_pack.yaml +102 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_tools_pack.yaml +2 -2
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/core.py +2 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/locales/en.yaml +8 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/locales/es.yaml +8 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/configuration_service.py +43 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/memory_compiler_service.py +64 -127
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/memory_question_service.py +14 -66
- iatoolkit-2.64.0/src/iatoolkit/services/system_agent_catalog.py +192 -0
- iatoolkit-2.64.0/src/iatoolkit/services/system_agent_runner.py +255 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/tenant_wiki_service.py +53 -12
- iatoolkit-2.64.0/src/iatoolkit/static/styles/wiki_page.css +35 -0
- iatoolkit-2.64.0/src/iatoolkit/templates/wiki_page.html +29 -0
- iatoolkit-2.64.0/src/iatoolkit/views/wiki_page_view.py +110 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0/src/iatoolkit.egg-info}/PKG-INFO +1 -1
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit.egg-info/SOURCES.txt +10 -1
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/LICENSE +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/LICENSE_COMMUNITY.md +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/readme.md +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/setup.cfg +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/base_company.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/cli_commands.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/bridge_validation.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/company_paths.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/exceptions.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/asset_storage.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/database_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/memory_compilation_trigger.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/secret_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/signup_policy_resolver.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/interfaces/web_search_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/model_registry.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/search_terms.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/secret_resolver.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/session_manager.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/text_splitter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/url_safety.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/common/util.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/company_registry.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/llm_capabilities.yaml +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/channel_business_identity.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/channel_conversation_continuity.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/channel_response_style.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/chat_state_rules.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/chat_user_profile.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/core_identity.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/email_output.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/file_download_output.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/format_styles.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/html_structures.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/links_documents.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/memory_usage.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/multimodal_basics.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/output_basics.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/presentation_formatting.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/query_main.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_aggregation_scope.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_casting.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_core.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_jsonb.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_mysql_casting.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_mysql_json.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_redshift_basics.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_redshift_types.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/sql_rules.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts/tool_html_passthrough.prompt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/config/system_prompts_pack.yaml +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/brevo_mail_app.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/call_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/file_connector.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/file_connector_factory.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/google_cloud_storage_connector.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/google_drive_connector.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/local_file_connector.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/connectors/s3_connector.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/google_auth_client.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/google_chat_app.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/inference_embeddings_client.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/inference_handler.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/jina_embeddings_client.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_gateway_resolver.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/anthropic_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/deepseek_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/gemini_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/openai_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/openai_compatible_chat_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_providers/openrouter_adapter.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_proxy.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/llm_response.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/infra/redis_session_manager.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/api_key_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/bridge_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/database_manager.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/document_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/env_secret_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/filesystem_asset_repository.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/knowledge_wiki_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/llm_query_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/mcp_token_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/memory_question_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/memory_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/models.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/profile_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/prompt_resource_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/sql_dataset_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/sql_source_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/repositories/vs_repo.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/runtime_logging.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/api_key_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/attachment_policy_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/auth_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/branding_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/company_context_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/context_builder_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/dispatcher_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/embedding_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/excel_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/file_processor_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/history_manager_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/http_tool_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/i18n_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/inference_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/jwt_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/knowledge_base_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/language_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/license_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/llm_client_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/mail_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/markdown_wiki_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/mcp_token_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/memory_lookup_policy_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/memory_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/memory_wiki_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/noop_memory_compilation_trigger.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/operator_identity_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/contracts.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/image_normalizer.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/parsing_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/pdf_ocr_detection.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/provider_factory.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/provider_resolver.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/providers/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/providers/basic_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/providers/docling_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/parsers/validator.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/pdf_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/profile_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/prompt_resource_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/prompt_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/query_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/signup_policy_resolver.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/sql_dataset_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/sql_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/sql_source_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/storage_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/structured_output_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/system_prompt_catalog.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/system_tools.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/telemetry_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/tool_output_contract.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/tool_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/user_feedback_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/user_session_context_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/visual_kb_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/visual_tool_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/warmup_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/web_search/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/web_search/provider_factory.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/web_search/providers/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/web_search/providers/brave_provider.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/services/web_search_service.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/images/favicon.ico +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/images/favicon.png +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/images/fernando.jpeg +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/images/iatoolkit_core.png +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/images/iatoolkit_logo.png +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_feedback_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_filepond.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_header_navigation.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_help_content.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_history_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_logout_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_main.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_memory_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_model_selector.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_onboarding_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_prompt_manager.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/js/chat_reload_button.js +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/account.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/chat_iatoolkit.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/chat_modal.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/chat_public.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/documents.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/landing_page.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/llm_output.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/static/styles/onboarding.css +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/_chat_header.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/_company_header.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/_login_widget.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/account.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/base.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/change_password.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/chat.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/chat_memory_modal.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/chat_modals.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/error.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/forgot_password.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/home_hosted_default.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/login_global.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/memory/wiki_schema.md +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/onboarding_shell.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/pdf/base.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/pdf/letter.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/pdf/report.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/pdf/simple.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/templates/signup.html +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/__init__.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/account_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/api_key_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/base_login_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/categories_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/change_password_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/chat_context_preview_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/chat_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/configuration_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/connectors_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/embedding_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/forgot_password_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/help_content_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/history_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/home_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/init_context_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/llmquery_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/load_document_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/login_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/logout_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/memory_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/profile_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/prompt_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/prompt_context_preview_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/prompt_resource_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/rag_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/root_redirect_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/signup_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/static_page_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/tool_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/user_feedback_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/users_api_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit/views/verify_user_view.py +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit.egg-info/dependency_links.txt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit.egg-info/requires.txt +0 -0
- {iatoolkit-2.62.1 → iatoolkit-2.64.0}/src/iatoolkit.egg-info/top_level.txt +0 -0
|
@@ -160,7 +160,7 @@ exclude = ["tests*", "*/tests*"]
|
|
|
160
160
|
version = { attr = "iatoolkit.__version__" }
|
|
161
161
|
|
|
162
162
|
[tool.setuptools.package-data]
|
|
163
|
-
iatoolkit = ["templates/**/*", "static/**/*", "locales/*.yaml", "config/*.yaml", "config/system_prompts/*.prompt"]
|
|
163
|
+
iatoolkit = ["templates/**/*", "static/**/*", "locales/*.yaml", "config/*.yaml", "config/system_prompts/*.prompt", "config/system_agents/*.prompt"]
|
|
164
164
|
|
|
165
165
|
# Declared so the suite behaves identically however it is launched. Before this,
|
|
166
166
|
# the layout worked only by accident: `src/tests/__init__.py` made pytest insert
|
|
@@ -52,6 +52,7 @@ def register_views(app):
|
|
|
52
52
|
from iatoolkit.views.tool_api_view import ToolApiView
|
|
53
53
|
from iatoolkit.views.api_key_api_view import ApiKeyApiView
|
|
54
54
|
from iatoolkit.views.memory_api_view import MemoryApiView
|
|
55
|
+
from iatoolkit.views.wiki_page_view import WikiPageView
|
|
55
56
|
|
|
56
57
|
# Dependency-free liveness endpoint for load balancer/orchestrator health
|
|
57
58
|
# checks (ALB, ECS, Docker HEALTHCHECK, etc). Deliberately returns a plain
|
|
@@ -103,6 +104,14 @@ def register_views(app):
|
|
|
103
104
|
view_func=AccountView.as_view('account'),
|
|
104
105
|
methods=['GET', 'POST'])
|
|
105
106
|
|
|
107
|
+
# a knowledge wiki page in the browser: where the wiki tools' `url` points
|
|
108
|
+
wiki_page_view = WikiPageView.as_view('wiki_page')
|
|
109
|
+
app.add_url_rule('/<company_short_name>/wiki/<wiki_key>/',
|
|
110
|
+
defaults={'page_path': ''},
|
|
111
|
+
view_func=wiki_page_view)
|
|
112
|
+
app.add_url_rule('/<company_short_name>/wiki/<wiki_key>/<path:page_path>',
|
|
113
|
+
view_func=wiki_page_view)
|
|
114
|
+
|
|
106
115
|
# this endpoint is called when onboarding_shell finish the context load
|
|
107
116
|
app.add_url_rule(
|
|
108
117
|
'/<company_short_name>/finalize',
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
You maintain the company's Memory: a wiki of how things are actually done in this company (procedures, rules, exceptions, who decides), written from what its people explained.
|
|
2
|
+
|
|
3
|
+
A person just saved something new (NEW_CAPTURE). Decide what to do with it:
|
|
4
|
+
|
|
5
|
+
- `update` one of the CANDIDATE_PAGES when the capture belongs to its subject.
|
|
6
|
+
- `create` a new page when no candidate covers the subject. Check PAGE_INDEX first: do not create a page that duplicates an existing one.
|
|
7
|
+
- `skip` when the capture has nothing durable to keep (a greeting, a test, a personal reminder, something already on the page).
|
|
8
|
+
|
|
9
|
+
How to write the page:
|
|
10
|
+
|
|
11
|
+
- Follow the WIKI_SCHEMA.
|
|
12
|
+
- When you update, return the COMPLETE new page: keep everything already on it, word for word, including other people's attributions, headings and order. Change only what the capture changes, and put new facts in the section where they belong.
|
|
13
|
+
- When the capture contradicts the page, keep both statements with their attributions and make the conflict explicit; never delete what someone else said.
|
|
14
|
+
- Attribute every fact you add as ({{ author }}, {{ captured_on }}).
|
|
15
|
+
- Write in the language of the page, or of the capture for a new page. Neutral tone, no personal opinions.
|
|
16
|
+
- If attachments come with the capture, use what they say as part of the capture.
|
|
17
|
+
|
|
18
|
+
Answer with JSON following the schema:
|
|
19
|
+
|
|
20
|
+
- `action`: create, update or skip.
|
|
21
|
+
- `target_page_id`: the page_id of the candidate you update; null when you create or skip.
|
|
22
|
+
- `title`: the page title.
|
|
23
|
+
- `summary`: one sentence saying what the page covers.
|
|
24
|
+
- `markdown`: the page body without frontmatter, starting with `# Title`.
|
|
25
|
+
- `change_summary`: one short sentence for the page history (when you skip, why).
|
|
26
|
+
|
|
27
|
+
WIKI_SCHEMA:
|
|
28
|
+
{{ wiki_schema }}
|
|
29
|
+
|
|
30
|
+
PAGE_INDEX:
|
|
31
|
+
{{ page_index | json }}
|
|
32
|
+
|
|
33
|
+
NEW_CAPTURE (from {{ author }}, {{ captured_on }}):
|
|
34
|
+
{{ capture | json }}
|
|
35
|
+
|
|
36
|
+
CANDIDATE_PAGES:
|
|
37
|
+
{{ candidate_pages | json }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
You maintain the company's Memory wiki. A person asked for ONE change to ONE page (REQUEST). Apply only that change.
|
|
2
|
+
|
|
3
|
+
Rules:
|
|
4
|
+
|
|
5
|
+
- Keep every other line of the page exactly as it is, word for word: other people's attributions, headings, order and formatting. Do not rephrase, reorganize, summarize or fix anything else.
|
|
6
|
+
- On the line you change or add, replace the old attribution with ({{ author }}, {{ captured_on }}).
|
|
7
|
+
- If the request does not apply to this page, or you cannot tell what to change, do not guess: return `skip`.
|
|
8
|
+
|
|
9
|
+
Answer with JSON following the schema:
|
|
10
|
+
|
|
11
|
+
- `action`: `update` when you applied the change, `skip` when you did not.
|
|
12
|
+
- `target_page_id`: {{ page.id }}.
|
|
13
|
+
- `title`: the page title (keep it unless the request asks to change it).
|
|
14
|
+
- `summary`: the page summary (keep it unless the change makes it wrong).
|
|
15
|
+
- `markdown`: with `update`, the COMPLETE new page body without frontmatter, starting with `# Title`; with `skip`, an empty string.
|
|
16
|
+
- `change_summary`: with `update`, one sentence saying what changed, in the language of the page; with `skip`, why you did not change anything, in the language of the request.
|
|
17
|
+
|
|
18
|
+
REQUEST (from {{ author }}, {{ captured_on }}):
|
|
19
|
+
{{ request }}
|
|
20
|
+
|
|
21
|
+
PAGE (id {{ page.id }}, title {{ page.title | json }}):
|
|
22
|
+
{{ page.markdown }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
You review conversations between people and the company's AI assistant. In each turn below the assistant searched the company's memory or documents to answer a question about the company (a turn with no answer is a search that found nothing).
|
|
2
|
+
|
|
3
|
+
Your job is to find the questions about the company that went unanswered, so someone who knows can answer them.
|
|
4
|
+
|
|
5
|
+
For each turn decide `answered`:
|
|
6
|
+
|
|
7
|
+
- true when the answer gave a concrete answer based on the company's own information;
|
|
8
|
+
- false when the assistant said it did not find it or did not know, gave only generic advice, or sent the person to ask someone else.
|
|
9
|
+
|
|
10
|
+
For each turn with answered=false also return:
|
|
11
|
+
|
|
12
|
+
- `question`: the question rewritten as one neutral sentence, in the language of the turn, without names of people, personal details or the conversation's wording, so anyone in the company could answer it;
|
|
13
|
+
- `topic`: two or three words for its subject;
|
|
14
|
+
- `same_as_question_id`: the id of the OPEN QUESTION that asks the same thing, or null;
|
|
15
|
+
- `same_as_ref`: when it asks the same as an earlier unanswered turn of this batch that is not an open question yet, that turn's ref; otherwise null.
|
|
16
|
+
|
|
17
|
+
Return exactly one item per turn, with its `ref`, under `items`.
|
|
18
|
+
|
|
19
|
+
OPEN QUESTIONS:
|
|
20
|
+
{{ open_questions | json }}
|
|
21
|
+
|
|
22
|
+
TURNS:
|
|
23
|
+
{{ turns | json }}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# System agents: model calls the platform makes on its own (see
|
|
2
|
+
# services/system_agent_catalog.py). The tenant may pick each one's model
|
|
3
|
+
# (system_agents.<key>.model in company.yaml); the prompt, inputs and output
|
|
4
|
+
# schema belong to the code that reads the answer and are not editable.
|
|
5
|
+
#
|
|
6
|
+
# `prompt` is a Jinja template in system_agents/, rendered with `inputs`.
|
|
7
|
+
# `default_model: null` means the company's default model.
|
|
8
|
+
version: 1
|
|
9
|
+
|
|
10
|
+
schemas:
|
|
11
|
+
# A Memoria page created, updated or left alone.
|
|
12
|
+
memory_page:
|
|
13
|
+
type: object
|
|
14
|
+
properties:
|
|
15
|
+
action:
|
|
16
|
+
type: string
|
|
17
|
+
enum: [create, update, skip]
|
|
18
|
+
# Nullable as a type list: the structured-output validator rejects null under anyOf.
|
|
19
|
+
target_page_id:
|
|
20
|
+
type: [integer, "null"]
|
|
21
|
+
title:
|
|
22
|
+
type: string
|
|
23
|
+
summary:
|
|
24
|
+
type: string
|
|
25
|
+
markdown:
|
|
26
|
+
type: string
|
|
27
|
+
change_summary:
|
|
28
|
+
type: string
|
|
29
|
+
# Only what a page cannot do without: models often drop the optional
|
|
30
|
+
# fields, and a near miss is repaired by the compiler's normalizer.
|
|
31
|
+
required: [action, target_page_id, title, markdown]
|
|
32
|
+
additionalProperties: false
|
|
33
|
+
|
|
34
|
+
agents:
|
|
35
|
+
- key: memory_compiler
|
|
36
|
+
name: Compilador de Memoria
|
|
37
|
+
name_en: Memory compiler
|
|
38
|
+
description: >-
|
|
39
|
+
(Memoria de la empresa) Integra lo que la gente guarda en Memoria en la página que corresponde,
|
|
40
|
+
o crea una nueva, atribuyendo cada dato a su autor.
|
|
41
|
+
description_en: >-
|
|
42
|
+
(Company memory) Files what people save in Memory into the right page, or creates a new
|
|
43
|
+
one, attributing every fact to its author.
|
|
44
|
+
module: memory
|
|
45
|
+
prompt: memory_compiler.prompt
|
|
46
|
+
output_schema: memory_page
|
|
47
|
+
inputs: [author, captured_on, wiki_schema, page_index, capture, candidate_pages]
|
|
48
|
+
default_model: null
|
|
49
|
+
|
|
50
|
+
- key: memory_correction
|
|
51
|
+
name: Corrector de Memoria
|
|
52
|
+
name_en: Memory corrector
|
|
53
|
+
description: >-
|
|
54
|
+
(Memoria de la empresa) Aplica a una página de Memoria el cambio que alguien pidió, sin tocar el
|
|
55
|
+
resto de la página.
|
|
56
|
+
description_en: >-
|
|
57
|
+
(Company memory) Applies to a Memory page the change someone asked for, leaving the rest
|
|
58
|
+
of the page as it is.
|
|
59
|
+
module: memory
|
|
60
|
+
prompt: memory_correction.prompt
|
|
61
|
+
output_schema: memory_page
|
|
62
|
+
inputs: [author, captured_on, request, page]
|
|
63
|
+
default_model: null
|
|
64
|
+
|
|
65
|
+
- key: memory_question_review
|
|
66
|
+
name: Revisión de preguntas sin respuesta
|
|
67
|
+
name_en: Unanswered questions review
|
|
68
|
+
description: >-
|
|
69
|
+
(Memoria de la empresa) Revisa las conversaciones que buscaron en Memoria o en los documentos y
|
|
70
|
+
detecta las preguntas que la IA no pudo responder.
|
|
71
|
+
description_en: >-
|
|
72
|
+
(Company memory) Reviews the conversations that searched Memory or the documents and finds
|
|
73
|
+
the questions the AI could not answer.
|
|
74
|
+
module: memory
|
|
75
|
+
prompt: memory_question_review.prompt
|
|
76
|
+
output_schema:
|
|
77
|
+
type: object
|
|
78
|
+
properties:
|
|
79
|
+
items:
|
|
80
|
+
type: array
|
|
81
|
+
items:
|
|
82
|
+
type: object
|
|
83
|
+
properties:
|
|
84
|
+
ref:
|
|
85
|
+
type: string
|
|
86
|
+
answered:
|
|
87
|
+
type: boolean
|
|
88
|
+
question:
|
|
89
|
+
type: string
|
|
90
|
+
topic:
|
|
91
|
+
type: string
|
|
92
|
+
# Nullable as a type list: core's validator rejects null under anyOf.
|
|
93
|
+
same_as_question_id:
|
|
94
|
+
type: [integer, "null"]
|
|
95
|
+
same_as_ref:
|
|
96
|
+
type: [string, "null"]
|
|
97
|
+
required: [ref, answered]
|
|
98
|
+
additionalProperties: false
|
|
99
|
+
required: [items]
|
|
100
|
+
additionalProperties: false
|
|
101
|
+
inputs: [open_questions, turns]
|
|
102
|
+
default_model: null
|
|
@@ -378,7 +378,7 @@ tools:
|
|
|
378
378
|
required:
|
|
379
379
|
- document_id
|
|
380
380
|
- function_name: iat_wiki_search
|
|
381
|
-
description: Busca páginas publicadas dentro de las wikis de conocimiento compartidas por la empresa. Úsala como acelerador cuando necesites encontrar rápidamente una página relevante, pero no como punto de entrada por defecto. Si no conoces un `path` válido, primero llama `iat_wiki_get_page` con `path="/"` para leer el índice raíz de la wiki y seguir sus links exactos. `wiki_key` es el identificador estable de una wiki publicada, por ejemplo `sales`, `ops` o `hr`; úsalo cuando ya sepas en qué wiki buscar y omítelo cuando quieras buscar en todas las wikis publicadas disponibles en esta conexión MCP. Esta tool devuelve candidatos; luego usa `iat_wiki_get_page` para leer la página completa antes de responder.
|
|
381
|
+
description: Busca páginas publicadas dentro de las wikis de conocimiento compartidas por la empresa. Úsala como acelerador cuando necesites encontrar rápidamente una página relevante, pero no como punto de entrada por defecto. Si no conoces un `path` válido, primero llama `iat_wiki_get_page` con `path="/"` para leer el índice raíz de la wiki y seguir sus links exactos. `wiki_key` es el identificador estable de una wiki publicada, por ejemplo `sales`, `ops` o `hr`; úsalo cuando ya sepas en qué wiki buscar y omítelo cuando quieras buscar en todas las wikis publicadas disponibles en esta conexión MCP. Esta tool devuelve candidatos; luego usa `iat_wiki_get_page` para leer la página completa antes de responder. Cada candidato trae `url`, el link para abrir la página en el navegador.
|
|
382
382
|
routing:
|
|
383
383
|
force_include_capability: has_knowledge_wikis
|
|
384
384
|
routing_profile:
|
|
@@ -427,7 +427,7 @@ tools:
|
|
|
427
427
|
description: |-
|
|
428
428
|
Wiki entrypoint: llama `iat_wiki_get_page` con `path="/"` para cargar el índice raíz de una wiki de conocimiento publicada del tenant.
|
|
429
429
|
Lee **una** página de wiki y devuelve su contenido en Markdown. La wiki documenta contexto de negocio, áreas, sistemas internos, arquitectura, procesos, políticas, runbooks, onboarding, operaciones y glosarios. Es una wiki navegable por links: la página raíz `path="/"` es el punto de entrada y lista las páginas disponibles con sus paths exactos; después abre solo las páginas relevantes siguiendo esos links o los paths devueltos por iat_wiki_search (solo si esta habilitada).
|
|
430
|
-
`wiki_key` identifica la wiki publicada. Los `path` son sensibles a mayúsculas y deben coincidir EXACTAMENTE con el link o path publicado; no los inventes ni los reconstruyas de memoria. Si no conoces un path válido, vuelve a llamar con `path="/"`. Esta tool es de solo lectura y es segura de usar siempre que la documentación interna de la empresa ayude a responder. Prefiere abrir pocas páginas puntuales antes de recorrer el corpus completo. Cuando respondas usando material de la wiki, cita la página usada.
|
|
430
|
+
`wiki_key` identifica la wiki publicada. Los `path` son sensibles a mayúsculas y deben coincidir EXACTAMENTE con el link o path publicado; no los inventes ni los reconstruyas de memoria. Si no conoces un path válido, vuelve a llamar con `path="/"`. Esta tool es de solo lectura y es segura de usar siempre que la documentación interna de la empresa ayude a responder. Prefiere abrir pocas páginas puntuales antes de recorrer el corpus completo. Cuando respondas usando material de la wiki, cita la página usada; si trae `url`, cítala como link con esa URL exacta.
|
|
431
431
|
routing:
|
|
432
432
|
force_include_capability: has_knowledge_wikis
|
|
433
433
|
routing_profile:
|
|
@@ -439,6 +439,7 @@ class IAToolkit:
|
|
|
439
439
|
from iatoolkit.services.mail_service import MailService
|
|
440
440
|
from iatoolkit.services.memory_compiler_service import MemoryCompilerService
|
|
441
441
|
from iatoolkit.services.memory_question_service import MemoryQuestionService
|
|
442
|
+
from iatoolkit.services.system_agent_runner import SystemAgentRunner
|
|
442
443
|
from iatoolkit.services.memory_service import MemoryService
|
|
443
444
|
from iatoolkit.services.mcp_token_service import McpTokenService
|
|
444
445
|
from iatoolkit.services.memory_wiki_service import MemoryWikiService
|
|
@@ -483,6 +484,7 @@ class IAToolkit:
|
|
|
483
484
|
binder.bind(PdfService, to=PdfService)
|
|
484
485
|
binder.bind(MailService, to=MailService)
|
|
485
486
|
binder.bind(MemoryWikiService, to=MemoryWikiService)
|
|
487
|
+
binder.bind(SystemAgentRunner, to=SystemAgentRunner)
|
|
486
488
|
binder.bind(MemoryCompilerService, to=MemoryCompilerService)
|
|
487
489
|
binder.bind(MemoryQuestionService, to=MemoryQuestionService)
|
|
488
490
|
binder.bind(MemoryService, to=MemoryService)
|
|
@@ -377,6 +377,14 @@ ui:
|
|
|
377
377
|
last_used: "Last used"
|
|
378
378
|
never_used: "No recorded use"
|
|
379
379
|
|
|
380
|
+
wiki_page:
|
|
381
|
+
back_to_chat: "Back to chat"
|
|
382
|
+
trail_label: "Location in the wiki"
|
|
383
|
+
empty: "This page has no content."
|
|
384
|
+
not_found: "This page does not exist in the wiki or is no longer published."
|
|
385
|
+
forbidden: "You do not have access to this page."
|
|
386
|
+
forbidden_labels: "You do not have access to this page. You need one of these labels: {labels}."
|
|
387
|
+
unavailable: "We could not verify your access right now. Try again in a few minutes."
|
|
380
388
|
memory:
|
|
381
389
|
title: "Company memory"
|
|
382
390
|
capture_title: "Teach the company something"
|
|
@@ -391,6 +391,14 @@ ui:
|
|
|
391
391
|
last_used: "Último uso"
|
|
392
392
|
never_used: "Sin uso registrado"
|
|
393
393
|
|
|
394
|
+
wiki_page:
|
|
395
|
+
back_to_chat: "Volver al chat"
|
|
396
|
+
trail_label: "Ubicación en la wiki"
|
|
397
|
+
empty: "Esta página no tiene contenido."
|
|
398
|
+
not_found: "Esta página no existe en la wiki o ya no está publicada."
|
|
399
|
+
forbidden: "No tienes acceso a esta página."
|
|
400
|
+
forbidden_labels: "No tienes acceso a esta página. Necesitas alguna de estas etiquetas: {labels}."
|
|
401
|
+
unavailable: "No pudimos verificar tu acceso en este momento. Intenta de nuevo en unos minutos."
|
|
394
402
|
memory:
|
|
395
403
|
title: "Memoria de la empresa"
|
|
396
404
|
capture_title: "Enseñar algo a la empresa"
|
|
@@ -313,6 +313,37 @@ class ConfigurationService:
|
|
|
313
313
|
|
|
314
314
|
return config, []
|
|
315
315
|
|
|
316
|
+
def remove_configuration_key(self, company_short_name: str, key: str) -> tuple[dict, list[str]]:
|
|
317
|
+
"""
|
|
318
|
+
Removes a key (dot notation) from company.yaml, so a setting that went back
|
|
319
|
+
to its default leaves no empty section behind. A missing key is not an error.
|
|
320
|
+
"""
|
|
321
|
+
main_config_filename = "company.yaml"
|
|
322
|
+
if not self.asset_repo.exists(company_short_name, AssetType.CONFIG, main_config_filename):
|
|
323
|
+
raise FileNotFoundError(f"Configuration file not found for {company_short_name}")
|
|
324
|
+
|
|
325
|
+
yaml_content = self.asset_repo.read_text(company_short_name, AssetType.CONFIG, main_config_filename)
|
|
326
|
+
config = self.utility.load_yaml_from_string(yaml_content) or {}
|
|
327
|
+
|
|
328
|
+
*parents, last = key.split('.')
|
|
329
|
+
current = config
|
|
330
|
+
for part in parents:
|
|
331
|
+
current = current.get(part) if isinstance(current, dict) else None
|
|
332
|
+
if not isinstance(current, dict) or last not in current:
|
|
333
|
+
return config, []
|
|
334
|
+
current.pop(last)
|
|
335
|
+
|
|
336
|
+
errors = self._validate_configuration(company_short_name, config)
|
|
337
|
+
if errors:
|
|
338
|
+
logging.warning(f"Configuration update failed validation: {errors}")
|
|
339
|
+
return config, errors
|
|
340
|
+
|
|
341
|
+
self.asset_repo.write_text(company_short_name, AssetType.CONFIG, main_config_filename,
|
|
342
|
+
self.utility.dump_yaml_to_string(config))
|
|
343
|
+
if company_short_name in self._loaded_configs:
|
|
344
|
+
del self._loaded_configs[company_short_name]
|
|
345
|
+
return config, []
|
|
346
|
+
|
|
316
347
|
def add_configuration_key(self, company_short_name: str, parent_key: str, key: str, value) -> tuple[dict, list[str]]:
|
|
317
348
|
"""
|
|
318
349
|
Adds a new key-value pair under a specific parent key in the configuration.
|
|
@@ -500,6 +531,18 @@ class ConfigurationService:
|
|
|
500
531
|
else:
|
|
501
532
|
self._validate_mcp_url_config(mcp_config, add_error)
|
|
502
533
|
|
|
534
|
+
# The model the tenant picked for each system agent (see SystemAgentRunner).
|
|
535
|
+
system_agents = config.get("system_agents")
|
|
536
|
+
if system_agents is not None:
|
|
537
|
+
if not isinstance(system_agents, dict):
|
|
538
|
+
add_error("system_agents", "Must be a dictionary of agent keys.")
|
|
539
|
+
else:
|
|
540
|
+
for agent_key, agent_config in system_agents.items():
|
|
541
|
+
if not isinstance(agent_config, dict):
|
|
542
|
+
add_error(f"system_agents.{agent_key}", "Must be a dictionary.")
|
|
543
|
+
elif agent_config.get("model") is not None and not isinstance(agent_config.get("model"), str):
|
|
544
|
+
add_error(f"system_agents.{agent_key}.model", "Must be a single model name.")
|
|
545
|
+
|
|
503
546
|
# 2. LLM section
|
|
504
547
|
if not isinstance(config.get("llm"), dict):
|
|
505
548
|
add_error("llm", "Missing or invalid 'llm' section.")
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import base64
|
|
9
|
-
import json
|
|
10
9
|
import logging
|
|
11
10
|
import mimetypes
|
|
12
11
|
import re
|
|
@@ -22,10 +21,9 @@ from iatoolkit.repositories.database_manager import DatabaseManager
|
|
|
22
21
|
from iatoolkit.repositories.memory_repo import MemoryRepo
|
|
23
22
|
from iatoolkit.repositories.models import Company, MemoryCapture, MemoryCaptureStatus, MemoryItem, MemoryItemStatus, MemoryItemType
|
|
24
23
|
from iatoolkit.repositories.profile_repo import ProfileRepo
|
|
25
|
-
from iatoolkit.services.configuration_service import ConfigurationService
|
|
26
|
-
from iatoolkit.services.llm_client_service import llmClient
|
|
27
24
|
from iatoolkit.services.memory_wiki_service import MemoryWikiService
|
|
28
25
|
from iatoolkit.services.storage_service import StorageService
|
|
26
|
+
from iatoolkit.services.system_agent_runner import SystemAgentRunner
|
|
29
27
|
from iatoolkit.services.tenant_wiki_service import TenantWikiService
|
|
30
28
|
|
|
31
29
|
|
|
@@ -58,42 +56,22 @@ class MemoryCompilerService:
|
|
|
58
56
|
# First key of the two-key Postgres advisory lock; the second is the company id.
|
|
59
57
|
ADVISORY_LOCK_NAMESPACE = 734001
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"action": {"type": "string", "enum": ["create", "update", "skip"]},
|
|
65
|
-
# Nullable as a type list: the structured-output validator rejects null under anyOf.
|
|
66
|
-
"target_page_id": {"type": ["integer", "null"]},
|
|
67
|
-
"title": {"type": "string"},
|
|
68
|
-
"summary": {"type": "string"},
|
|
69
|
-
"markdown": {"type": "string"},
|
|
70
|
-
"change_summary": {"type": "string"},
|
|
71
|
-
},
|
|
72
|
-
# Only what a page cannot do without: models often drop the optional
|
|
73
|
-
# fields, and a near miss is repaired by _normalize_compiled_output.
|
|
74
|
-
"required": [
|
|
75
|
-
"action",
|
|
76
|
-
"target_page_id",
|
|
77
|
-
"title",
|
|
78
|
-
"markdown",
|
|
79
|
-
],
|
|
80
|
-
"additionalProperties": False,
|
|
81
|
-
}
|
|
59
|
+
# System agents (config/system_agents_pack.yaml) that write the pages.
|
|
60
|
+
COMPILER_AGENT = "memory_compiler"
|
|
61
|
+
CORRECTION_AGENT = "memory_correction"
|
|
82
62
|
|
|
83
63
|
@inject
|
|
84
64
|
def __init__(self,
|
|
85
65
|
profile_repo: ProfileRepo,
|
|
86
66
|
memory_repo: MemoryRepo,
|
|
87
67
|
memory_wiki_service: MemoryWikiService,
|
|
88
|
-
|
|
89
|
-
configuration_service: ConfigurationService,
|
|
68
|
+
system_agent_runner: SystemAgentRunner,
|
|
90
69
|
storage_service: StorageService,
|
|
91
70
|
db_manager: DatabaseManager):
|
|
92
71
|
self.profile_repo = profile_repo
|
|
93
72
|
self.memory_repo = memory_repo
|
|
94
73
|
self.memory_wiki_service = memory_wiki_service
|
|
95
|
-
self.
|
|
96
|
-
self.configuration_service = configuration_service
|
|
74
|
+
self.system_agent_runner = system_agent_runner
|
|
97
75
|
self.storage_service = storage_service
|
|
98
76
|
self.db_manager = db_manager
|
|
99
77
|
|
|
@@ -320,41 +298,23 @@ class MemoryCompilerService:
|
|
|
320
298
|
page: dict,
|
|
321
299
|
author: str,
|
|
322
300
|
captured_on: str) -> dict | None:
|
|
323
|
-
model, _ = self.configuration_service.get_llm_configuration(company.short_name)
|
|
324
|
-
if not model:
|
|
325
|
-
return None
|
|
326
301
|
request = "\n".join(str(item.content_text or "").strip() for item in items if str(item.content_text or "").strip())
|
|
327
|
-
prompt = (
|
|
328
|
-
"You maintain the company's memory wiki. A person asked for ONE change to one page.\n"
|
|
329
|
-
"Apply only that change. Keep every other line of the page exactly as it is, word for word, "
|
|
330
|
-
"including other people's attributions, headings and order. Do not rephrase, reorganize or summarize.\n"
|
|
331
|
-
f"Attribute the line you change or add as ({author}, {captured_on}), replacing the attribution "
|
|
332
|
-
"the old statement had on that line.\n"
|
|
333
|
-
"If the request does not apply to this page or you cannot tell what to change, return action "
|
|
334
|
-
"\"skip\" and explain why in change_summary, in the language of the request.\n"
|
|
335
|
-
"Otherwise return action \"update\" with the COMPLETE new page body in `markdown` (without "
|
|
336
|
-
"frontmatter, starting with `# Title`) and a one-sentence `change_summary` in the language of the page.\n\n"
|
|
337
|
-
f"REQUEST (from {author}, {captured_on}):\n{request}\n\n"
|
|
338
|
-
f"PAGE (id {page.get('id')}, title {json.dumps(page.get('title') or '', ensure_ascii=False)}):\n"
|
|
339
|
-
f"{self.memory_wiki_service.page_body(page)}"
|
|
340
|
-
)
|
|
341
302
|
try:
|
|
342
|
-
response = self.
|
|
343
|
-
company
|
|
303
|
+
response = self.system_agent_runner.run(
|
|
304
|
+
company,
|
|
305
|
+
self.CORRECTION_AGENT,
|
|
306
|
+
{
|
|
307
|
+
"author": author,
|
|
308
|
+
"captured_on": captured_on,
|
|
309
|
+
"request": request,
|
|
310
|
+
"page": {
|
|
311
|
+
"id": page.get("id"),
|
|
312
|
+
"title": page.get("title") or "",
|
|
313
|
+
"markdown": self.memory_wiki_service.page_body(page),
|
|
314
|
+
},
|
|
315
|
+
},
|
|
344
316
|
user_identifier=capture.user_identifier,
|
|
345
|
-
previous_response_id=None,
|
|
346
317
|
question=f"Apply memory correction {capture.id}",
|
|
347
|
-
context=prompt,
|
|
348
|
-
tools=[],
|
|
349
|
-
text={},
|
|
350
|
-
model=model,
|
|
351
|
-
images=[],
|
|
352
|
-
attachments=[],
|
|
353
|
-
response_contract={
|
|
354
|
-
"schema": self.PAGE_SCHEMA,
|
|
355
|
-
"schema_mode": "best_effort",
|
|
356
|
-
"response_mode": "structured_only",
|
|
357
|
-
},
|
|
358
318
|
)
|
|
359
319
|
except Exception as exc:
|
|
360
320
|
logging.warning("Memory correction %s could not reach the model: %s", capture.id, exc)
|
|
@@ -427,11 +387,7 @@ class MemoryCompilerService:
|
|
|
427
387
|
candidates: list[dict],
|
|
428
388
|
author: str,
|
|
429
389
|
captured_on: str) -> dict | None:
|
|
430
|
-
|
|
431
|
-
if not model:
|
|
432
|
-
return None
|
|
433
|
-
|
|
434
|
-
prompt = self._build_compiler_prompt(
|
|
390
|
+
inputs = self._compiler_inputs(
|
|
435
391
|
capture,
|
|
436
392
|
items,
|
|
437
393
|
candidates,
|
|
@@ -442,22 +398,13 @@ class MemoryCompilerService:
|
|
|
442
398
|
)
|
|
443
399
|
native_pdf_attachments = self._build_capture_native_pdf_attachments(company.short_name, items)
|
|
444
400
|
try:
|
|
445
|
-
response = self.
|
|
446
|
-
company
|
|
401
|
+
response = self.system_agent_runner.run(
|
|
402
|
+
company,
|
|
403
|
+
self.COMPILER_AGENT,
|
|
404
|
+
inputs,
|
|
447
405
|
user_identifier=capture.user_identifier,
|
|
448
|
-
previous_response_id=None,
|
|
449
406
|
question=f"Compile memory capture {capture.id}",
|
|
450
|
-
context=prompt,
|
|
451
|
-
tools=[],
|
|
452
|
-
text={},
|
|
453
|
-
model=model,
|
|
454
|
-
images=[],
|
|
455
407
|
attachments=native_pdf_attachments,
|
|
456
|
-
response_contract={
|
|
457
|
-
"schema": self.PAGE_SCHEMA,
|
|
458
|
-
"schema_mode": "best_effort",
|
|
459
|
-
"response_mode": "structured_only",
|
|
460
|
-
},
|
|
461
408
|
)
|
|
462
409
|
except Exception as exc:
|
|
463
410
|
logging.warning("Memory compiler LLM fallback activated for capture %s: %s", capture.id, exc)
|
|
@@ -525,61 +472,51 @@ class MemoryCompilerService:
|
|
|
525
472
|
"change_summary": "Creada sin modelo de lenguaje.",
|
|
526
473
|
}
|
|
527
474
|
|
|
528
|
-
def
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
475
|
+
def _compiler_inputs(self,
|
|
476
|
+
capture: MemoryCapture,
|
|
477
|
+
items: list[MemoryItem],
|
|
478
|
+
candidates: list[dict],
|
|
479
|
+
*,
|
|
480
|
+
author: str,
|
|
481
|
+
captured_on: str,
|
|
482
|
+
wiki_schema: str = "",
|
|
483
|
+
index_entries: list[dict] | None = None) -> dict:
|
|
484
|
+
"""What the memory_compiler agent receives (see its prompt)."""
|
|
485
|
+
return {
|
|
539
486
|
"author": author,
|
|
540
|
-
"
|
|
541
|
-
"
|
|
542
|
-
"
|
|
487
|
+
"captured_on": captured_on,
|
|
488
|
+
"wiki_schema": str(wiki_schema or "")[:7000],
|
|
489
|
+
"page_index": [
|
|
490
|
+
{"page_id": entry.get("id"), "title": entry.get("title"), "summary": entry.get("summary")}
|
|
491
|
+
for entry in (index_entries or [])[:self.MAX_INDEX_ENTRIES_IN_PROMPT]
|
|
492
|
+
],
|
|
493
|
+
"capture": {
|
|
494
|
+
"capture_id": capture.id,
|
|
495
|
+
"author": author,
|
|
496
|
+
"date": captured_on,
|
|
497
|
+
"title": capture.title,
|
|
498
|
+
"items": [
|
|
499
|
+
{
|
|
500
|
+
"id": item.id,
|
|
501
|
+
"item_type": item.item_type.value if hasattr(item.item_type, "value") else str(item.item_type),
|
|
502
|
+
"title": item.title,
|
|
503
|
+
"content_text": item.content_text,
|
|
504
|
+
"source_url": item.source_url,
|
|
505
|
+
"filename": item.filename,
|
|
506
|
+
"mime_type": item.mime_type,
|
|
507
|
+
}
|
|
508
|
+
for item in items
|
|
509
|
+
],
|
|
510
|
+
},
|
|
511
|
+
"candidate_pages": [
|
|
543
512
|
{
|
|
544
|
-
"
|
|
545
|
-
"
|
|
546
|
-
"
|
|
547
|
-
"content_text": item.content_text,
|
|
548
|
-
"source_url": item.source_url,
|
|
549
|
-
"filename": item.filename,
|
|
550
|
-
"mime_type": item.mime_type,
|
|
513
|
+
"page_id": page.get("id"),
|
|
514
|
+
"title": page.get("title"),
|
|
515
|
+
"markdown": self.memory_wiki_service.page_body(page),
|
|
551
516
|
}
|
|
552
|
-
for
|
|
517
|
+
for page in candidates or []
|
|
553
518
|
],
|
|
554
519
|
}
|
|
555
|
-
index_payload = [
|
|
556
|
-
{"page_id": entry.get("id"), "title": entry.get("title"), "summary": entry.get("summary")}
|
|
557
|
-
for entry in (index_entries or [])[:self.MAX_INDEX_ENTRIES_IN_PROMPT]
|
|
558
|
-
]
|
|
559
|
-
candidate_payload = [
|
|
560
|
-
{
|
|
561
|
-
"page_id": page.get("id"),
|
|
562
|
-
"title": page.get("title"),
|
|
563
|
-
"markdown": self.memory_wiki_service.page_body(page),
|
|
564
|
-
}
|
|
565
|
-
for page in candidates or []
|
|
566
|
-
]
|
|
567
|
-
return (
|
|
568
|
-
"You maintain the company's memory wiki: how things are actually done in this company.\n"
|
|
569
|
-
"Follow the wiki schema. Decide whether the new capture updates one candidate page, "
|
|
570
|
-
"creates a new page, or should be skipped (nothing durable to keep).\n"
|
|
571
|
-
"When you update a page, return its COMPLETE new markdown: keep everything already on it, "
|
|
572
|
-
"including other people's attributions, and change only what the capture changes.\n"
|
|
573
|
-
f"Attribute every fact you add as ({author}, {captured_on}).\n"
|
|
574
|
-
"Return JSON only, following the provided schema. `markdown` is the page body without "
|
|
575
|
-
"frontmatter, starting with `# Title`. `change_summary` is one short sentence for the page history.\n\n"
|
|
576
|
-
f"WIKI_SCHEMA:\n{wiki_schema[:7000]}\n\n"
|
|
577
|
-
f"PAGE_INDEX:\n{json.dumps(index_payload, ensure_ascii=False)}\n\n"
|
|
578
|
-
f"NEW_CAPTURE:\n{json.dumps(capture_payload, ensure_ascii=False)}\n\n"
|
|
579
|
-
f"CANDIDATE_PAGES:\n{json.dumps(candidate_payload, ensure_ascii=False)}\n\n"
|
|
580
|
-
"If you update a page, set target_page_id to its page_id. "
|
|
581
|
-
"If you create a page, set target_page_id to null."
|
|
582
|
-
)
|
|
583
520
|
|
|
584
521
|
def _author_label(self, user_identifier: str | None) -> str:
|
|
585
522
|
identifier = str(user_identifier or "").strip()
|