@xenosystem/agent-interface-ui 0.1.18 → 0.1.21

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.
Files changed (42) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  2. package/dist/adapters/agentHostPlatformBridge.js +216 -1
  3. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  4. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  5. package/dist/components/agent/AgentInterface.js +68 -27
  6. package/dist/components/agent/AgentInterface.js.map +1 -1
  7. package/dist/components/agent/AgentView.d.ts +22 -0
  8. package/dist/components/agent/AgentView.d.ts.map +1 -1
  9. package/dist/components/agent/AgentView.js +39 -14
  10. package/dist/components/agent/AgentView.js.map +1 -1
  11. package/dist/components/agent/AgentWorkbenchPanel.d.ts +4 -1
  12. package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
  13. package/dist/components/agent/AgentWorkbenchPanel.js +15 -6
  14. package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
  15. package/dist/components/agent/DevelopmentCoordinationPanel.d.ts +5 -0
  16. package/dist/components/agent/DevelopmentCoordinationPanel.d.ts.map +1 -0
  17. package/dist/components/agent/DevelopmentCoordinationPanel.js +73 -0
  18. package/dist/components/agent/DevelopmentCoordinationPanel.js.map +1 -0
  19. package/dist/components/agent/developmentCoordinationProjection.d.ts +53 -0
  20. package/dist/components/agent/developmentCoordinationProjection.d.ts.map +1 -0
  21. package/dist/components/agent/developmentCoordinationProjection.js +102 -0
  22. package/dist/components/agent/developmentCoordinationProjection.js.map +1 -0
  23. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts.map +1 -1
  24. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js +3 -37
  25. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js.map +1 -1
  26. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +2 -2
  27. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -1
  28. package/dist/components/agent/subagentConversationProjection.d.ts +4 -0
  29. package/dist/components/agent/subagentConversationProjection.d.ts.map +1 -0
  30. package/dist/components/agent/subagentConversationProjection.js +76 -0
  31. package/dist/components/agent/subagentConversationProjection.js.map +1 -0
  32. package/dist/components/agent/subagentRunTree.d.ts +18 -0
  33. package/dist/components/agent/subagentRunTree.d.ts.map +1 -0
  34. package/dist/components/agent/subagentRunTree.js +43 -0
  35. package/dist/components/agent/subagentRunTree.js.map +1 -0
  36. package/dist/platformApiTypes.d.ts +25 -0
  37. package/dist/platformApiTypes.d.ts.map +1 -1
  38. package/dist/stores/agentChatStore.d.ts +6 -2
  39. package/dist/stores/agentChatStore.d.ts.map +1 -1
  40. package/dist/stores/agentChatStore.js +20 -4
  41. package/dist/stores/agentChatStore.js.map +1 -1
  42. package/package.json +5 -5
@@ -18,6 +18,7 @@ import { isWideWorkbenchTab } from './AgentWorkbenchPanel.js';
18
18
  import { PermissionDialog } from './PermissionDialog.js';
19
19
  import { runtimeEventSummary } from './runtimeEventSummary.js';
20
20
  import { latestContextPressure } from './timelineContextPressure.js';
21
+ import { buildSubagentConversationProjection } from './subagentConversationProjection.js';
21
22
  import { createConversationRuntimeBinding, runtimeSelectionForSdk } from '../../utils/conversationRuntime.js';
22
23
  import { usePermissionStore } from '../../stores/permissionStore.js';
23
24
  import { useAgentChatStore, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '../../stores/agentChatStore.js';
@@ -1198,6 +1199,7 @@ function toSubagentWorkbenchRun(value) {
1198
1199
  }
1199
1200
  const capabilityMatch = isPlainRecord(value.capabilityMatch) ? value.capabilityMatch : {};
1200
1201
  const toolPolicy = isPlainRecord(value.toolPolicy) ? value.toolPolicy : {};
1202
+ const delegation = isPlainRecord(value.delegation) ? value.delegation : {};
1201
1203
  const rawScore = readNumber(capabilityMatch, 'score');
1202
1204
  const score = typeof rawScore === 'number' ? Math.max(0, Math.min(1, rawScore)) : 0.5;
1203
1205
  return {
@@ -1217,6 +1219,7 @@ function toSubagentWorkbenchRun(value) {
1217
1219
  status: normalizeSubagentRunStatus(readString(value, 'status')),
1218
1220
  objective,
1219
1221
  role: readOptionalString(value, 'role'),
1222
+ depth: Math.max(1, Math.floor(readNumber(delegation, 'depth') || 1)),
1220
1223
  capabilityMatch: {
1221
1224
  score,
1222
1225
  reasons: readStringArray(capabilityMatch.reasons),
@@ -3334,6 +3337,12 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3334
3337
  const activeConversation = activeConversationId
3335
3338
  ? conversations[activeConversationId]
3336
3339
  : undefined;
3340
+ // A CLI-resumed conversation has two identities: the renderer conversation that owns its
3341
+ // presentation state, and the durable SDK coordination session that owns Goal/Loop/Handoff
3342
+ // and delegated child runs. The workbench must query the latter when it is attached; otherwise
3343
+ // Lifecycle shows the resumed state while RUNS incorrectly reports an empty, unrelated tree.
3344
+ const activeSubagentConversationId = activeConversation?.sessionUi?.coordinationSessionId
3345
+ || activeConversationId;
3337
3346
  const activeConversationAllowedDirectories = useMemo(() => {
3338
3347
  if (!activeConversation)
3339
3348
  return [];
@@ -4380,6 +4389,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4380
4389
  sdkSessionId: sessionId,
4381
4390
  sdkSessionDir: result.sessionDir,
4382
4391
  sdkSessionHistoryPath: result.sessionHistoryPath,
4392
+ coordinationSessionId: result.coordinationSessionId,
4383
4393
  },
4384
4394
  });
4385
4395
  }
@@ -4931,8 +4941,19 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4931
4941
  const requestedMaxTokens = positiveFiniteNumber(params.maxTokens);
4932
4942
  const requestedMaxRuntimeMs = positiveFiniteNumber(params.maxRuntimeMs);
4933
4943
  const requestedMaxCredits = positiveFiniteNumber(params.maxCredits);
4934
- const contextNote = params.contextNote?.trim() || '';
4935
- const contextAttachmentIds = contextNote ? [`manual-context:${generateId()}`] : [];
4944
+ const explicitContextNote = params.contextNote?.trim() || '';
4945
+ const inheritedContext = explicitContextNote || (sourceConversation?.messages || [])
4946
+ .filter((message) => !message.isStreaming && typeof message.content === 'string' && message.content.trim())
4947
+ .slice(-6)
4948
+ .map((message) => `${message.role}: ${message.content.trim().slice(0, 800)}`)
4949
+ .join('\n\n')
4950
+ .slice(0, 4_000);
4951
+ const parentRun = sourceConversation
4952
+ ? subagentRuns.find((run) => run.childConversationId === sourceConversation.id)
4953
+ : undefined;
4954
+ const parentDepth = parentRun?.depth || 0;
4955
+ const configuredMaxChildDepth = Math.max(1, Math.min(10, Math.floor(source.team.teamAgentPolicy?.maxChildDepth || 4)));
4956
+ const allowFurtherDelegation = source.team.teamAgentPolicy?.allowFurtherDelegation !== false;
4936
4957
  const budgetLimits = [
4937
4958
  target.rateLimits?.tokensPerDay,
4938
4959
  source.team.rateLimits?.tokensPerDay,
@@ -4950,13 +4971,15 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4950
4971
  workspaceId: source.workspace.id,
4951
4972
  teamId: source.team.id,
4952
4973
  objective: params.prompt.trim(),
4953
- contextAttachmentIds,
4974
+ contextAttachmentIds: [],
4954
4975
  expectedArtifacts,
4976
+ parentDepth,
4955
4977
  policy: {
4956
4978
  maxConcurrentChildRuns: 1,
4957
- maxChildDepth: 1,
4979
+ maxChildDepth: configuredMaxChildDepth,
4980
+ allowFurtherDelegation,
4958
4981
  cancellationPropagation: true,
4959
- contextAttachmentLimit: contextAttachmentIds.length || 1,
4982
+ contextAttachmentLimit: 20,
4960
4983
  ...(budgetLimits.length > 0 ? { maxTokens: Math.min(...budgetLimits) } : {}),
4961
4984
  ...(requestedMaxRuntimeMs ? { maxRuntimeMs: requestedMaxRuntimeMs } : {}),
4962
4985
  ...(requestedMaxCredits ? { maxCredits: requestedMaxCredits } : {}),
@@ -5010,6 +5033,18 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5010
5033
  childAgentId: target.id,
5011
5034
  },
5012
5035
  });
5036
+ // The canonical standalone/Hub host owns queueing and execution. Launching
5037
+ // again from this renderer would create a second turn for the same durable
5038
+ // run. Legacy bridges omit this flag and retain their existing adapter path.
5039
+ if (createRunResult.hostManaged === true) {
5040
+ return {
5041
+ success: true,
5042
+ targetAgentName: target.name,
5043
+ reply: `${subagentRunId} queued.`,
5044
+ targetConversationId: childConversationId,
5045
+ subagentRunId,
5046
+ };
5047
+ }
5013
5048
  const targetModel = target.model || MAIN_ASSISTANT_MODEL;
5014
5049
  const delegationSystem = buildDelegationSystemPrompt({
5015
5050
  target,
@@ -5023,7 +5058,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5023
5058
  `Output: ${expectedArtifacts.join(', ')}`,
5024
5059
  requestedMaxTokens ? `Tokens: ${requestedMaxTokens}` : null,
5025
5060
  requestedMaxRuntimeMs ? `Time: ${Math.round(requestedMaxRuntimeMs / 1000)}s` : null,
5026
- contextNote ? `Context:\n${contextNote}` : null,
5061
+ inheritedContext ? `Selected parent context:\n${inheritedContext}` : null,
5027
5062
  ].filter((line) => !!line).join('\n\n');
5028
5063
  const delegationCaller = {
5029
5064
  workspaceId: source.workspace.id,
@@ -5511,9 +5546,9 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5511
5546
  return;
5512
5547
  }
5513
5548
  const requests = [];
5514
- if (activeConversationId) {
5515
- requests.push({ parentConversationId: activeConversationId, limit: 80, caller: policyCaller });
5516
- requests.push({ childConversationId: activeConversationId, limit: 80, caller: policyCaller });
5549
+ if (activeSubagentConversationId) {
5550
+ requests.push({ parentConversationId: activeSubagentConversationId, limit: 80, caller: policyCaller });
5551
+ requests.push({ childConversationId: activeSubagentConversationId, limit: 80, caller: policyCaller });
5517
5552
  }
5518
5553
  if (selectedSubagentTeamId) {
5519
5554
  requests.push({ teamId: selectedSubagentTeamId, limit: 120, caller: policyCaller });
@@ -5555,7 +5590,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5555
5590
  await schedulerStatusTask;
5556
5591
  setSubagentLoading(false);
5557
5592
  }
5558
- }, [activeConversationId, policyCaller, selectedAgentId, selectedSubagentTeamId]);
5593
+ }, [activeSubagentConversationId, policyCaller, selectedAgentId, selectedSubagentTeamId]);
5559
5594
  const handleSelectInbox = () => {
5560
5595
  logAgentInterfaceDebug('select inbox root', {
5561
5596
  selectedInboxConversationId,
@@ -5951,18 +5986,24 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5951
5986
  setSubagentSelectedRunId(run.id);
5952
5987
  }, []);
5953
5988
  const handleSubagentOpenConversation = useCallback((run) => {
5954
- const existing = conversations[run.childConversationId];
5955
- if (existing) {
5956
- updateConversation(run.childConversationId, {
5957
- sessionUi: {
5958
- ...(existing.sessionUi || {}),
5959
- panelOpen: true,
5960
- panelTab: 'trace',
5961
- }
5962
- });
5963
- }
5964
- activateSessionConversation(run.childConversationId);
5965
- }, [activateSessionConversation, conversations, updateConversation]);
5989
+ const chatStore = useAgentChatStore.getState();
5990
+ const existingProjection = Object.values(chatStore.conversations).find((conversation) => (conversation.id === run.childConversationId
5991
+ || conversation.sessionUi?.coordinationSessionId === run.childConversationId));
5992
+ const parentProjection = Object.values(chatStore.conversations).find((conversation) => (conversation.id === run.parentConversationId
5993
+ || conversation.sessionUi?.coordinationSessionId === run.parentConversationId));
5994
+ const targetConversationId = existingProjection?.id
5995
+ || chatStore.createConversation(parentProjection?.agentId || selectedAgent?.id || MAIN_ASSISTANT_ID, run.childConversationId);
5996
+ const current = useAgentChatStore.getState().getConversation(targetConversationId);
5997
+ const projection = buildSubagentConversationProjection(run, subagentRuntimeEvents, current?.agentId || parentProjection?.agentId || selectedAgent?.id || MAIN_ASSISTANT_ID, parentProjection?.id || run.parentConversationId);
5998
+ updateConversation(targetConversationId, {
5999
+ ...projection,
6000
+ sessionUi: {
6001
+ ...(current?.sessionUi || {}),
6002
+ ...(projection.sessionUi || {}),
6003
+ },
6004
+ });
6005
+ activateSessionConversation(targetConversationId);
6006
+ }, [activateSessionConversation, selectedAgent?.id, subagentRuntimeEvents, updateConversation]);
5966
6007
  const handleSubagentCancelRun = useCallback(async (run) => {
5967
6008
  if (!getAgentPlatformBridge()?.subagents?.cancelRun && !getAgentPlatformBridge()?.subagents?.updateRun) {
5968
6009
  setSubagentError('Subagent run bridge is not available. Restart Hub.');
@@ -7488,13 +7529,13 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7488
7529
  runtimeEvents: subagentRuntimeEvents,
7489
7530
  runtimeEventsLoading: subagentRuntimeEventsLoading,
7490
7531
  runtimeEventsError: subagentRuntimeEventsError,
7491
- activeConversationId: activeConversationId || undefined,
7532
+ activeConversationId: activeSubagentConversationId || undefined,
7492
7533
  activeAgentId: selectedAgentId || undefined,
7493
7534
  schedulerStatus: subagentSchedulerStatus,
7494
7535
  schedulerStatusLoading: subagentSchedulerStatusLoading,
7495
7536
  schedulerStatusError: subagentSchedulerStatusError,
7496
7537
  }), [
7497
- activeConversationId,
7538
+ activeSubagentConversationId,
7498
7539
  selectedAgentId,
7499
7540
  selectedSubagentWorkbenchRun?.id,
7500
7541
  subagentError,
@@ -7983,7 +8024,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7983
8024
  }, teamId: settingsPanel.teamId, teamName: teamForSettings?.name || settingsPanel.teamName, onClose: handleCloseSettings, onDelete: handleDeleteFromSettings }));
7984
8025
  }
7985
8026
  if (viewMode === 'inbox') {
7986
- return (_jsx(React.Suspense, { fallback: _jsx("div", { className: "flex h-full items-center justify-center text-[12px] text-white/35", children: "Loading chat..." }), children: _jsx(AgentView, { agentId: MAIN_ASSISTANT_ID, conversationId: selectedInboxConversationId, isMainAssistant: true, agentName: MAIN_ASSISTANT_NAME, model: MAIN_ASSISTANT_MODEL, templateName: "Main Assistant", workspaceName: "All Workspaces", teamName: "Global", systemPrompt: enrichedMainSystemPromptWithCodeContext, capabilities: { terminal: true, fileRead: true, fileWrite: true, appLaunch: true }, permissionProfile: "standard", allowedDirectories: [], approvalRules: [], allowedApps: [], teamAgents: [], onCreateWorkspace: handleMainCreateWorkspace, onCreateTeam: handleMainCreateTeam, onCreateTeamAgent: handleMainCreateTeamAgent, onGetInboxWorkspaceOptions: handleGetInboxWorkspaceOptions, onBindInboxConversationToWorkspace: handleBindInboxConversationToWorkspace, onOpenReassignedConversation: handleOpenReassignedConversation, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, onPeekEditorPath: handlePeekEditorPath, onPeekEditorDiff: handlePeekEditorDiff, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, externalInputLockReason: providerSessionTuiInputLockReason, onConversationCreated: activateSessionConversation }) }));
8027
+ return (_jsx(React.Suspense, { fallback: _jsx("div", { className: "flex h-full items-center justify-center text-[12px] text-white/35", children: "Loading chat..." }), children: _jsx(AgentView, { agentId: MAIN_ASSISTANT_ID, conversationId: selectedInboxConversationId, isMainAssistant: true, agentName: MAIN_ASSISTANT_NAME, model: MAIN_ASSISTANT_MODEL, templateName: "Main Assistant", workspaceName: "All Workspaces", teamName: "Global", systemPrompt: enrichedMainSystemPromptWithCodeContext, capabilities: { terminal: true, fileRead: true, fileWrite: true, appLaunch: true }, permissionProfile: "standard", allowedDirectories: [], approvalRules: [], allowedApps: [], teamAgents: [], onCreateWorkspace: handleMainCreateWorkspace, onCreateTeam: handleMainCreateTeam, onCreateTeamAgent: handleMainCreateTeamAgent, onGetInboxWorkspaceOptions: handleGetInboxWorkspaceOptions, onBindInboxConversationToWorkspace: handleBindInboxConversationToWorkspace, onOpenReassignedConversation: handleOpenReassignedConversation, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, onPeekEditorPath: handlePeekEditorPath, onPeekEditorDiff: handlePeekEditorDiff, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, externalInputLockReason: providerSessionTuiInputLockReason, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
7987
8028
  }
7988
8029
  // If an agent is selected, show the chat view.
7989
8030
  // Conversation is created lazily on first message send.
@@ -8046,7 +8087,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8046
8087
  selectedBy: 'user'
8047
8088
  }
8048
8089
  });
8049
- }, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation }) }));
8090
+ }, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
8050
8091
  }
8051
8092
  // Plugins view
8052
8093
  if (viewMode === 'plugins') {
@@ -8078,7 +8119,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8078
8119
  `subagentRunId ?? conversationId`, so the conversation id
8079
8120
  IS the run id here. Passing anything else would ask the
8080
8121
  host about a run it has never heard of. */
8081
- reviewRunId: activeConversationId, traceMessages: traceMessages, selectedTraceMessage: selectedTraceMessage, outputEntries: outputEntries, problemEntries: problemEntries, onSelectTab: handleSelectWorkbenchTab, onClose: handleCloseWorkbenchPanel, onSelectTraceMessage: handleSelectWorkbenchTraceMessage, onOpenChatSettings: handleOpenActiveConversationSettings, onOpenChatAcpAgents: handleOpenActiveConversationAcpAgents, onOpenChatPlugins: handleOpenPluginManager, onOpenChatKnowledge: handleOpenActiveConversationKnowledge, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalDraftCwd: terminalDraftCwd, terminalDraftInput: terminalDraftInput, onChangeTerminalCwd: setTerminalDraftCwd, onChangeTerminalInput: setTerminalDraftInput, onResetTerminalCwd: handleResetWorkbenchTerminalCwd, onClearTerminalHistory: handleClearWorkbenchTerminalHistory, onRunTerminalCommand: () => { void handleRunWorkbenchTerminalCommand(); }, terminalHistory: terminalHistory, liveTerminalRuns: liveTerminalRunsForConversation, onReuseTerminalEntry: handleReuseWorkbenchTerminalEntry, onStopTerminalRun: (terminalId) => { void handleStopWorkbenchTerminalRun(terminalId); }, codeWorkbench: codeWorkbenchState, onCodeQueryChange: setCodeWorkbenchQuery, onCodeModeChange: handleCodeModeChange, onCodeIndex: handleCodeIndex, onCodeSearch: handleCodeSearch, onCodeOpenPath: handleCodeOpenPath, onCodeToggleFile: handleCodeToggleFile, onCodeToggleSymbol: handleCodeToggleSymbol, onCodeCreateContextPack: () => { void handleCodeCreateContextPack(); }, onCodeMaterializeContextPack: (packId) => { void handleCodeMaterializeContextPack(packId); }, onCodeAttachContextPack: (packId) => { void handleCodeAttachContextPack(packId); }, onCodeRefreshContextPacks: () => { void handleCodeRefreshContextPacks(); }, onCodeRefreshChanges: () => { void handleCodeRefreshChanges(); }, onCodeRefreshActions: () => { void handleCodeRefreshActions(); }, onCodeApplyAction: (action) => { void handleCodeApplyAction(action); }, onCodeOrganizeImports: () => { void handleCodeOrganizeImports(); }, onCodeRenameSymbol: () => { void handleCodeRenameSymbol(); }, onCodeRefreshLanguageServices: () => { void handleCodeRefreshLanguageServices(); }, onCodeControlLanguageService: (serviceId, action) => { void handleCodeControlLanguageService(serviceId, action); }, onCodeRepairIndex: () => { void handleCodeRepairIndex(); }, engineeringWorkbench: engineeringWorkbenchState, onEngineeringRefresh: () => { void handleEngineeringRefresh(); }, onEngineeringTogglePath: handleEngineeringTogglePath, onEngineeringOpenPath: handleEngineeringOpenPath, onEngineeringPreviewDiff: (paths) => { void handleEngineeringPreviewDiff(paths); }, onEngineeringStage: (paths) => { void handleEngineeringStage(paths); }, onEngineeringUnstage: (paths) => { void handleEngineeringUnstage(paths); }, onEngineeringRunCheck: (checkId) => { void handleEngineeringRunCheck(checkId); }, onEngineeringStartBackgroundCheck: (checkId) => { void handleEngineeringStartBackgroundCheck(checkId); }, onEngineeringStopBackgroundRun: (runId) => { void handleEngineeringStopBackgroundRun(runId); }, onEngineeringReadBackgroundRunOutput: (runId) => { void handleEngineeringReadBackgroundRunOutput(runId); }, onEngineeringCommitMessageChange: setEngineeringCommitMessage, onEngineeringCommit: () => { void handleEngineeringCommit(); }, onEngineeringQueuePatchReview: () => { void handleEngineeringQueuePatchReview(); }, onEngineeringUpdatePatchReview: (id, status) => { void handleEngineeringUpdatePatchReview(id, status); }, onEngineeringReviewPatchSelection: (request) => { void handleEngineeringReviewPatchSelection(request); }, onEngineeringCompareCheckpoints: (fromCheckpointId, toCheckpointId) => { void handleEngineeringCompareCheckpoints(fromCheckpointId, toCheckpointId); }, onEngineeringRestoreCheckpoint: (checkpointId) => { void handleEngineeringRestoreCheckpoint(checkpointId); }, cliControlPlane: cliControlPlaneState, cliControlPlaneCaller: policyCaller, cliControlPlaneConversationId: activeConversationId, cliControlPlaneRemoteBackendId: selectedAgent?.runtimeSelection?.remoteBackendId || '', onCliControlPlaneInspect: () => { void handleCliControlPlaneInspect(); }, onCliControlPlaneInspectOperation: (operation) => { void handleCliControlPlaneInspectOperation(operation); }, onCliControlPlaneRemoteRunOperation: (action, runId) => { void handleCliControlPlaneRemoteRunOperation(action, runId); }, subagentWorkbench: subagentWorkbenchState, subagentDelegationTargets: subagentDelegationTargets, subagentDelegationSourceName: selectedAgent?.name, subagentDelegationDisabledReason: subagentDelegationDisabledReason, onSubagentRefresh: () => { void handleSubagentRefresh(); }, onSubagentRecoverRuns: () => { void handleSubagentRecoverRuns(); }, onSubagentSelectRun: handleSubagentSelectRun, onSubagentOpenConversation: handleSubagentOpenConversation, onSubagentCancelRun: (run) => { void handleSubagentCancelRun(run); }, onCreateSubagentDelegation: handleWorkbenchSubagentDelegation, policyWorkbench: policyWorkbenchState, onPolicyRefresh: () => { void handlePolicyRefresh(); } }) }) }) }))] })] }), folderPanelOpen && (_jsx(FolderSidebar, { conversationId: activeConversationId, rootDirectory: activeConversation?.rootDirectory || null, allowedDirectories: activeConversationAllowedDirectories, onOpenFolder: handleOpenFolderForConversation, onClose: () => setFolderPanelOpen(false), onOpenFile: handleOpenEditorFile, activeFilePath: activeEditorFilePath, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, providerSessionTuiReady: providerSessionTuiReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalTabs: rightPanelTerminalsForConversation, onPtyInput: handleRightPanelPtyInput, onPtyResize: handleRightPanelPtyResize, onCreateTerminal: handleCreateRightPanelTerminal, onCreateProviderTui: handleCreateProviderSessionTui, onCloseTerminal: handleCloseRightPanelTerminal, onClearTerminal: handleClearRightPanelTerminal, onRestartTerminal: handleRestartRightPanelTerminal, onStopTerminal: handleStopRightPanelTerminal, width: rightPanelWidth, onResizeStart: handleRightPanelResizeStart })), rightPanelResizing && (_jsx("div", { className: "fixed inset-0 z-[9999] cursor-col-resize bg-transparent", "aria-hidden": "true" })), pendingPermission && (_jsx(PermissionDialog, { request: pendingPermission, onDecision: resolvePermission }))] }));
8122
+ reviewRunId: activeConversationId, coordinationSessionId: activeConversation?.sessionUi?.coordinationSessionId || activeConversationId, traceMessages: traceMessages, selectedTraceMessage: selectedTraceMessage, outputEntries: outputEntries, problemEntries: problemEntries, onSelectTab: handleSelectWorkbenchTab, onClose: handleCloseWorkbenchPanel, onSelectTraceMessage: handleSelectWorkbenchTraceMessage, onOpenChatSettings: handleOpenActiveConversationSettings, onOpenChatAcpAgents: handleOpenActiveConversationAcpAgents, onOpenChatPlugins: handleOpenPluginManager, onOpenChatKnowledge: handleOpenActiveConversationKnowledge, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalDraftCwd: terminalDraftCwd, terminalDraftInput: terminalDraftInput, onChangeTerminalCwd: setTerminalDraftCwd, onChangeTerminalInput: setTerminalDraftInput, onResetTerminalCwd: handleResetWorkbenchTerminalCwd, onClearTerminalHistory: handleClearWorkbenchTerminalHistory, onRunTerminalCommand: () => { void handleRunWorkbenchTerminalCommand(); }, terminalHistory: terminalHistory, liveTerminalRuns: liveTerminalRunsForConversation, onReuseTerminalEntry: handleReuseWorkbenchTerminalEntry, onStopTerminalRun: (terminalId) => { void handleStopWorkbenchTerminalRun(terminalId); }, codeWorkbench: codeWorkbenchState, onCodeQueryChange: setCodeWorkbenchQuery, onCodeModeChange: handleCodeModeChange, onCodeIndex: handleCodeIndex, onCodeSearch: handleCodeSearch, onCodeOpenPath: handleCodeOpenPath, onCodeToggleFile: handleCodeToggleFile, onCodeToggleSymbol: handleCodeToggleSymbol, onCodeCreateContextPack: () => { void handleCodeCreateContextPack(); }, onCodeMaterializeContextPack: (packId) => { void handleCodeMaterializeContextPack(packId); }, onCodeAttachContextPack: (packId) => { void handleCodeAttachContextPack(packId); }, onCodeRefreshContextPacks: () => { void handleCodeRefreshContextPacks(); }, onCodeRefreshChanges: () => { void handleCodeRefreshChanges(); }, onCodeRefreshActions: () => { void handleCodeRefreshActions(); }, onCodeApplyAction: (action) => { void handleCodeApplyAction(action); }, onCodeOrganizeImports: () => { void handleCodeOrganizeImports(); }, onCodeRenameSymbol: () => { void handleCodeRenameSymbol(); }, onCodeRefreshLanguageServices: () => { void handleCodeRefreshLanguageServices(); }, onCodeControlLanguageService: (serviceId, action) => { void handleCodeControlLanguageService(serviceId, action); }, onCodeRepairIndex: () => { void handleCodeRepairIndex(); }, engineeringWorkbench: engineeringWorkbenchState, onEngineeringRefresh: () => { void handleEngineeringRefresh(); }, onEngineeringTogglePath: handleEngineeringTogglePath, onEngineeringOpenPath: handleEngineeringOpenPath, onEngineeringPreviewDiff: (paths) => { void handleEngineeringPreviewDiff(paths); }, onEngineeringStage: (paths) => { void handleEngineeringStage(paths); }, onEngineeringUnstage: (paths) => { void handleEngineeringUnstage(paths); }, onEngineeringRunCheck: (checkId) => { void handleEngineeringRunCheck(checkId); }, onEngineeringStartBackgroundCheck: (checkId) => { void handleEngineeringStartBackgroundCheck(checkId); }, onEngineeringStopBackgroundRun: (runId) => { void handleEngineeringStopBackgroundRun(runId); }, onEngineeringReadBackgroundRunOutput: (runId) => { void handleEngineeringReadBackgroundRunOutput(runId); }, onEngineeringCommitMessageChange: setEngineeringCommitMessage, onEngineeringCommit: () => { void handleEngineeringCommit(); }, onEngineeringQueuePatchReview: () => { void handleEngineeringQueuePatchReview(); }, onEngineeringUpdatePatchReview: (id, status) => { void handleEngineeringUpdatePatchReview(id, status); }, onEngineeringReviewPatchSelection: (request) => { void handleEngineeringReviewPatchSelection(request); }, onEngineeringCompareCheckpoints: (fromCheckpointId, toCheckpointId) => { void handleEngineeringCompareCheckpoints(fromCheckpointId, toCheckpointId); }, onEngineeringRestoreCheckpoint: (checkpointId) => { void handleEngineeringRestoreCheckpoint(checkpointId); }, cliControlPlane: cliControlPlaneState, cliControlPlaneCaller: policyCaller, cliControlPlaneConversationId: activeConversationId, cliControlPlaneRemoteBackendId: selectedAgent?.runtimeSelection?.remoteBackendId || '', onCliControlPlaneInspect: () => { void handleCliControlPlaneInspect(); }, onCliControlPlaneInspectOperation: (operation) => { void handleCliControlPlaneInspectOperation(operation); }, onCliControlPlaneRemoteRunOperation: (action, runId) => { void handleCliControlPlaneRemoteRunOperation(action, runId); }, subagentWorkbench: subagentWorkbenchState, subagentDelegationTargets: subagentDelegationTargets, subagentDelegationSourceName: selectedAgent?.name, subagentDelegationDisabledReason: subagentDelegationDisabledReason, onSubagentRefresh: () => { void handleSubagentRefresh(); }, onSubagentRecoverRuns: () => { void handleSubagentRecoverRuns(); }, onSubagentSelectRun: handleSubagentSelectRun, onSubagentOpenConversation: handleSubagentOpenConversation, onSubagentCancelRun: (run) => { void handleSubagentCancelRun(run); }, onCreateSubagentDelegation: handleWorkbenchSubagentDelegation, policyWorkbench: policyWorkbenchState, onPolicyRefresh: () => { void handlePolicyRefresh(); } }) }) }) }))] })] }), folderPanelOpen && (_jsx(FolderSidebar, { conversationId: activeConversationId, rootDirectory: activeConversation?.rootDirectory || null, allowedDirectories: activeConversationAllowedDirectories, onOpenFolder: handleOpenFolderForConversation, onClose: () => setFolderPanelOpen(false), onOpenFile: handleOpenEditorFile, activeFilePath: activeEditorFilePath, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, providerSessionTuiReady: providerSessionTuiReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalTabs: rightPanelTerminalsForConversation, onPtyInput: handleRightPanelPtyInput, onPtyResize: handleRightPanelPtyResize, onCreateTerminal: handleCreateRightPanelTerminal, onCreateProviderTui: handleCreateProviderSessionTui, onCloseTerminal: handleCloseRightPanelTerminal, onClearTerminal: handleClearRightPanelTerminal, onRestartTerminal: handleRestartRightPanelTerminal, onStopTerminal: handleStopRightPanelTerminal, width: rightPanelWidth, onResizeStart: handleRightPanelResizeStart })), rightPanelResizing && (_jsx("div", { className: "fixed inset-0 z-[9999] cursor-col-resize bg-transparent", "aria-hidden": "true" })), pendingPermission && (_jsx(PermissionDialog, { request: pendingPermission, onDecision: resolvePermission }))] }));
8082
8123
  if (surface !== 'standalone-desktop') {
8083
8124
  return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-embedded-shell": "true", children: [_jsx("header", { className: "xeno-chrome-shell xeno-border-subtle h-10 flex-shrink-0 border-b", "data-xeno-agent-session-header": "embedded", "data-xeno-hub-header-style": "true", children: sessionTabsNode }), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace })] }));
8084
8125
  }