Repository navigation
ref(slack): move Turn orchestration to provider layer - #1567
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
a7c647a to
aa1a216
Compare
aa1a216 to
dccb17d
Compare
dccb17d to
c7f8406
Compare
a67b1f9 to
d561e31
Compare
88b347d to
41d06f7
Compare
acf5b19 to
368d12e
Compare
d4f3fb4 to
fb072e0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fb072e0. Configure here.
dcramer
left a comment
There was a problem hiding this comment.
There are a lot of web specific behaviors but web is just our native agent. It's the baseline. Slack is layered on top.
| } from "@/chat/task-execution/store"; | ||
| import type { ConversationWorkQueue } from "@/chat/task-execution/queue"; | ||
|
|
||
| const webMailboxKindSchema = z |
| actorEmail: string; | ||
| idempotencyKey: string; | ||
| }): string { | ||
| return `local:web:${stableHex( |
There was a problem hiding this comment.
We shouldn't need a web specific conversation ID. It should simply generate a GUID.
Slack has a prefix but that should be considered legacy and we'll want to be able to look up a conversation associated with a Slack ID without it having a deterministic ID.
| )}`; | ||
| } | ||
|
|
||
| function webMessageId(args: { |
There was a problem hiding this comment.
Same here what's with this odd message key format
| } | ||
|
|
||
| /** Build the stable Turn id for one web mailbox message. */ | ||
| export function webTurnIdForMessage(messageId: string): string { |
There was a problem hiding this comment.
Useless junk Java wrapper function
| } | ||
|
|
||
| /** Build one stable Run id for a web Turn attempt. */ | ||
| export function webRunIdForTurn(turnId: string, startedAtMs: number): string { |
There was a problem hiding this comment.
Same here why aren't we just using GUIDs
| return `web-run:${stableHex(turnId, String(startedAtMs))}`; | ||
| } | ||
|
|
||
| function requireLocalDestination(conversationId: string): LocalDestination { |
There was a problem hiding this comment.
What's this have to do with the core runtime or web
| /** Restore a web Actor from validated mailbox metadata. */ | ||
| export function actorFromMetadata(metadata: WebMailboxMetadata): WebActor { | ||
| return { | ||
| platform: "web", |
There was a problem hiding this comment.
I think here there is either no platform or its native or something. Web is irrelevant.
fb072e0 to
2914988
Compare
2914988 to
333a4d9
Compare
333a4d9 to
4c9ff22
Compare
…#3284) Fixes two stale references. No behavior change. - `packages/junior/src/build/rolldown-workarounds.ts`: replace the placeholder `nitrojs/nitro/issues/XXXX` link with the real issue, nitrojs/nitro#4085. The TODO now names an owner and a removal condition, per `policies/code-comments.md`. nitrojs/nitro#4164 removed the allowlist upstream, and the oldest Nitro version that Junior supports (`3.0.260415-beta`) includes that fix. So the override can probably go, but this PR does not remove it. That needs a production build check that pi-ai providers still register without it. - `.agents/skills/vercel-sandbox/SOURCES.md`: #1567 removed `chat/runtime/reply-executor.ts`. The row now points at `chat/providers/slack/turn.ts` and `chat/task-execution/conversation-turn.ts`, which save each new sandbox ref through `onSandboxRefChanged`. This matches `SKILL.md` and `references/api-surface.md`. The old "success-path only" description was also stale, so it is replaced. <!-- junior-request-attribution:start --> via @MathurAditya724. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A1704862f6367434a6de8ff84bf6d5be1 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A1704862f6367434a6de8ff84bf6d5be1) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A1704862f6367434a6de8ff84bf6d5be1/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Aditya Mathur <[email protected]>

This is the first small slice of #1563. It moves the current Slack Turn
orchestration out of the native runtime namespace without changing product
behavior.
What changed
chat/runtime/slack-runtime.tstochat/providers/slack/runtime.ts.chat/providers/slack/turn.tsand nameits entry point
createSlackTurn.executeSlackTurn.chat/providers/slackas the concrete provider layer andchat/slackas the low-level Slack adapter.services from importing provider layers.
Deliberate boundary
This pull request adds no provider registry, generic adapter framework, or new
interface hierarchy. It changes ownership and names only.
It does not extract native Turn execution. It does not change the Conversation
API, IDs, mailbox routing, recovery, local CLI, dispatch behavior, Slack reply
behavior, or child-agent behavior.
The existing
replyExecutorservice override remains because it currentlycontains native agent services as well as Slack services. A later slice will
separate those dependencies when Slack calls the provider-neutral Turn
contract.
Part of #1563.