slack-bolt 1.26.0.dev4__tar.gz → 1.28.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.
- {slack_bolt-1.26.0.dev4/slack_bolt.egg-info → slack_bolt-1.28.0}/PKG-INFO +3 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/pyproject.toml +3 -6
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/__init__.py +2 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/__init__.py +1 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/app/app.py +9 -20
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/app/async_app.py +10 -18
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/app/async_server.py +7 -4
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/async_app.py +2 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/assistant_utilities.py +8 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/async_assistant_utilities.py +8 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/async_context.py +11 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/base_context.py +1 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/complete/async_complete.py +11 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/complete/complete.py +11 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/context.py +11 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/fail/async_fail.py +11 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/fail/fail.py +11 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/get_thread_context/async_get_thread_context.py +3 -7
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/get_thread_context/get_thread_context.py +3 -7
- slack_bolt-1.28.0/slack_bolt/context/say_stream/__init__.py +6 -0
- slack_bolt-1.28.0/slack_bolt/context/say_stream/async_say_stream.py +62 -0
- slack_bolt-1.28.0/slack_bolt/context/say_stream/say_stream.py +62 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/kwargs_injection/args.py +5 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/kwargs_injection/async_args.py +5 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/kwargs_injection/async_utils.py +3 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/kwargs_injection/utils.py +3 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/async_listener.py +0 -6
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/async_listener_error_handler.py +4 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/listener_error_handler.py +4 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/async_listener_matcher.py +0 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/__init__.py +2 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/assistant/assistant.py +20 -9
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/assistant/async_assistant.py +26 -13
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/async_builtins.py +2 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/async_middleware_error_handler.py +4 -3
- slack_bolt-1.28.0/slack_bolt/middleware/attaching_conversation_kwargs/__init__.py +5 -0
- slack_bolt-1.28.0/slack_bolt/middleware/attaching_conversation_kwargs/async_attaching_conversation_kwargs.py +56 -0
- slack_bolt-1.28.0/slack_bolt/middleware/attaching_conversation_kwargs/attaching_conversation_kwargs.py +50 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/middleware_error_handler.py +4 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/async_callback_options.py +6 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/callback_options.py +6 -3
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/internals.py +31 -45
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/payload_utils.py +0 -1
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/version.py +1 -1
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0/slack_bolt.egg-info}/PKG-INFO +3 -2
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt.egg-info/SOURCES.txt +6 -0
- slack_bolt-1.28.0/slack_bolt.egg-info/requires.txt +1 -0
- slack_bolt-1.26.0.dev4/slack_bolt.egg-info/requires.txt +0 -1
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/LICENSE +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/MANIFEST.in +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/README.md +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/setup.cfg +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aiohttp/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/aiohttp/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/base_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/builtin/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/http_request.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/http_response.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/asgi/utils.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/chalice_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/chalice_lazy_listener_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/lambda_s3_oauth_flow.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/lazy_listener_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/aws_lambda/local_lambda_client.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/bottle/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/bottle/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/cherrypy/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/cherrypy/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/django/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/django/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/falcon/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/falcon/async_resource.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/falcon/resource.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/fastapi/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/fastapi/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/flask/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/flask/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/google_cloud_functions/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/google_cloud_functions/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/pyramid/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/pyramid/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/sanic/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/sanic/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/aiohttp/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/async_base_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/async_internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/base_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/builtin/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/websocket_client/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/socket_mode/websockets/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/starlette/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/starlette/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/starlette/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/tornado/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/tornado/async_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/tornado/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/wsgi/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/wsgi/handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/wsgi/http_request.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/wsgi/http_response.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/adapter/wsgi/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/app/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/async_authorize.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/async_authorize_args.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/authorize.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/authorize_args.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/authorization/authorize_result.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/ack/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/ack/ack.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/ack/async_ack.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/ack/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/async_store.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/default_async_store.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/default_store.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/file/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/thread_context_store/store.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/complete/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/fail/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/get_thread_context/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/respond/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/respond/async_respond.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/respond/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/respond/respond.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/save_thread_context/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/save_thread_context/async_save_thread_context.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/save_thread_context/save_thread_context.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/say/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/say/async_say.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/say/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/say/say.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_status/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_status/async_set_status.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_status/set_status.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_suggested_prompts/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_suggested_prompts/async_set_suggested_prompts.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_suggested_prompts/set_suggested_prompts.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_title/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_title/async_set_title.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/set_title/set_title.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/error/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/kwargs_injection/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/async_internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/async_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/asyncio_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/lazy_listener/thread_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/async_builtins.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/async_listener_completion_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/async_listener_start_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/asyncio_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/builtins.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/custom_listener.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/listener.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/listener_completion_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/listener_start_handler.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener/thread_runner.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/async_builtins.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/builtins.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/custom_listener_matcher.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/listener_matcher/listener_matcher.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/logger/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/logger/messages.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/assistant/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/async_custom_middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/async_middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/attaching_function_token/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/attaching_function_token/async_attaching_function_token.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/attaching_function_token/attaching_function_token.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/async_authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/async_internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/async_multi_teams_authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/async_single_team_authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/multi_teams_authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/authorization/single_team_authorization.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/custom_middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ignoring_self_events/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ignoring_self_events/async_ignoring_self_events.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ignoring_self_events/ignoring_self_events.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/message_listener_matches/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/message_listener_matches/async_message_listener_matches.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/message_listener_matches/message_listener_matches.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/request_verification/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/request_verification/async_request_verification.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/request_verification/request_verification.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ssl_check/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ssl_check/async_ssl_check.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/ssl_check/ssl_check.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/url_verification/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/url_verification/async_url_verification.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/middleware/url_verification/url_verification.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/async_internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/async_oauth_flow.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/async_oauth_settings.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/oauth_flow.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/oauth/oauth_settings.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/py.typed +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/async_internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/async_request.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/request/request.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/response/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/response/response.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/util/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/util/async_utils.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/util/utils.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/async_step.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/async_step_middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/internals.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/step.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/step_middleware.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/__init__.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/async_complete.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/async_configure.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/async_fail.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/async_update.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/complete.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/configure.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/fail.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/workflows/step/utilities/update.py +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt.egg-info/dependency_links.txt +0 -0
- {slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: slack_bolt
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.28.0
|
|
4
4
|
Summary: The Bolt Framework for Python
|
|
5
5
|
Home-page: https://github.com/slackapi/bolt-python
|
|
6
6
|
Author: Slack Technologies, LLC
|
|
@@ -14,13 +14,14 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
19
|
Classifier: License :: OSI Approved :: MIT License
|
|
19
20
|
Classifier: Operating System :: OS Independent
|
|
20
21
|
Requires-Python: >=3.7
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
23
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: slack_sdk
|
|
24
|
+
Requires-Dist: slack_sdk<4,>=3.38.0
|
|
24
25
|
Dynamic: license-file
|
|
25
26
|
|
|
26
27
|
<h1 align="center">Bolt <img src="https://docs.slack.dev/img/logos/bolt-py-logo.svg" alt="Bolt logo" width="32"/> for Python</h1>
|
|
@@ -15,12 +15,13 @@ classifiers = [
|
|
|
15
15
|
"Programming Language :: Python :: 3.11",
|
|
16
16
|
"Programming Language :: Python :: 3.12",
|
|
17
17
|
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Programming Language :: Python :: 3.14",
|
|
18
19
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
19
20
|
"License :: OSI Approved :: MIT License",
|
|
20
21
|
"Operating System :: OS Independent",
|
|
21
22
|
]
|
|
22
23
|
requires-python = ">=3.7"
|
|
23
|
-
dependencies = ["slack_sdk
|
|
24
|
+
dependencies = ["slack_sdk>=3.38.0,<4"]
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
[project.urls]
|
|
@@ -45,11 +46,7 @@ log_file = "logs/pytest.log"
|
|
|
45
46
|
log_file_level = "DEBUG"
|
|
46
47
|
log_format = "%(asctime)s %(levelname)s %(message)s"
|
|
47
48
|
log_date_format = "%Y-%m-%d %H:%M:%S"
|
|
48
|
-
filterwarnings = [
|
|
49
|
-
"ignore:\"@coroutine\" decorator is deprecated since Python 3.8, use \"async def\" instead:DeprecationWarning",
|
|
50
|
-
"ignore:The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.:DeprecationWarning",
|
|
51
|
-
"ignore:Unknown config option. asyncio_mode:pytest.PytestConfigWarning", # ignore warning when asyncio_mode is set but pytest-asyncio is not installed
|
|
52
|
-
]
|
|
49
|
+
filterwarnings = []
|
|
53
50
|
asyncio_mode = "auto"
|
|
54
51
|
|
|
55
52
|
[tool.mypy]
|
|
@@ -14,6 +14,7 @@ from .context.complete import Complete
|
|
|
14
14
|
from .context.fail import Fail
|
|
15
15
|
from .context.respond import Respond
|
|
16
16
|
from .context.say import Say
|
|
17
|
+
from .context.say_stream import SayStream
|
|
17
18
|
from .kwargs_injection import Args
|
|
18
19
|
from .listener import Listener
|
|
19
20
|
from .listener_matcher import CustomListenerMatcher
|
|
@@ -41,6 +42,7 @@ __all__ = [
|
|
|
41
42
|
"Fail",
|
|
42
43
|
"Respond",
|
|
43
44
|
"Say",
|
|
45
|
+
"SayStream",
|
|
44
46
|
"Args",
|
|
45
47
|
"Listener",
|
|
46
48
|
"CustomListenerMatcher",
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"""Adapter modules for running Bolt apps along with Web frameworks or Socket Mode.
|
|
2
|
-
"""
|
|
1
|
+
"""Adapter modules for running Bolt apps along with Web frameworks or Socket Mode."""
|
|
@@ -22,7 +22,6 @@ from slack_bolt.authorization.authorize import (
|
|
|
22
22
|
|
|
23
23
|
from slack_bolt.context.assistant.thread_context_store.store import AssistantThreadContextStore
|
|
24
24
|
|
|
25
|
-
from slack_bolt.context.assistant.assistant_utilities import AssistantUtilities
|
|
26
25
|
from slack_bolt.error import BoltError, BoltUnhandledRequestError
|
|
27
26
|
from slack_bolt.lazy_listener.thread_runner import ThreadLazyListenerRunner
|
|
28
27
|
from slack_bolt.listener.builtins import TokenRevocationListeners
|
|
@@ -70,6 +69,7 @@ from slack_bolt.middleware import (
|
|
|
70
69
|
IgnoringSelfEvents,
|
|
71
70
|
CustomMiddleware,
|
|
72
71
|
AttachingFunctionToken,
|
|
72
|
+
AttachingConversationKwargs,
|
|
73
73
|
)
|
|
74
74
|
from slack_bolt.middleware.assistant import Assistant
|
|
75
75
|
from slack_bolt.middleware.message_listener_matches import MessageListenerMatches
|
|
@@ -83,10 +83,6 @@ from slack_bolt.oauth import OAuthFlow
|
|
|
83
83
|
from slack_bolt.oauth.internals import select_consistent_installation_store
|
|
84
84
|
from slack_bolt.oauth.oauth_settings import OAuthSettings
|
|
85
85
|
from slack_bolt.request import BoltRequest
|
|
86
|
-
from slack_bolt.request.payload_utils import (
|
|
87
|
-
is_assistant_event,
|
|
88
|
-
to_event,
|
|
89
|
-
)
|
|
90
86
|
from slack_bolt.response import BoltResponse
|
|
91
87
|
from slack_bolt.util.utils import (
|
|
92
88
|
create_web_client,
|
|
@@ -137,6 +133,7 @@ class App:
|
|
|
137
133
|
listener_executor: Optional[Executor] = None,
|
|
138
134
|
# for AI Agents & Assistants
|
|
139
135
|
assistant_thread_context_store: Optional[AssistantThreadContextStore] = None,
|
|
136
|
+
attaching_conversation_kwargs_enabled: bool = True,
|
|
140
137
|
):
|
|
141
138
|
"""Bolt App that provides functionalities to register middleware/listeners.
|
|
142
139
|
|
|
@@ -357,6 +354,7 @@ class App:
|
|
|
357
354
|
listener_executor = ThreadPoolExecutor(max_workers=5)
|
|
358
355
|
|
|
359
356
|
self._assistant_thread_context_store = assistant_thread_context_store
|
|
357
|
+
self._attaching_conversation_kwargs_enabled = attaching_conversation_kwargs_enabled
|
|
360
358
|
|
|
361
359
|
self._process_before_response = process_before_response
|
|
362
360
|
self._listener_runner = ThreadListenerRunner(
|
|
@@ -841,10 +839,13 @@ class App:
|
|
|
841
839
|
middleware: A list of lister middleware functions.
|
|
842
840
|
Only when all the middleware call `next()` method, the listener function can be invoked.
|
|
843
841
|
"""
|
|
842
|
+
middleware = list(middleware) if middleware else []
|
|
844
843
|
|
|
845
844
|
def __call__(*args, **kwargs):
|
|
846
845
|
functions = self._to_listener_functions(kwargs) if kwargs else list(args)
|
|
847
846
|
primary_matcher = builtin_matchers.event(event, base_logger=self._base_logger)
|
|
847
|
+
if self._attaching_conversation_kwargs_enabled:
|
|
848
|
+
middleware.insert(0, AttachingConversationKwargs(self._assistant_thread_context_store))
|
|
848
849
|
return self._register_listener(list(functions), primary_matcher, matchers, middleware, True)
|
|
849
850
|
|
|
850
851
|
return __call__
|
|
@@ -902,6 +903,8 @@ class App:
|
|
|
902
903
|
primary_matcher = builtin_matchers.message_event(
|
|
903
904
|
keyword=keyword, constraints=constraints, base_logger=self._base_logger
|
|
904
905
|
)
|
|
906
|
+
if self._attaching_conversation_kwargs_enabled:
|
|
907
|
+
middleware.insert(0, AttachingConversationKwargs(self._assistant_thread_context_store))
|
|
905
908
|
middleware.insert(0, MessageListenerMatches(keyword))
|
|
906
909
|
return self._register_listener(list(functions), primary_matcher, matchers, middleware, True)
|
|
907
910
|
|
|
@@ -1398,20 +1401,6 @@ class App:
|
|
|
1398
1401
|
# It is intended for apps that start lazy listeners from their custom global middleware.
|
|
1399
1402
|
req.context["listener_runner"] = self.listener_runner
|
|
1400
1403
|
|
|
1401
|
-
# For AI Agents & Assistants
|
|
1402
|
-
if is_assistant_event(req.body):
|
|
1403
|
-
assistant = AssistantUtilities(
|
|
1404
|
-
payload=to_event(req.body), # type:ignore[arg-type]
|
|
1405
|
-
context=req.context,
|
|
1406
|
-
thread_context_store=self._assistant_thread_context_store,
|
|
1407
|
-
)
|
|
1408
|
-
req.context["say"] = assistant.say
|
|
1409
|
-
req.context["set_status"] = assistant.set_status
|
|
1410
|
-
req.context["set_title"] = assistant.set_title
|
|
1411
|
-
req.context["set_suggested_prompts"] = assistant.set_suggested_prompts
|
|
1412
|
-
req.context["get_thread_context"] = assistant.get_thread_context
|
|
1413
|
-
req.context["save_thread_context"] = assistant.save_thread_context
|
|
1414
|
-
|
|
1415
1404
|
@staticmethod
|
|
1416
1405
|
def _to_listener_functions(
|
|
1417
1406
|
kwargs: dict,
|
|
@@ -1457,7 +1446,7 @@ class App:
|
|
|
1457
1446
|
CustomListener(
|
|
1458
1447
|
app_name=self.name,
|
|
1459
1448
|
ack_function=functions.pop(0),
|
|
1460
|
-
lazy_functions=functions, # type:ignore[arg-type]
|
|
1449
|
+
lazy_functions=functions, # type: ignore[arg-type]
|
|
1461
1450
|
matchers=listener_matchers,
|
|
1462
1451
|
middleware=listener_middleware,
|
|
1463
1452
|
auto_acknowledgement=auto_acknowledgement,
|
|
@@ -8,7 +8,6 @@ import warnings
|
|
|
8
8
|
from aiohttp import web
|
|
9
9
|
|
|
10
10
|
from slack_bolt.app.async_server import AsyncSlackAppServer
|
|
11
|
-
from slack_bolt.context.assistant.async_assistant_utilities import AsyncAssistantUtilities
|
|
12
11
|
from slack_bolt.context.assistant.thread_context_store.async_store import (
|
|
13
12
|
AsyncAssistantThreadContextStore,
|
|
14
13
|
)
|
|
@@ -30,7 +29,6 @@ from slack_bolt.middleware.message_listener_matches.async_message_listener_match
|
|
|
30
29
|
AsyncMessageListenerMatches,
|
|
31
30
|
)
|
|
32
31
|
from slack_bolt.oauth.async_internals import select_consistent_installation_store
|
|
33
|
-
from slack_bolt.request.payload_utils import is_assistant_event, to_event
|
|
34
32
|
from slack_bolt.util.utils import get_name_for_callable, is_callable_coroutine
|
|
35
33
|
from slack_bolt.workflows.step.async_step import (
|
|
36
34
|
AsyncWorkflowStep,
|
|
@@ -88,6 +86,7 @@ from slack_bolt.middleware.async_builtins import (
|
|
|
88
86
|
AsyncIgnoringSelfEvents,
|
|
89
87
|
AsyncUrlVerification,
|
|
90
88
|
AsyncAttachingFunctionToken,
|
|
89
|
+
AsyncAttachingConversationKwargs,
|
|
91
90
|
)
|
|
92
91
|
from slack_bolt.middleware.async_custom_middleware import (
|
|
93
92
|
AsyncMiddleware,
|
|
@@ -143,6 +142,7 @@ class AsyncApp:
|
|
|
143
142
|
verification_token: Optional[str] = None,
|
|
144
143
|
# for AI Agents & Assistants
|
|
145
144
|
assistant_thread_context_store: Optional[AsyncAssistantThreadContextStore] = None,
|
|
145
|
+
attaching_conversation_kwargs_enabled: bool = True,
|
|
146
146
|
):
|
|
147
147
|
"""Bolt App that provides functionalities to register middleware/listeners.
|
|
148
148
|
|
|
@@ -363,6 +363,7 @@ class AsyncApp:
|
|
|
363
363
|
self._async_listeners: List[AsyncListener] = []
|
|
364
364
|
|
|
365
365
|
self._assistant_thread_context_store = assistant_thread_context_store
|
|
366
|
+
self._attaching_conversation_kwargs_enabled = attaching_conversation_kwargs_enabled
|
|
366
367
|
|
|
367
368
|
self._process_before_response = process_before_response
|
|
368
369
|
self._async_listener_runner = AsyncioListenerRunner(
|
|
@@ -616,7 +617,7 @@ class AsyncApp:
|
|
|
616
617
|
self._framework_logger.debug(debug_checking_listener(listener_name))
|
|
617
618
|
if await listener.async_matches(req=req, resp=resp): # type: ignore[arg-type]
|
|
618
619
|
# run all the middleware attached to this listener first
|
|
619
|
-
|
|
620
|
+
middleware_resp, next_was_not_called = await listener.run_async_middleware(
|
|
620
621
|
req=req, resp=resp # type: ignore[arg-type]
|
|
621
622
|
)
|
|
622
623
|
if next_was_not_called:
|
|
@@ -866,10 +867,13 @@ class AsyncApp:
|
|
|
866
867
|
middleware: A list of lister middleware functions.
|
|
867
868
|
Only when all the middleware call `next()` method, the listener function can be invoked.
|
|
868
869
|
"""
|
|
870
|
+
middleware = list(middleware) if middleware else []
|
|
869
871
|
|
|
870
872
|
def __call__(*args, **kwargs):
|
|
871
873
|
functions = self._to_listener_functions(kwargs) if kwargs else list(args)
|
|
872
874
|
primary_matcher = builtin_matchers.event(event, True, base_logger=self._base_logger)
|
|
875
|
+
if self._attaching_conversation_kwargs_enabled:
|
|
876
|
+
middleware.insert(0, AsyncAttachingConversationKwargs(self._assistant_thread_context_store))
|
|
873
877
|
return self._register_listener(list(functions), primary_matcher, matchers, middleware, True)
|
|
874
878
|
|
|
875
879
|
return __call__
|
|
@@ -930,6 +934,8 @@ class AsyncApp:
|
|
|
930
934
|
asyncio=True,
|
|
931
935
|
base_logger=self._base_logger,
|
|
932
936
|
)
|
|
937
|
+
if self._attaching_conversation_kwargs_enabled:
|
|
938
|
+
middleware.insert(0, AsyncAttachingConversationKwargs(self._assistant_thread_context_store))
|
|
933
939
|
middleware.insert(0, AsyncMessageListenerMatches(keyword))
|
|
934
940
|
return self._register_listener(list(functions), primary_matcher, matchers, middleware, True)
|
|
935
941
|
|
|
@@ -1431,20 +1437,6 @@ class AsyncApp:
|
|
|
1431
1437
|
# It is intended for apps that start lazy listeners from their custom global middleware.
|
|
1432
1438
|
req.context["listener_runner"] = self.listener_runner
|
|
1433
1439
|
|
|
1434
|
-
# For AI Agents & Assistants
|
|
1435
|
-
if is_assistant_event(req.body):
|
|
1436
|
-
assistant = AsyncAssistantUtilities(
|
|
1437
|
-
payload=to_event(req.body), # type:ignore[arg-type]
|
|
1438
|
-
context=req.context,
|
|
1439
|
-
thread_context_store=self._assistant_thread_context_store,
|
|
1440
|
-
)
|
|
1441
|
-
req.context["say"] = assistant.say
|
|
1442
|
-
req.context["set_status"] = assistant.set_status
|
|
1443
|
-
req.context["set_title"] = assistant.set_title
|
|
1444
|
-
req.context["set_suggested_prompts"] = assistant.set_suggested_prompts
|
|
1445
|
-
req.context["get_thread_context"] = assistant.get_thread_context
|
|
1446
|
-
req.context["save_thread_context"] = assistant.save_thread_context
|
|
1447
|
-
|
|
1448
1440
|
@staticmethod
|
|
1449
1441
|
def _to_listener_functions(
|
|
1450
1442
|
kwargs: dict,
|
|
@@ -1495,7 +1487,7 @@ class AsyncApp:
|
|
|
1495
1487
|
AsyncCustomListener(
|
|
1496
1488
|
app_name=self.name,
|
|
1497
1489
|
ack_function=functions.pop(0),
|
|
1498
|
-
lazy_functions=functions, # type:ignore[arg-type]
|
|
1490
|
+
lazy_functions=functions, # type: ignore[arg-type]
|
|
1499
1491
|
matchers=listener_matchers,
|
|
1500
1492
|
middleware=listener_middleware,
|
|
1501
1493
|
auto_acknowledgement=auto_acknowledgement,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Optional, TYPE_CHECKING
|
|
3
3
|
|
|
4
4
|
from aiohttp import web
|
|
5
5
|
|
|
@@ -7,19 +7,22 @@ from slack_bolt.adapter.aiohttp import to_bolt_request, to_aiohttp_response
|
|
|
7
7
|
from slack_bolt.response import BoltResponse
|
|
8
8
|
from slack_bolt.util.utils import get_boot_message
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from slack_bolt.app.async_app import AsyncApp
|
|
12
|
+
|
|
10
13
|
|
|
11
14
|
class AsyncSlackAppServer:
|
|
12
15
|
port: int
|
|
13
16
|
path: str
|
|
14
17
|
host: str
|
|
15
|
-
bolt_app: "AsyncApp"
|
|
18
|
+
bolt_app: "AsyncApp"
|
|
16
19
|
web_app: web.Application
|
|
17
20
|
|
|
18
21
|
def __init__(
|
|
19
22
|
self,
|
|
20
23
|
port: int,
|
|
21
24
|
path: str,
|
|
22
|
-
app: "AsyncApp",
|
|
25
|
+
app: "AsyncApp",
|
|
23
26
|
host: Optional[str] = None,
|
|
24
27
|
):
|
|
25
28
|
"""Standalone AIOHTTP Web Server.
|
|
@@ -34,7 +37,7 @@ class AsyncSlackAppServer:
|
|
|
34
37
|
self.port = port
|
|
35
38
|
self.path = path
|
|
36
39
|
self.host = host if host is not None else "0.0.0.0"
|
|
37
|
-
self.bolt_app: "AsyncApp" = app
|
|
40
|
+
self.bolt_app: "AsyncApp" = app
|
|
38
41
|
self.web_app = web.Application()
|
|
39
42
|
self._bolt_oauth_flow = self.bolt_app.oauth_flow
|
|
40
43
|
if self._bolt_oauth_flow:
|
|
@@ -59,6 +59,7 @@ from .context.set_title.async_set_title import AsyncSetTitle
|
|
|
59
59
|
from .context.set_suggested_prompts.async_set_suggested_prompts import AsyncSetSuggestedPrompts
|
|
60
60
|
from .context.get_thread_context.async_get_thread_context import AsyncGetThreadContext
|
|
61
61
|
from .context.save_thread_context.async_save_thread_context import AsyncSaveThreadContext
|
|
62
|
+
from .context.say_stream.async_say_stream import AsyncSayStream
|
|
62
63
|
|
|
63
64
|
__all__ = [
|
|
64
65
|
"AsyncApp",
|
|
@@ -66,6 +67,7 @@ __all__ = [
|
|
|
66
67
|
"AsyncBoltContext",
|
|
67
68
|
"AsyncRespond",
|
|
68
69
|
"AsyncSay",
|
|
70
|
+
"AsyncSayStream",
|
|
69
71
|
"AsyncListener",
|
|
70
72
|
"AsyncCustomListenerMatcher",
|
|
71
73
|
"AsyncBoltRequest",
|
{slack_bolt-1.26.0.dev4 → slack_bolt-1.28.0}/slack_bolt/context/assistant/assistant_utilities.py
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from slack_sdk.web import WebClient
|
|
@@ -51,6 +52,13 @@ class AssistantUtilities:
|
|
|
51
52
|
|
|
52
53
|
@property
|
|
53
54
|
def set_status(self) -> SetStatus:
|
|
55
|
+
warnings.warn(
|
|
56
|
+
"AssistantUtilities.set_status is deprecated. "
|
|
57
|
+
"Use the set_status argument directly in your listener function "
|
|
58
|
+
"or access it via context.set_status instead.",
|
|
59
|
+
DeprecationWarning,
|
|
60
|
+
stacklevel=2,
|
|
61
|
+
)
|
|
54
62
|
return SetStatus(self.client, self.channel_id, self.thread_ts)
|
|
55
63
|
|
|
56
64
|
@property
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from slack_sdk.web.async_client import AsyncWebClient
|
|
@@ -54,6 +55,13 @@ class AsyncAssistantUtilities:
|
|
|
54
55
|
|
|
55
56
|
@property
|
|
56
57
|
def set_status(self) -> AsyncSetStatus:
|
|
58
|
+
warnings.warn(
|
|
59
|
+
"AsyncAssistantUtilities.set_status is deprecated. "
|
|
60
|
+
"Use the set_status argument directly in your listener function "
|
|
61
|
+
"or access it via context.set_status instead.",
|
|
62
|
+
DeprecationWarning,
|
|
63
|
+
stacklevel=2,
|
|
64
|
+
)
|
|
57
65
|
return AsyncSetStatus(self.client, self.channel_id, self.thread_ts)
|
|
58
66
|
|
|
59
67
|
@property
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, TYPE_CHECKING
|
|
2
2
|
|
|
3
3
|
from slack_sdk.web.async_client import AsyncWebClient
|
|
4
4
|
|
|
@@ -10,11 +10,15 @@ from slack_bolt.context.respond.async_respond import AsyncRespond
|
|
|
10
10
|
from slack_bolt.context.get_thread_context.async_get_thread_context import AsyncGetThreadContext
|
|
11
11
|
from slack_bolt.context.save_thread_context.async_save_thread_context import AsyncSaveThreadContext
|
|
12
12
|
from slack_bolt.context.say.async_say import AsyncSay
|
|
13
|
+
from slack_bolt.context.say_stream.async_say_stream import AsyncSayStream
|
|
13
14
|
from slack_bolt.context.set_status.async_set_status import AsyncSetStatus
|
|
14
15
|
from slack_bolt.context.set_suggested_prompts.async_set_suggested_prompts import AsyncSetSuggestedPrompts
|
|
15
16
|
from slack_bolt.context.set_title.async_set_title import AsyncSetTitle
|
|
16
17
|
from slack_bolt.util.utils import create_copy
|
|
17
18
|
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from slack_bolt.listener.asyncio_runner import AsyncioListenerRunner
|
|
21
|
+
|
|
18
22
|
|
|
19
23
|
class AsyncBoltContext(BaseContext):
|
|
20
24
|
"""Context object associated with a request from Slack."""
|
|
@@ -41,7 +45,7 @@ class AsyncBoltContext(BaseContext):
|
|
|
41
45
|
|
|
42
46
|
# The return type is intentionally string to avoid circular imports
|
|
43
47
|
@property
|
|
44
|
-
def listener_runner(self) -> "AsyncioListenerRunner":
|
|
48
|
+
def listener_runner(self) -> "AsyncioListenerRunner":
|
|
45
49
|
"""The properly configured listener_runner that is available for middleware/listeners."""
|
|
46
50
|
return self["listener_runner"]
|
|
47
51
|
|
|
@@ -110,7 +114,7 @@ class AsyncBoltContext(BaseContext):
|
|
|
110
114
|
Callable `say()` function
|
|
111
115
|
"""
|
|
112
116
|
if "say" not in self:
|
|
113
|
-
self["say"] = AsyncSay(client=self.client, channel=self.channel_id
|
|
117
|
+
self["say"] = AsyncSay(client=self.client, channel=self.channel_id)
|
|
114
118
|
return self["say"]
|
|
115
119
|
|
|
116
120
|
@property
|
|
@@ -203,6 +207,10 @@ class AsyncBoltContext(BaseContext):
|
|
|
203
207
|
def get_thread_context(self) -> Optional[AsyncGetThreadContext]:
|
|
204
208
|
return self.get("get_thread_context")
|
|
205
209
|
|
|
210
|
+
@property
|
|
211
|
+
def say_stream(self) -> Optional[AsyncSayStream]:
|
|
212
|
+
return self.get("say_stream")
|
|
213
|
+
|
|
206
214
|
@property
|
|
207
215
|
def save_thread_context(self) -> Optional[AsyncSaveThreadContext]:
|
|
208
216
|
return self.get("save_thread_context")
|
|
@@ -38,6 +38,7 @@ class BaseContext(dict):
|
|
|
38
38
|
"set_status",
|
|
39
39
|
"set_title",
|
|
40
40
|
"set_suggested_prompts",
|
|
41
|
+
"say_stream",
|
|
41
42
|
]
|
|
42
43
|
# Note that these items are not copyable, so when you add new items to this list,
|
|
43
44
|
# you must modify ThreadListenerRunner/AsyncioListenerRunner's _build_lazy_request method to pass the values.
|
|
@@ -7,6 +7,7 @@ from slack_sdk.web.async_slack_response import AsyncSlackResponse
|
|
|
7
7
|
class AsyncComplete:
|
|
8
8
|
client: AsyncWebClient
|
|
9
9
|
function_execution_id: Optional[str]
|
|
10
|
+
_called: bool
|
|
10
11
|
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
@@ -15,6 +16,7 @@ class AsyncComplete:
|
|
|
15
16
|
):
|
|
16
17
|
self.client = client
|
|
17
18
|
self.function_execution_id = function_execution_id
|
|
19
|
+
self._called = False
|
|
18
20
|
|
|
19
21
|
async def __call__(self, outputs: Optional[Dict[str, Any]] = None) -> AsyncSlackResponse:
|
|
20
22
|
"""Signal the successful completion of the custom function.
|
|
@@ -31,6 +33,15 @@ class AsyncComplete:
|
|
|
31
33
|
if self.function_execution_id is None:
|
|
32
34
|
raise ValueError("complete is unsupported here as there is no function_execution_id")
|
|
33
35
|
|
|
36
|
+
self._called = True
|
|
34
37
|
return await self.client.functions_completeSuccess(
|
|
35
38
|
function_execution_id=self.function_execution_id, outputs=outputs or {}
|
|
36
39
|
)
|
|
40
|
+
|
|
41
|
+
def has_been_called(self) -> bool:
|
|
42
|
+
"""Check if this complete function has been called.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
bool: True if the complete function has been called, False otherwise.
|
|
46
|
+
"""
|
|
47
|
+
return self._called
|
|
@@ -7,6 +7,7 @@ from slack_sdk.web import SlackResponse
|
|
|
7
7
|
class Complete:
|
|
8
8
|
client: WebClient
|
|
9
9
|
function_execution_id: Optional[str]
|
|
10
|
+
_called: bool
|
|
10
11
|
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
@@ -15,6 +16,7 @@ class Complete:
|
|
|
15
16
|
):
|
|
16
17
|
self.client = client
|
|
17
18
|
self.function_execution_id = function_execution_id
|
|
19
|
+
self._called = False
|
|
18
20
|
|
|
19
21
|
def __call__(self, outputs: Optional[Dict[str, Any]] = None) -> SlackResponse:
|
|
20
22
|
"""Signal the successful completion of the custom function.
|
|
@@ -31,4 +33,13 @@ class Complete:
|
|
|
31
33
|
if self.function_execution_id is None:
|
|
32
34
|
raise ValueError("complete is unsupported here as there is no function_execution_id")
|
|
33
35
|
|
|
36
|
+
self._called = True
|
|
34
37
|
return self.client.functions_completeSuccess(function_execution_id=self.function_execution_id, outputs=outputs or {})
|
|
38
|
+
|
|
39
|
+
def has_been_called(self) -> bool:
|
|
40
|
+
"""Check if this complete function has been called.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
bool: True if the complete function has been called, False otherwise.
|
|
44
|
+
"""
|
|
45
|
+
return self._called
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, TYPE_CHECKING
|
|
2
2
|
|
|
3
3
|
from slack_sdk import WebClient
|
|
4
4
|
|
|
@@ -10,11 +10,15 @@ from slack_bolt.context.get_thread_context.get_thread_context import GetThreadCo
|
|
|
10
10
|
from slack_bolt.context.respond import Respond
|
|
11
11
|
from slack_bolt.context.save_thread_context import SaveThreadContext
|
|
12
12
|
from slack_bolt.context.say import Say
|
|
13
|
+
from slack_bolt.context.say_stream import SayStream
|
|
13
14
|
from slack_bolt.context.set_status import SetStatus
|
|
14
15
|
from slack_bolt.context.set_suggested_prompts import SetSuggestedPrompts
|
|
15
16
|
from slack_bolt.context.set_title import SetTitle
|
|
16
17
|
from slack_bolt.util.utils import create_copy
|
|
17
18
|
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from slack_bolt.listener.thread_runner import ThreadListenerRunner
|
|
21
|
+
|
|
18
22
|
|
|
19
23
|
class BoltContext(BaseContext):
|
|
20
24
|
"""Context object associated with a request from Slack."""
|
|
@@ -42,7 +46,7 @@ class BoltContext(BaseContext):
|
|
|
42
46
|
|
|
43
47
|
# The return type is intentionally string to avoid circular imports
|
|
44
48
|
@property
|
|
45
|
-
def listener_runner(self) -> "ThreadListenerRunner":
|
|
49
|
+
def listener_runner(self) -> "ThreadListenerRunner":
|
|
46
50
|
"""The properly configured listener_runner that is available for middleware/listeners."""
|
|
47
51
|
return self["listener_runner"]
|
|
48
52
|
|
|
@@ -111,7 +115,7 @@ class BoltContext(BaseContext):
|
|
|
111
115
|
Callable `say()` function
|
|
112
116
|
"""
|
|
113
117
|
if "say" not in self:
|
|
114
|
-
self["say"] = Say(client=self.client, channel=self.channel_id
|
|
118
|
+
self["say"] = Say(client=self.client, channel=self.channel_id)
|
|
115
119
|
return self["say"]
|
|
116
120
|
|
|
117
121
|
@property
|
|
@@ -204,6 +208,10 @@ class BoltContext(BaseContext):
|
|
|
204
208
|
def get_thread_context(self) -> Optional[GetThreadContext]:
|
|
205
209
|
return self.get("get_thread_context")
|
|
206
210
|
|
|
211
|
+
@property
|
|
212
|
+
def say_stream(self) -> Optional[SayStream]:
|
|
213
|
+
return self.get("say_stream")
|
|
214
|
+
|
|
207
215
|
@property
|
|
208
216
|
def save_thread_context(self) -> Optional[SaveThreadContext]:
|
|
209
217
|
return self.get("save_thread_context")
|
|
@@ -7,6 +7,7 @@ from slack_sdk.web.async_slack_response import AsyncSlackResponse
|
|
|
7
7
|
class AsyncFail:
|
|
8
8
|
client: AsyncWebClient
|
|
9
9
|
function_execution_id: Optional[str]
|
|
10
|
+
_called: bool
|
|
10
11
|
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
@@ -15,6 +16,7 @@ class AsyncFail:
|
|
|
15
16
|
):
|
|
16
17
|
self.client = client
|
|
17
18
|
self.function_execution_id = function_execution_id
|
|
19
|
+
self._called = False
|
|
18
20
|
|
|
19
21
|
async def __call__(self, error: str) -> AsyncSlackResponse:
|
|
20
22
|
"""Signal that the custom function failed to complete.
|
|
@@ -31,4 +33,13 @@ class AsyncFail:
|
|
|
31
33
|
if self.function_execution_id is None:
|
|
32
34
|
raise ValueError("fail is unsupported here as there is no function_execution_id")
|
|
33
35
|
|
|
36
|
+
self._called = True
|
|
34
37
|
return await self.client.functions_completeError(function_execution_id=self.function_execution_id, error=error)
|
|
38
|
+
|
|
39
|
+
def has_been_called(self) -> bool:
|
|
40
|
+
"""Check if this fail function has been called.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
bool: True if the fail function has been called, False otherwise.
|
|
44
|
+
"""
|
|
45
|
+
return self._called
|
|
@@ -7,6 +7,7 @@ from slack_sdk.web import SlackResponse
|
|
|
7
7
|
class Fail:
|
|
8
8
|
client: WebClient
|
|
9
9
|
function_execution_id: Optional[str]
|
|
10
|
+
_called: bool
|
|
10
11
|
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
@@ -15,6 +16,7 @@ class Fail:
|
|
|
15
16
|
):
|
|
16
17
|
self.client = client
|
|
17
18
|
self.function_execution_id = function_execution_id
|
|
19
|
+
self._called = False
|
|
18
20
|
|
|
19
21
|
def __call__(self, error: str) -> SlackResponse:
|
|
20
22
|
"""Signal that the custom function failed to complete.
|
|
@@ -31,4 +33,13 @@ class Fail:
|
|
|
31
33
|
if self.function_execution_id is None:
|
|
32
34
|
raise ValueError("fail is unsupported here as there is no function_execution_id")
|
|
33
35
|
|
|
36
|
+
self._called = True
|
|
34
37
|
return self.client.functions_completeError(function_execution_id=self.function_execution_id, error=error)
|
|
38
|
+
|
|
39
|
+
def has_been_called(self) -> bool:
|
|
40
|
+
"""Check if this fail function has been called.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
bool: True if the fail function has been called, False otherwise.
|
|
44
|
+
"""
|
|
45
|
+
return self._called
|
|
@@ -31,14 +31,10 @@ class AsyncGetThreadContext:
|
|
|
31
31
|
if self.thread_context_loaded is True:
|
|
32
32
|
return self._thread_context
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
thread = self.payload.get("assistant_thread")
|
|
35
|
+
if isinstance(thread, dict) and thread.get("context", {}).get("channel_id") is not None:
|
|
35
36
|
# assistant_thread_started
|
|
36
|
-
|
|
37
|
-
self._thread_context = (
|
|
38
|
-
AssistantThreadContext(thread["context"])
|
|
39
|
-
if thread.get("context", {}).get("channel_id") is not None
|
|
40
|
-
else None
|
|
41
|
-
)
|
|
37
|
+
self._thread_context = AssistantThreadContext(thread["context"])
|
|
42
38
|
# for this event, the context will never be changed
|
|
43
39
|
self.thread_context_loaded = True
|
|
44
40
|
elif self.payload.get("channel") is not None and self.payload.get("thread_ts") is not None:
|
|
@@ -31,14 +31,10 @@ class GetThreadContext:
|
|
|
31
31
|
if self.thread_context_loaded is True:
|
|
32
32
|
return self._thread_context
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
thread = self.payload.get("assistant_thread")
|
|
35
|
+
if isinstance(thread, dict) and thread.get("context", {}).get("channel_id") is not None:
|
|
35
36
|
# assistant_thread_started
|
|
36
|
-
|
|
37
|
-
self._thread_context = (
|
|
38
|
-
AssistantThreadContext(thread["context"])
|
|
39
|
-
if thread.get("context", {}).get("channel_id") is not None
|
|
40
|
-
else None
|
|
41
|
-
)
|
|
37
|
+
self._thread_context = AssistantThreadContext(thread["context"])
|
|
42
38
|
# for this event, the context will never be changed
|
|
43
39
|
self.thread_context_loaded = True
|
|
44
40
|
elif self.payload.get("channel") is not None and self.payload.get("thread_ts") is not None:
|