@robota-sdk/agent-ui-web 3.0.0-beta.95 → 3.0.0-beta.99
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.
- package/CHANGELOG.md +45 -0
- package/dist/browser/index.d.ts +19 -4
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +587 -60
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +586 -59
- package/dist/node/index.d.cts +19 -4
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +19 -4
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +587 -60
- package/dist/node/index.js.map +1 -1
- package/docs/SPEC.md +7 -2
- package/package.json +6 -6
- package/src/app-view/bridge.ts +217 -0
- package/src/app-view/call-tool-result.ts +58 -0
- package/src/app-view/host-context.ts +37 -0
- package/src/app-view/types.ts +12 -0
- package/src/components/AppView.tsx +147 -0
- package/src/components/ConversationView.tsx +18 -1
- package/src/components/SessionSurface.tsx +39 -12
- package/src/components/SessionSurfaceChrome.tsx +6 -3
- package/src/hooks/server-message-handling.ts +7 -8
- package/src/hooks/session-client-types.ts +16 -1
- package/src/hooks/use-app-view-requests.ts +178 -0
- package/src/hooks/useSessionClient.ts +62 -2
- package/src/index.ts +7 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1 } from "@robota-sdk/agent-transport";
|
|
2
2
|
import { TActionResponse } from "@robota-sdk/agent-interface-transport";
|
|
3
|
-
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
3
|
+
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolAppViewRef, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
4
4
|
import { IBackgroundTaskState, IExecutionDetailRecord, IExecutionWorkspaceEntry, IExecutionWorkspaceSnapshot } from "@robota-sdk/agent-interface-execution";
|
|
5
5
|
import { TCommandUiIntent } from "@robota-sdk/agent-interface-command";
|
|
6
6
|
import React$1, { ReactNode } from "react";
|
|
7
|
+
//#region src/app-view/types.d.ts
|
|
8
|
+
type TAppView = Extract<TServerMessage, {
|
|
9
|
+
type: 'app_view';
|
|
10
|
+
}>['view'];
|
|
11
|
+
type TAppToolOutcome = Omit<Extract<TServerMessage, {
|
|
12
|
+
type: 'app_tool_result';
|
|
13
|
+
}>, 'type' | 'requestId'>;
|
|
14
|
+
type TAppToolArguments = Extract<TClientMessage, {
|
|
15
|
+
type: 'call-app-tool';
|
|
16
|
+
}>['arguments'];
|
|
17
|
+
//#endregion
|
|
7
18
|
//#region src/client/ws-session-client.d.ts
|
|
8
19
|
type TConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
9
20
|
interface IWsSessionClientCallbacks {
|
|
@@ -146,6 +157,7 @@ interface IActiveTool {
|
|
|
146
157
|
commandName?: string;
|
|
147
158
|
/** #3288: true for an internal signal tool (e.g. goal-status) — never rendered as a call. */
|
|
148
159
|
internal?: boolean;
|
|
160
|
+
appView?: IToolAppViewRef;
|
|
149
161
|
}
|
|
150
162
|
/**
|
|
151
163
|
* #3280 §2: a prompt the host queued behind the running turn — the server has already taken it, so it
|
|
@@ -165,7 +177,7 @@ interface ISessionNotice {
|
|
|
165
177
|
* failed — a plain notice rather than a conversation card, since the control's own label is where
|
|
166
178
|
* a successful change confirms itself and the label stays unchanged when it fails.
|
|
167
179
|
*/
|
|
168
|
-
kind: 'session-error' | 'protocol-error' | 'session-change-refused' | 'background-task-control-failed' | 'command-failed';
|
|
180
|
+
kind: 'session-error' | 'protocol-error' | 'session-change-refused' | 'background-task-control-failed' | 'command-failed' | 'context-compacted';
|
|
169
181
|
message: string;
|
|
170
182
|
/**
|
|
171
183
|
* A `session-error` classified at the wire boundary (#3289 §3) — present only when the host could
|
|
@@ -337,6 +349,8 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
337
349
|
* session notice) — no separate error state here.
|
|
338
350
|
*/
|
|
339
351
|
deleteSchedule: (taskId: string) => void;
|
|
352
|
+
readAppView: (viewKey: string, signal?: AbortSignal) => Promise<TAppView>;
|
|
353
|
+
callAppTool: (viewKey: string, name: string, args: TAppToolArguments, signal?: AbortSignal) => Promise<TAppToolOutcome>;
|
|
340
354
|
}
|
|
341
355
|
//#endregion
|
|
342
356
|
//#region src/hooks/useSessionClient.d.ts
|
|
@@ -544,7 +558,7 @@ declare function PersonalUsageDashboard({ state }: {
|
|
|
544
558
|
* The full desktop layout over an `IWsSessionState`. `surface` is an optional label shown next to the
|
|
545
559
|
* mark (e.g. "app").
|
|
546
560
|
*/
|
|
547
|
-
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor }: {
|
|
561
|
+
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
548
562
|
state: IWsSessionState;
|
|
549
563
|
surface?: string;
|
|
550
564
|
/** Desktop shells opt in; embedded/session-only surfaces keep their existing chat-only contract. */
|
|
@@ -564,6 +578,7 @@ declare function SessionSurface({ state, surface, personalUsageEnabled, onReconn
|
|
|
564
578
|
* itself is hidden (only shown "if the host supports it").
|
|
565
579
|
*/
|
|
566
580
|
onOpenMemoryInEditor?: (path: string) => void;
|
|
581
|
+
appViewSandboxUrl?: string;
|
|
567
582
|
}): React.ReactElement;
|
|
568
583
|
/**
|
|
569
584
|
* A centered chrome frame for the pre-session (loading) and fatal states — reused by app shells. Its
|
|
@@ -717,5 +732,5 @@ declare function ProductIdentityProvider({ value, children }: {
|
|
|
717
732
|
}): React.ReactElement;
|
|
718
733
|
declare function useProductIdentity(): IWebProductIdentity;
|
|
719
734
|
//#endregion
|
|
720
|
-
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
735
|
+
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
721
736
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/client/ws-session-client.ts","../../src/hooks/prompt-state.ts","../../src/hooks/session-client-types.ts","../../src/hooks/useSessionClient.ts","../../src/hooks/use-session-directory.ts","../../src/components/composer-attachments.ts","../../src/components/Composer.tsx","../../src/client/runtime-host.ts","../../src/hooks/ui-intent-state.ts","../../src/components/ConversationView.tsx","../../src/components/AgentActivityPanel.tsx","../../src/components/AgentSwitcherSheet.tsx","../../src/components/PermissionPrompt.tsx","../../src/components/personal-usage-dashboard-types.ts","../../src/components/PersonalUsageDashboard.tsx","../../src/components/SessionSurface.tsx","../../src/components/SessionSidebar.tsx","../../src/components/SessionMonitor.tsx","../../src/components/Dialog.tsx","../../src/components/SettingsScreen.tsx","../../src/components/HelpSheet.tsx","../../src/components/Brand.tsx","../../src/product-identity.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/app-view/types.ts","../../src/client/ws-session-client.ts","../../src/hooks/prompt-state.ts","../../src/hooks/session-client-types.ts","../../src/hooks/useSessionClient.ts","../../src/hooks/use-session-directory.ts","../../src/components/composer-attachments.ts","../../src/components/Composer.tsx","../../src/client/runtime-host.ts","../../src/hooks/ui-intent-state.ts","../../src/components/ConversationView.tsx","../../src/components/AgentActivityPanel.tsx","../../src/components/AgentSwitcherSheet.tsx","../../src/components/PermissionPrompt.tsx","../../src/components/personal-usage-dashboard-types.ts","../../src/components/PersonalUsageDashboard.tsx","../../src/components/SessionSurface.tsx","../../src/components/SessionSidebar.tsx","../../src/components/SessionMonitor.tsx","../../src/components/Dialog.tsx","../../src/components/SettingsScreen.tsx","../../src/components/HelpSheet.tsx","../../src/components/Brand.tsx","../../src/product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ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import React$1, { ReactNode } from "react";
|
|
2
|
-
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
2
|
+
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolAppViewRef, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
3
3
|
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1 } from "@robota-sdk/agent-transport";
|
|
4
4
|
import { TActionResponse } from "@robota-sdk/agent-interface-transport";
|
|
5
5
|
import { IBackgroundTaskState, IExecutionDetailRecord, IExecutionWorkspaceEntry, IExecutionWorkspaceSnapshot } from "@robota-sdk/agent-interface-execution";
|
|
6
6
|
import { TCommandUiIntent } from "@robota-sdk/agent-interface-command";
|
|
7
|
+
//#region src/app-view/types.d.ts
|
|
8
|
+
type TAppView = Extract<TServerMessage, {
|
|
9
|
+
type: 'app_view';
|
|
10
|
+
}>['view'];
|
|
11
|
+
type TAppToolOutcome = Omit<Extract<TServerMessage, {
|
|
12
|
+
type: 'app_tool_result';
|
|
13
|
+
}>, 'type' | 'requestId'>;
|
|
14
|
+
type TAppToolArguments = Extract<TClientMessage, {
|
|
15
|
+
type: 'call-app-tool';
|
|
16
|
+
}>['arguments'];
|
|
17
|
+
//#endregion
|
|
7
18
|
//#region src/client/ws-session-client.d.ts
|
|
8
19
|
type TConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
9
20
|
interface IWsSessionClientCallbacks {
|
|
@@ -146,6 +157,7 @@ interface IActiveTool {
|
|
|
146
157
|
commandName?: string;
|
|
147
158
|
/** #3288: true for an internal signal tool (e.g. goal-status) — never rendered as a call. */
|
|
148
159
|
internal?: boolean;
|
|
160
|
+
appView?: IToolAppViewRef;
|
|
149
161
|
}
|
|
150
162
|
/**
|
|
151
163
|
* #3280 §2: a prompt the host queued behind the running turn — the server has already taken it, so it
|
|
@@ -165,7 +177,7 @@ interface ISessionNotice {
|
|
|
165
177
|
* failed — a plain notice rather than a conversation card, since the control's own label is where
|
|
166
178
|
* a successful change confirms itself and the label stays unchanged when it fails.
|
|
167
179
|
*/
|
|
168
|
-
kind: 'session-error' | 'protocol-error' | 'session-change-refused' | 'background-task-control-failed' | 'command-failed';
|
|
180
|
+
kind: 'session-error' | 'protocol-error' | 'session-change-refused' | 'background-task-control-failed' | 'command-failed' | 'context-compacted';
|
|
169
181
|
message: string;
|
|
170
182
|
/**
|
|
171
183
|
* A `session-error` classified at the wire boundary (#3289 §3) — present only when the host could
|
|
@@ -337,6 +349,8 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
337
349
|
* session notice) — no separate error state here.
|
|
338
350
|
*/
|
|
339
351
|
deleteSchedule: (taskId: string) => void;
|
|
352
|
+
readAppView: (viewKey: string, signal?: AbortSignal) => Promise<TAppView>;
|
|
353
|
+
callAppTool: (viewKey: string, name: string, args: TAppToolArguments, signal?: AbortSignal) => Promise<TAppToolOutcome>;
|
|
340
354
|
}
|
|
341
355
|
//#endregion
|
|
342
356
|
//#region src/hooks/useSessionClient.d.ts
|
|
@@ -544,7 +558,7 @@ declare function PersonalUsageDashboard({ state }: {
|
|
|
544
558
|
* The full desktop layout over an `IWsSessionState`. `surface` is an optional label shown next to the
|
|
545
559
|
* mark (e.g. "app").
|
|
546
560
|
*/
|
|
547
|
-
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor }: {
|
|
561
|
+
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
548
562
|
state: IWsSessionState;
|
|
549
563
|
surface?: string;
|
|
550
564
|
/** Desktop shells opt in; embedded/session-only surfaces keep their existing chat-only contract. */
|
|
@@ -564,6 +578,7 @@ declare function SessionSurface({ state, surface, personalUsageEnabled, onReconn
|
|
|
564
578
|
* itself is hidden (only shown "if the host supports it").
|
|
565
579
|
*/
|
|
566
580
|
onOpenMemoryInEditor?: (path: string) => void;
|
|
581
|
+
appViewSandboxUrl?: string;
|
|
567
582
|
}): React.ReactElement;
|
|
568
583
|
/**
|
|
569
584
|
* A centered chrome frame for the pre-session (loading) and fatal states — reused by app shells. Its
|
|
@@ -717,5 +732,5 @@ declare function ProductIdentityProvider({ value, children }: {
|
|
|
717
732
|
}): React.ReactElement;
|
|
718
733
|
declare function useProductIdentity(): IWebProductIdentity;
|
|
719
734
|
//#endregion
|
|
720
|
-
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
735
|
+
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
721
736
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/client/ws-session-client.ts","../../src/hooks/prompt-state.ts","../../src/hooks/session-client-types.ts","../../src/hooks/useSessionClient.ts","../../src/hooks/use-session-directory.ts","../../src/components/composer-attachments.ts","../../src/components/Composer.tsx","../../src/client/runtime-host.ts","../../src/hooks/ui-intent-state.ts","../../src/components/ConversationView.tsx","../../src/components/AgentActivityPanel.tsx","../../src/components/AgentSwitcherSheet.tsx","../../src/components/PermissionPrompt.tsx","../../src/components/personal-usage-dashboard-types.ts","../../src/components/PersonalUsageDashboard.tsx","../../src/components/SessionSurface.tsx","../../src/components/SessionSidebar.tsx","../../src/components/SessionMonitor.tsx","../../src/components/Dialog.tsx","../../src/components/SettingsScreen.tsx","../../src/components/HelpSheet.tsx","../../src/components/Brand.tsx","../../src/product-identity.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/app-view/types.ts","../../src/client/ws-session-client.ts","../../src/hooks/prompt-state.ts","../../src/hooks/session-client-types.ts","../../src/hooks/useSessionClient.ts","../../src/hooks/use-session-directory.ts","../../src/components/composer-attachments.ts","../../src/components/Composer.tsx","../../src/client/runtime-host.ts","../../src/hooks/ui-intent-state.ts","../../src/components/ConversationView.tsx","../../src/components/AgentActivityPanel.tsx","../../src/components/AgentSwitcherSheet.tsx","../../src/components/PermissionPrompt.tsx","../../src/components/personal-usage-dashboard-types.ts","../../src/components/PersonalUsageDashboard.tsx","../../src/components/SessionSurface.tsx","../../src/components/SessionSidebar.tsx","../../src/components/SessionMonitor.tsx","../../src/components/Dialog.tsx","../../src/components/SettingsScreen.tsx","../../src/components/HelpSheet.tsx","../../src/components/Brand.tsx","../../src/product-identity.tsx"],"mappings":";;;;;;;KAEY,WAAW,QAAQ;EAAkB;;KAErC,kBAAkB,KAC5B,QAAQ;EAAkB;;KAIhB,oBAAoB,QAAQ;EAAkB;;;;KCE9C;UAEK;EACf,YAAY,KAAK;EACjB,iBAAiB,QAAQ;;;;;EAKzB;;UAGe;EACf;EACA;EACA,OAAO,KAAK;EACZ,cAAc;;iBAMA,sBACd,aACA,WAAW,4BACV;;;;KCjBS;WACI;IAAuB;WACvB;IAAgB;;;;;;iBAOhB,iBACd,kBAAkB,kBAClB,KAAK,0BACK;;iBA4CI,mBAAmB,YAAY,QAAQ,yBAAyB;;iBAKhE,YAAY,YAAY,UAAU,kBAAkB;;;KC1DxD,uBAAuB,QACjC;EACE;;KAEQ,4BAA4B,QACtC;EACE;;;KAGQ,kBAAkB,KAAK,QAAQ;EAAkB;;;KAEjD,iBAAiB,QAAQ;EAAkB;;;;;;KAM3C,qBAAqB,KAC/B,QAAQ;EAAkB;;;KAKhB,kBAAkB,QAAQ;EAAkB;;;KAE5C,iBAAiB,KAC3B,QAAQ;EAAkB;;KAIhB,6BAA6B,QACvC;EACE;;;;KAKQ,qBAAqB,QAAQ;EAAkB;;KAC/C,mBAAmB,QAAQ;EAAkB;;KAC7C,qBAAqB,QAAQ;EAAkB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