feat: add Slack assistant.search.context workspace search tool (TKAI-72)#54
Open
yourbuddyconner wants to merge 2 commits into
Open
Conversation
Phase 1: Bot Token + Public Search - Add search:read.public, search:read.files, search:read.users bot scopes to Slack app manifest - Extract action_token from Slack event payloads and propagate through the dispatch chain: slack-events → dispatchOrchestratorPrompt → DO /prompt → session-agent → executeAction → credentials - Implement slack.search_context action with full parameter support: query, content_types, channel_types, limit, cursor, sort, sort_dir, before/after timestamps, include_context_messages - Entity resolution for search results (user display names, channel names, mention replacement) using existing cache system - Clear error message when action_token is unavailable, directing users to fall back to slack.read_history with filter - Update slack-tools skill doc with workspace search usage guidance
…ectations - Add waiting_runner, recovering, backoff to session-metadata-sidebar switch statements so lifecycleStatusRaw is never undefined (fixes TS2322) - Add waiting_runner, recovering, backoff to session-table STATUS_VARIANTS record (fixes TS2739) - Update prompt-queue getChannelTargetById test expectations to include threadId: null field added by the search context feature - Regenerate content-registry with workspace search documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
slack.search_contextaction for workspace-wide semantic + keyword search via Slack'sassistant.search.contextAPI (Phase 1: Bot Token + Public Search).Changes
Slack App Manifest (
packages/plugin-slack/slack-app-manifest.json)search:read.public,search:read.files,search:read.usersaction_token Propagation (4 files across worker + DO)
action_tokenfrom Slack event payloads (slack-events.ts)dispatchOrchestratorPrompt→ DO/promptendpoint → session-agentlastSlackActionToken)owner_slack_user_idinsession-tools.tsNew Action:
slack.search_context(packages/plugin-slack/src/actions/actions.ts)slack.read_historySkill Doc (
packages/plugin-slack/skills/slack-tools.md)Architecture Notes
action_tokenis short-lived and per-interaction — stored ephemerally on the DO, not persisted to DBresolveAndEnrichMessages+ module-level cachesTesting Notes
event.action_tokenandbody.action_tokenwith fallbackLimitations (Phase 1)
event.action_tokenvsbody.action_token) need verification against live Slack payloadsCloses TKAI-72