feat: update app manifest to use agent_view#129
Conversation
Flips all three Casey implementations from assistant_view to agent_view in preparation for the new Agent DM Messages Tab experience: - Rename features.assistant_view -> features.agent_view in every manifest, and the inner assistant_description -> agent_description. - Remove assistant_thread_started from event subscriptions. - Merge set_suggested_prompts into app_home_opened, gated on event["tab"] so the Home tab keeps publishing its Block Kit view (category buttons + MCP status) and the Messages tab pins the suggested prompts. - Delete the now-unused assistant_thread_started.py handlers and refresh tests to cover both tab branches. The handler now calls client.assistant_threads_setSuggestedPrompts directly (the set_suggested_prompts middleware helper is only injected for assistant_thread_started). TODO(agent-dm-messages-tab) markers note where app_context_changed wiring will land once Bolt exposes the event type.
| await client.assistant_threads_setSuggestedPrompts( | ||
| channel_id=event["channel"], | ||
| title="How can I help you today?", | ||
| prompts=SUGGESTED_PROMPTS, | ||
| ) |
There was a problem hiding this comment.
note: Currently, this throws an error because thread_ts is required by the underlining SDK. A patch release for the SDK will loosen this constraint. See slackapi/python-slack-sdk#1901
zimeg
left a comment
There was a problem hiding this comment.
Approving — clean implementation of the agent DM migration ($'assistant_view'$' → '$'agent_view'$', $'app_home_opened'$' + '$'event.tab'$' branch, suggested prompts without '$'thread_ts'$', '$'app_context_changed'$' TODO noted). Consistent across all SDK variants and CI is green. 🚀
|
Approving — clean implementation of the agent DM migration ( (Disregard the shell artifacts in my approval review above — this is the intended note.) |
|
Thanks for the super thorough review and testing @zimeg! 🙇🏻 |
Summary
This pull request flips all three Casey implementations from
assistant_viewtoagent_viewto opt into the new Agent DM Messages Tab experience.features.assistant_view→features.agent_viewin every manifest, and the innerassistant_description→agent_description.assistant_thread_startedfromsettings.event_subscriptions.bot_events.set_suggested_promptslogic into theapp_home_openedhandler, gated onevent["tab"]: the Home tab keeps publishing its Block Kit view (category buttons + MCP status), the Messages tab pins the suggested prompts.assistant_thread_started.pyhandler files.tests/test_app_home_opened.pyto cover bothevent["tab"]branches.TODO(agent-dm-messages-tab)markers placed whereapp_context_changedwiring will land once Bolt for Python exposes the event type. That work is deferred to a follow-up PR.Implementation note: Bolt's
set_suggested_promptsmiddleware helper is only injected forassistant_thread_started, so the handler now callsclient.assistant_threads_setSuggestedPromptson theWebClient/AsyncWebClientdirectly.Files touched per implementation:
claude-agent-sdk/(async)manifest.json—agent_viewrename, dropassistant_thread_startedsubscriptionlisteners/events/app_home_opened.py— branch onevent["tab"]listeners/events/__init__.py— drop assistant-thread registrationlisteners/events/assistant_thread_started.py— deletedtests/test_app_home_opened.py— cover both branchesopenai-agents-sdk/(sync) — same change setpydantic-ai/(sync) — same change setTesting
Setup:
ANTHROPIC_API_KEY/OPENAI_API_KEYnpm installpip install -r requirements.txtlack runFunctional checks - Messages tab:
Functional checks - Home tab:
Cross-cutting checks: