diff --git a/runtime/flybot-image/plugin/index.js b/runtime/flybot-image/plugin/index.js index 903cf4d91..85d4d66ab 100644 --- a/runtime/flybot-image/plugin/index.js +++ b/runtime/flybot-image/plugin/index.js @@ -129,8 +129,9 @@ export function apply(ctx, config = {}) { const nativeTurn = (botId, savedSessionId, text, requestId, options = {}) => bridge.exclusive(async () => { options.signal?.throwIfAborted() const predecessor = options.steer?.native + const maySteer = options.personalTeamScope?.setupPending !== true const live = predecessor?.botId === botId && predecessor.session.id === livePrivateChat(rt,botId,savedSessionId) && - !options.personalTeamScope && predecessor.current() + maySteer && predecessor.current() if (!live) await options.steer?.take()?.cancel() const sessionId = live ? predecessor.session.id : await prepareMappedChat(botId, savedSessionId) options.signal?.throwIfAborted() @@ -155,8 +156,7 @@ export function apply(ctx, config = {}) { bridge.requireModel(botId) const turn = () => runTurn(rt, ctx, botId, text, requestId, undefined, parts, { sessionId, onProgress: options.onProgress, onPhase: options.onPhase, signal: options.signal, - managedGroup: options.managedGroup, interactive: options.interactive, steer:options.steer, - maySteer:!options.personalTeamScope, + managedGroup: options.managedGroup, interactive: options.interactive, steer:options.steer, maySteer, }) return options.personalTeamScope && rt.flybotWorkspaceTeam ? rt.flybotWorkspaceTeam.run({botId,sessionId,requestId,scope:options.personalTeamScope}, turn) diff --git a/runtime/flybot-image/test/container-gateway-isolation.py b/runtime/flybot-image/test/container-gateway-isolation.py index f8c0c6638..077f80f40 100644 --- a/runtime/flybot-image/test/container-gateway-isolation.py +++ b/runtime/flybot-image/test/container-gateway-isolation.py @@ -508,8 +508,9 @@ def api(token, method, path, payload=None, expected=200, timeout=20): assert.equal(turns.filter(event => event.data.source?.kind==='flybot-workspace-history').length,1) """, history['conversation']['native_session_id']) - steer_conversation = api(token_a, 'POST', conversations, {'title':'CI native steer'}, expected=201)['conversation'] - steer_chat = f'{conversations}/{steer_conversation["id"]}' + personal_conversations = f'{agents}/{a["personal_agent_id"]}/conversations' + steer_conversation = api(token_a, 'POST', personal_conversations, {'title':'CI native steer'}, expected=201)['conversation'] + steer_chat = f'{personal_conversations}/{steer_conversation["id"]}' def send_steer(marker): return api(token_a, 'POST', f'{steer_chat}/messages', { 'body':marker, 'accept_pending':True, 'interrupt_current':True,