@nostop/page 0.1.0-rc.5 → 0.1.0-rc.7

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.
@@ -1,4 +1,4 @@
1
- (function() { try { if (typeof document != "undefined") { var elementStyle = document.createElement("style"); elementStyle.appendChild(document.createTextNode("/* Page Agent panel. Design from the modern renderer; dark by default, light when the system asks for it. */\n\n._wrapper_1e3bu_3 {\n overscroll-behavior: contain;\n --pa-fg: #f4f3ee;\n --pa-muted: #aaa9a1;\n --pa-accent: #fa8d45;\n --pa-surface: #191918;\n --pa-raised: #20201e;\n --pa-line: rgba(244, 243, 238, 0.12);\n --pa-ok: #b1d8b8;\n --pa-warn: #ead39a;\n --pa-err: #ffb9a9;\n --pa-radius: 18px;\n --pa-c-keyword: #fa8d45;\n --pa-c-string: #b1d8b8;\n --pa-c-number: #ead39a;\n --pa-c-key: #9ec5f0;\n --pa-c-bool: #ffb9a9;\n --pa-c-comment: #7d7c75;\n --pa-c-name: #f4f3ee;\n --pa-c-punct: #aaa9a1;\n\n position: fixed;\n bottom: 100px;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translateY(20px);\n opacity: 0;\n z-index: 2147483642;\n box-sizing: border-box;\n /* 100% of the fixed containing block — avoids the classic 100vw horizontal overflow on mobile. */\n width: min(414px, calc(100% - 24px));\n max-height: min(640px, calc(100svh - 120px));\n display: none;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--pa-line);\n border-radius: var(--pa-radius);\n background: var(--pa-surface);\n color: var(--pa-fg);\n box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);\n font:\n 13px/1.4 system-ui,\n -apple-system,\n 'Segoe UI',\n sans-serif;\n transition:\n opacity 0.2s ease,\n transform 0.2s ease,\n box-shadow 0.3s ease,\n width 0.2s ease;\n}\n\n@media (min-width: 481px) {\n ._wrapper_1e3bu_3[data-mode='skills-studio'] {\n width: min(560px, calc(100vw - 24px));\n }\n}\n\n._wrapper_1e3bu_3 *,\n._wrapper_1e3bu_3 *::before,\n._wrapper_1e3bu_3 *::after {\n box-sizing: border-box;\n}\n\n._wrapper_1e3bu_3[data-state='running'] {\n box-shadow:\n 0 0 0 1px color-mix(in srgb, var(--pa-accent) 55%, transparent),\n 0 16px 40px rgba(0, 0, 0, 0.35);\n}\n\n._wrapper_1e3bu_3[data-state='waiting'] {\n box-shadow:\n 0 0 0 1px color-mix(in srgb, var(--pa-accent) 80%, transparent),\n 0 16px 40px rgba(0, 0, 0, 0.35);\n}\n\n._wrapper_1e3bu_3._collapsed_1e3bu_80 ._feedWrap_1e3bu_80 {\n display: none;\n}\n\n/* Follow bar (mobile peek strip). Hidden unless data-follow=\"bar\" on narrow viewports. */\n._followBar_1e3bu_85 {\n display: none;\n flex: none;\n align-items: center;\n gap: 8px;\n min-height: 56px;\n padding: 8px 10px;\n padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));\n}\n\n._followBarBody_1e3bu_95 {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n._followBarStatus_1e3bu_110 {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._followBarLens_1e3bu_120 {\n width: 28px;\n height: 28px;\n}\n\n._followBarLens_1e3bu_120 svg {\n width: 14px;\n height: 14px;\n}\n\n._voiceActions_1e3bu_130 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Voice stop is for the mobile expanded voice layout; desktop keeps Stop in the header. */\n._voiceActions_1e3bu_130 [data-role='voice-stop'] {\n display: none;\n}\n\n[hidden] {\n display: none !important;\n}\n\n/* Header */\n\n._header_1e3bu_148 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 52px;\n padding: 0 12px 0 14px;\n border-bottom: 1px solid var(--pa-line);\n cursor: grab;\n touch-action: none;\n user-select: none;\n}\n\n._brand_1e3bu_161:has(img) {\n background: transparent;\n}\n\n._brand_1e3bu_161 img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: inherit;\n}\n\n._brand_1e3bu_161 {\n flex: none;\n width: 30px;\n height: 30px;\n display: grid;\n place-items: center;\n border-radius: 10px;\n background: var(--pa-accent);\n color: #20150e;\n font-weight: 800;\n font-size: 16px;\n}\n\n._titleBlock_1e3bu_185 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n._title_1e3bu_185 {\n font-size: 12px;\n font-weight: 650;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._status_1e3bu_200 {\n font-size: 10.5px;\n color: var(--pa-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._controls_1e3bu_208 {\n flex: none;\n display: flex;\n gap: 2px;\n}\n\n._iconButton_1e3bu_214 {\n display: grid;\n place-items: center;\n min-width: 28px;\n min-height: 28px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n\n._iconButton_1e3bu_214:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n\n._stopButton_1e3bu_232 {\n color: #ff8a80;\n}\n\n/* Feed */\n\n._feedWrap_1e3bu_80 {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 120px;\n max-height: 380px;\n}\n\n._feed_1e3bu_80 {\n position: relative;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px 18px 14px 14px;\n scroll-behavior: auto;\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, var(--pa-muted) 40%, transparent) transparent;\n}\n\n/* Right-edge rail: viewport thumb plus one marker per turn, question and result. Click a marker to jump. */\n._rail_1e3bu_263 {\n position: absolute;\n top: 8px;\n bottom: 8px;\n right: 0;\n width: 16px;\n opacity: 0.55;\n transition: opacity 0.2s ease;\n}\n\n._rail_1e3bu_263::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 6px;\n width: 2px;\n border-radius: 2px;\n background: var(--pa-line);\n}\n\n._feedWrap_1e3bu_80:hover ._rail_1e3bu_263,\n._feedWrap_1e3bu_80:focus-within ._rail_1e3bu_263 {\n opacity: 1;\n}\n\n._feedWrap_1e3bu_80:hover ._rail_1e3bu_263,\n._feedWrap_1e3bu_80:focus-within ._rail_1e3bu_263 {\n opacity: 1;\n}\n\n._railThumb_1e3bu_294 {\n position: absolute;\n right: 6px;\n width: 2px;\n border-radius: 2px;\n background: var(--pa-muted);\n transition: top 0.12s ease;\n}\n\n._railMark_1e3bu_303 {\n position: absolute;\n right: 2px;\n height: 3px;\n width: 10px;\n margin-top: -1px;\n padding: 0;\n border: 0;\n border-radius: 3px;\n background: var(--pa-muted);\n opacity: 0.7;\n cursor: pointer;\n transition:\n width 0.15s ease,\n opacity 0.15s ease,\n background-color 0.15s ease;\n}\n\n._railMark_1e3bu_303[data-kind='turn'] {\n width: 14px;\n}\n\n._railMark_1e3bu_303[data-kind='question'],\n._railMark_1e3bu_303[data-kind='result'] {\n width: 6px;\n height: 6px;\n right: 4px;\n margin-top: -2px;\n border-radius: 50%;\n}\n\n._railMark_1e3bu_303[data-kind='question'] {\n background: var(--pa-accent);\n opacity: 1;\n}\n\n._railMark_1e3bu_303[data-kind='result'] {\n background: var(--pa-ok);\n opacity: 1;\n}\n\n._railMark_1e3bu_303[data-active='true'] {\n width: 18px;\n opacity: 1;\n background: var(--pa-fg);\n}\n\n._railMark_1e3bu_303[data-pinned='true'] {\n background: var(--pa-accent);\n opacity: 1;\n}\n\n._railMark_1e3bu_303:hover {\n width: 18px;\n opacity: 1;\n}\n\n._railMark_1e3bu_303[data-kind='question'] {\n background: var(--pa-accent);\n}\n\n._railMark_1e3bu_303[data-kind='turn'] {\n background: var(--pa-muted);\n}\n\n._railMark_1e3bu_303[data-kind='result'] {\n background: var(--pa-ok);\n}\n\n/* Divider between finished tasks and the current one. */\n._divider_1e3bu_373 {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 6px 0;\n color: var(--pa-muted);\n font-size: 10.5px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n\n._divider_1e3bu_373::before,\n._divider_1e3bu_373::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--pa-line);\n}\n\n/* Hover card for a rail tick. */\n._peek_1e3bu_393 {\n position: absolute;\n right: 26px;\n z-index: 6;\n width: min(260px, calc(100% - 56px));\n padding: 10px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-surface);\n box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);\n animation: _peekIn_1e3bu_1 0.16s ease-out both;\n}\n\n._peek_1e3bu_393[hidden] {\n display: none !important;\n}\n\n@keyframes _peekIn_1e3bu_1 {\n from {\n opacity: 0;\n transform: translateX(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n\n._peekHead_1e3bu_421 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._peekHead_1e3bu_421 strong {\n flex: 1;\n min-width: 0;\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._peekText_1e3bu_436 {\n margin: 6px 0 0;\n max-height: 4.2em;\n overflow: hidden;\n color: var(--pa-muted);\n font-size: 11.5px;\n line-height: 1.4;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);\n mask-image: linear-gradient(to bottom, #000 60%, transparent);\n}\n\n._pin_1e3bu_449 {\n flex: none;\n display: grid;\n place-items: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--pa-muted);\n cursor: pointer;\n}\n\n._pin_1e3bu_449:hover {\n background: rgba(255, 255, 255, 0.08);\n color: var(--pa-fg);\n}\n\n._pin_1e3bu_449[aria-pressed='true'] {\n color: var(--pa-accent);\n}\n\n._pin_1e3bu_449[aria-pressed='true'] svg {\n fill: currentColor;\n}\n\n._pin_1e3bu_449 svg {\n width: 14px;\n height: 14px;\n}\n\n/* Jump pill: appears while reading above, shows how many new events arrived. */\n._jump_1e3bu_482 {\n position: absolute;\n left: 50%;\n bottom: 10px;\n transform: translateX(-50%);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px 6px 9px;\n border: 0;\n border-radius: 999px;\n background: var(--pa-fg);\n color: var(--pa-surface);\n font-size: 11px;\n font-weight: 600;\n white-space: nowrap;\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);\n cursor: pointer;\n animation: _jumpIn_1e3bu_1 0.22s ease-out both;\n}\n\n._jump_1e3bu_482 svg {\n width: 14px;\n height: 14px;\n}\n\n._jump_1e3bu_482[hidden] {\n display: none !important;\n}\n\n@keyframes _jumpIn_1e3bu_1 {\n from {\n opacity: 0;\n transform: translate(-50%, 6px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n\n._empty_1e3bu_523 {\n margin: auto;\n padding: 24px 8px;\n text-align: center;\n color: var(--pa-muted);\n font-size: 13px;\n}\n\n._enter_1e3bu_531 {\n animation: _enter_1e3bu_531 0.2s ease-out both;\n}\n\n@keyframes _enter_1e3bu_531 {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n\n._bubble_1e3bu_546 {\n align-self: flex-end;\n max-width: 85%;\n padding: 8px 12px;\n border-radius: 14px 14px 4px 14px;\n background: var(--pa-raised);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._line_1e3bu_556 {\n font-size: 12px;\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._reflection_1e3bu_563 {\n padding-left: 8px;\n border-left: 2px solid var(--pa-line);\n}\n\n._observation_1e3bu_568 {\n font-size: 12px;\n}\n\n._warning_1e3bu_572 {\n color: var(--pa-warn);\n}\n\n._live_1e3bu_576 {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--pa-accent);\n}\n\n._live_1e3bu_576::before {\n content: '';\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--pa-accent);\n animation: _pulse_1e3bu_1 1.6s ease-in-out infinite;\n}\n\n@keyframes _pulse_1e3bu_1 {\n 0%,\n 100% {\n opacity: 0.35;\n }\n 50% {\n opacity: 1;\n }\n}\n\n/* Tool cards */\n\n._tool_1e3bu_605 {\n padding: 9px 11px;\n border: 1px solid var(--pa-line);\n border-radius: 11px;\n background: var(--pa-raised);\n font-size: 12px;\n}\n\n._tool_1e3bu_605[data-status='running'] {\n border-color: color-mix(in srgb, var(--pa-accent) 50%, transparent);\n}\n\n._tool_1e3bu_605[data-status='error'] {\n border-color: color-mix(in srgb, var(--pa-err) 55%, transparent);\n color: var(--pa-err);\n}\n\n._toolHead_1e3bu_622 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._toolDot_1e3bu_628 {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--pa-ok);\n}\n\n._toolLabel_1e3bu_636 {\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n\n._toolDetail_1e3bu_641 {\n margin-top: 5px;\n padding-left: 15px;\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._spinner_1e3bu_649 {\n flex: none;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--pa-accent);\n border-right-color: transparent;\n border-radius: 50%;\n animation: _spin_1e3bu_649 0.9s linear infinite;\n}\n\n@keyframes _spin_1e3bu_649 {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Question and result cards */\n\n._question_1e3bu_667 {\n padding: 2px 0 2px 12px;\n border-left: 2px solid var(--pa-accent);\n}\n\n._questionTag_1e3bu_672 {\n display: block;\n margin-bottom: 4px;\n color: var(--pa-accent);\n font-size: 11px;\n font-weight: 650;\n}\n\n._questionText_1e3bu_680 {\n margin: 0;\n font-size: 14px;\n}\n\n._result_1e3bu_685 {\n padding: 11px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-raised);\n font-size: 12px;\n}\n\n._result_1e3bu_685 strong {\n display: block;\n margin-bottom: 4px;\n font-size: 13px;\n}\n\n._result_1e3bu_685[data-kind='done'] strong {\n color: var(--pa-ok);\n}\n\n._result_1e3bu_685[data-kind='notDone'] strong,\n._result_1e3bu_685[data-kind='stopped'] strong {\n color: var(--pa-warn);\n}\n\n._result_1e3bu_685[data-kind='error'] strong {\n color: var(--pa-err);\n}\n\n._resultText_1e3bu_712 {\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n/* Composer (text input and voice toggle share this area) */\n\n._composer_1e3bu_720 {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 10px 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._answerContext_1e3bu_729 {\n font-size: 11px;\n color: var(--pa-accent);\n font-weight: 650;\n}\n\n._box_1e3bu_735 {\n display: flex;\n align-items: flex-end;\n gap: 6px;\n padding: 6px 6px 6px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 16px;\n background: var(--pa-raised);\n}\n\n._box_1e3bu_735:focus-within {\n outline: 2px solid var(--pa-accent);\n outline-offset: 2px;\n}\n\n._box_1e3bu_735 textarea {\n flex: 1;\n min-width: 0;\n min-height: 28px;\n max-height: 120px;\n resize: none;\n border: 0;\n outline: none;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 1.4;\n padding: 5px 0;\n}\n\n._box_1e3bu_735 textarea:disabled {\n opacity: 0.6;\n}\n\n._box_1e3bu_735 textarea::placeholder {\n color: var(--pa-muted);\n}\n\n._actions_1e3bu_774 {\n flex: none;\n display: flex;\n gap: 4px;\n}\n\n._attachList_1e3bu_780 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n._attachChip_1e3bu_787 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 100%;\n padding: 2px 4px 2px 8px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.08);\n font-size: 12px;\n line-height: 1.3;\n}\n\n._attachName_1e3bu_799 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n}\n\n._attachRemove_1e3bu_806 {\n display: grid;\n place-items: center;\n padding: 0;\n width: 20px;\n height: 20px;\n border: 0;\n border-radius: 50%;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.7;\n}\n\n._attachRemove_1e3bu_806:hover {\n opacity: 1;\n background: rgba(255, 255, 255, 0.1);\n}\n\n._attachRemove_1e3bu_806 svg {\n width: 12px;\n height: 12px;\n}\n\n._attachError_1e3bu_830 {\n color: #f5a3a3;\n font-size: 12px;\n line-height: 1.3;\n}\n\n._roundButton_1e3bu_836 {\n display: grid;\n place-items: center;\n padding: 0;\n width: 30px;\n height: 30px;\n border: 0;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.08);\n color: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n\n._roundButton_1e3bu_836[aria-pressed='true'] {\n background: color-mix(in srgb, var(--pa-accent) 35%, transparent);\n}\n\n._send_1e3bu_854 {\n background: var(--pa-accent);\n color: #20150e;\n font-weight: 800;\n}\n\n._roundButton_1e3bu_836:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Skills Studio (replaces feed + composer while authoring skills) */\n\n._studio_1e3bu_867 {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 10px 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._studioHeader_1e3bu_877 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n._studioTitle_1e3bu_884 {\n font-size: 14px;\n font-weight: 700;\n}\n\n._studioTabs_1e3bu_889 {\n display: flex;\n gap: 4px;\n}\n\n._studioTab_1e3bu_889 {\n flex: 1;\n padding: 6px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioTab_1e3bu_889[aria-selected='true'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n}\n\n._studioBody_1e3bu_911 {\n flex: 1;\n min-height: 0;\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n._studioHint_1e3bu_920 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 12px;\n line-height: 1.4;\n}\n\n._studioToolbar_1e3bu_927 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n._studioToolButton_1e3bu_933 {\n flex: none;\n padding: 6px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: var(--pa-raised);\n color: inherit;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioToolButton_1e3bu_933:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n._studioToolButton_1e3bu_933[data-variant='accent'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n}\n\n._studioToolButton_1e3bu_933[data-variant='danger'] {\n color: var(--pa-err);\n}\n\n._studioStatus_1e3bu_959 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 11px;\n line-height: 1.4;\n white-space: pre-wrap;\n}\n\n._studioStatus_1e3bu_959[data-tone='ok'] {\n color: var(--pa-ok);\n}\n\n._studioStatus_1e3bu_959[data-tone='warn'] {\n color: var(--pa-warn);\n}\n\n._studioStatus_1e3bu_959[data-tone='err'] {\n color: var(--pa-err);\n}\n\n._studioAsk_1e3bu_979 {\n width: 100%;\n min-height: 72px;\n resize: vertical;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-raised);\n color: inherit;\n font: inherit;\n line-height: 1.4;\n}\n\n._studioAsk_1e3bu_979:focus {\n outline: 2px solid var(--pa-accent);\n outline-offset: 2px;\n}\n\n._studioSteps_1e3bu_997,\n._studioCatalog_1e3bu_998 {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n line-height: 1.45;\n}\n\n._studioStep_1e3bu_997,\n._studioCatalogRow_1e3bu_1010 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.04);\n}\n\n._studioCatalogRow_1e3bu_1010 {\n padding: 6px 8px;\n gap: 6px;\n}\n\n._studioWatchers_1e3bu_1025 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: color-mix(in srgb, var(--pa-raised) 85%, transparent);\n}\n\n._studioWatchersHead_1e3bu_1035 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n._studioWatchersTitle_1e3bu_1042 {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--pa-muted);\n}\n\n._studioWatchersEmpty_1e3bu_1050 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 11px;\n}\n\n._studioWatchersList_1e3bu_1056 {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n._studioWatcherChip_1e3bu_1065 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n max-width: 100%;\n padding: 4px 6px 4px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.06);\n font-size: 11px;\n line-height: 1.3;\n}\n\n._studioWatcherLabel_1e3bu_1078 {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600;\n}\n\n._studioWatcherMeta_1e3bu_1086 {\n color: var(--pa-muted);\n font-size: 10px;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n\n._studioWatcherChip_1e3bu_1065 button {\n padding: 2px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 999px;\n background: transparent;\n color: inherit;\n font-size: 10px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioWatcherChip_1e3bu_1065 button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n._studioStepBody_1e3bu_1109,\n._studioCatalogBody_1e3bu_1110 {\n flex: 1;\n min-width: 0;\n}\n\n._studioStepKind_1e3bu_1115 {\n display: inline-block;\n margin-right: 6px;\n padding: 1px 6px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--pa-accent) 22%, transparent);\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n._studioStepMeta_1e3bu_1127,\n._studioCatalogMeta_1e3bu_1128 {\n color: var(--pa-muted);\n font-size: 11px;\n}\n\n._studioStepActions_1e3bu_1133,\n._studioCatalogActions_1e3bu_1134 {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n._studioStepActions_1e3bu_1133 button,\n._studioCatalogActions_1e3bu_1134 button {\n padding: 4px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n._studioCatalogActions_1e3bu_1134 button[data-variant='accent'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n font-weight: 700;\n}\n\n._studioStepActions_1e3bu_1133 button:disabled,\n._studioCatalogActions_1e3bu_1134 button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n@media (min-width: 768px) {\n ._wrapper_1e3bu_3[data-mode='skills-studio'] ._studioToolbar_1e3bu_927 {\n gap: 8px;\n }\n\n ._wrapper_1e3bu_3[data-mode='skills-studio'] ._studioToolButton_1e3bu_933 {\n padding: 7px 12px;\n }\n\n ._wrapper_1e3bu_3[data-mode='skills-studio'] ._studioCatalog_1e3bu_998 {\n gap: 5px;\n }\n}\n\n._studioPreviewLabel_1e3bu_1177 {\n margin: 0;\n font-size: 11px;\n font-weight: 700;\n color: var(--pa-muted);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n._studioPreview_1e3bu_1177 {\n margin: 0;\n max-height: 180px;\n overflow: auto;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: var(--pa-raised);\n font:\n 11px/1.45 ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* Voice stage (replaces the composer while voice is selected) */\n\n._voice_1e3bu_130 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._voiceMeta_1e3bu_1215 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n._lens_1e3bu_1223 {\n flex: none;\n display: grid;\n place-items: center;\n width: 30px;\n height: 30px;\n border-radius: 50%;\n color: var(--pa-muted);\n background: var(--pa-raised);\n border: 1px solid var(--pa-line);\n transition:\n border-color 0.3s ease,\n color 0.3s ease,\n opacity 0.3s ease;\n}\n\n._lens_1e3bu_1223 svg {\n width: 15px;\n height: 15px;\n}\n\n/* Microphone state: active breathes in accent, muted is dimmed, blocked or unavailable is red. */\n._lens_1e3bu_1223[data-state='active'] {\n color: var(--pa-accent);\n border-color: var(--pa-accent);\n animation: _breathe_1e3bu_1 2.8s ease-in-out infinite;\n}\n\n._lens_1e3bu_1223[data-state='muted'] {\n opacity: 0.5;\n}\n\n._lens_1e3bu_1223[data-state='denied'],\n._lens_1e3bu_1223[data-state='unsupported'] {\n color: var(--pa-err);\n border-color: var(--pa-err);\n}\n\n@keyframes _breathe_1e3bu_1 {\n 50% {\n transform: scale(1.06);\n }\n}\n\n._voiceText_1e3bu_1267 {\n min-width: 0;\n font-size: 12px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._micDevice_1e3bu_1276 {\n min-width: 0;\n max-width: 100%;\n align-self: start;\n padding: 0;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--pa-muted);\n font: inherit;\n font-size: 10.5px;\n font-weight: 500;\n line-height: 1.3;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n._micDevice_1e3bu_1276:disabled {\n cursor: default;\n opacity: 0.7;\n}\n\n._micDevice_1e3bu_1276:not(:disabled):hover {\n color: var(--pa-accent);\n}\n\n._textButton_1e3bu_1305 {\n flex: none;\n white-space: nowrap;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 9px;\n background: var(--pa-raised);\n color: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Pressed toggles (agent cursor visible, microphone on) read as on: tinted background and accent icon. */\n._iconButton_1e3bu_214[aria-pressed='true'] {\n background: color-mix(in srgb, var(--pa-accent) 22%, transparent);\n color: var(--pa-accent);\n}\n\n/* Floating button shown while the panel is closed. Snaps to a corner after dragging. */\n._fab_1e3bu_1324 {\n position: fixed;\n z-index: 2147483642;\n display: grid;\n place-items: center;\n width: 46px;\n height: 46px;\n padding: 0;\n border: 1px solid var(--pa-line);\n border-radius: 50%;\n background: var(--pa-surface);\n color: var(--pa-accent);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n touch-action: none;\n user-select: none;\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease;\n}\n\n._fab_1e3bu_1324:hover {\n transform: scale(1.06);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);\n}\n\n._fab_1e3bu_1324[hidden] {\n display: none !important;\n}\n\n._fab_1e3bu_1324 img {\n width: 26px;\n height: 26px;\n object-fit: contain;\n border-radius: 6px;\n pointer-events: none;\n}\n\n._fab_1e3bu_1324 svg {\n width: 20px;\n height: 20px;\n pointer-events: none;\n}\n\n._fabLeft_1e3bu_1368::after {\n left: 0;\n right: auto;\n}\n\n/* Icon hints: a short label on hover or keyboard focus. */\n._tip_1e3bu_1374:not(._fab_1e3bu_1324) {\n position: relative;\n}\n\n._tip_1e3bu_1374::after {\n content: attr(data-tip);\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n z-index: 10;\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--pa-fg);\n color: var(--pa-surface);\n font-size: 11px;\n font-weight: 550;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n._tipUp_1e3bu_1397::after {\n top: auto;\n bottom: calc(100% + 6px);\n}\n\n._tip_1e3bu_1374:hover::after,\n._tip_1e3bu_1374:focus-visible::after {\n opacity: 1;\n}\n\n._iconButton_1e3bu_214 svg,\n._roundButton_1e3bu_836 svg {\n display: block;\n}\n\n/* Light theme */\n\n@media (prefers-color-scheme: light) {\n ._wrapper_1e3bu_3 {\n --pa-fg: #171716;\n --pa-muted: #61615b;\n --pa-accent: #c25a16;\n --pa-surface: #ffffff;\n --pa-raised: #f1f0ec;\n --pa-line: rgba(23, 23, 22, 0.12);\n --pa-ok: #1f6b3a;\n --pa-warn: #7a5a00;\n --pa-err: #a33a2a;\n --pa-c-keyword: #c25a16;\n --pa-c-string: #1f6b3a;\n --pa-c-number: #7a5a00;\n --pa-c-key: #1f4f8a;\n --pa-c-bool: #a33a2a;\n --pa-c-comment: #7a796f;\n --pa-c-name: #171716;\n --pa-c-punct: #61615b;\n box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);\n }\n ._stopButton_1e3bu_232 {\n color: #a33a2a;\n }\n ._iconButton_1e3bu_214:hover {\n background: rgba(0, 0, 0, 0.06);\n }\n ._roundButton_1e3bu_836 {\n background: rgba(0, 0, 0, 0.06);\n }\n ._attachChip_1e3bu_787 {\n background: rgba(0, 0, 0, 0.06);\n }\n ._attachRemove_1e3bu_806:hover {\n background: rgba(0, 0, 0, 0.08);\n }\n ._attachError_1e3bu_830 {\n color: #b42318;\n }\n ._send_1e3bu_854 {\n color: #ffffff;\n }\n ._brand_1e3bu_161 {\n color: #ffffff;\n }\n}\n\n/* Mobile: follow modes (expanded / bar / fab), larger hit areas, no sticky hover tips. */\n\n@media (max-width: 480px) {\n ._wrapper_1e3bu_3 {\n left: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n width: auto;\n max-height: min(560px, calc(100svh - env(safe-area-inset-top, 0px) - 12px));\n border-radius: 18px 18px 0 0;\n border-bottom: 0;\n padding-bottom: env(safe-area-inset-bottom, 0px);\n background: color-mix(in srgb, var(--pa-surface) 92%, transparent);\n backdrop-filter: blur(18px);\n -webkit-backdrop-filter: blur(18px);\n }\n\n ._wrapper_1e3bu_3[data-follow='bar'] {\n left: 8px;\n right: 8px;\n bottom: max(10px, env(safe-area-inset-bottom, 0px));\n max-height: none;\n border-radius: 16px;\n border: 1px solid var(--pa-line);\n padding-bottom: 0;\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);\n }\n\n ._wrapper_1e3bu_3[data-follow='bar'] ._header_1e3bu_148,\n ._wrapper_1e3bu_3[data-follow='bar'] ._feedWrap_1e3bu_80,\n ._wrapper_1e3bu_3[data-follow='bar'] ._composer_1e3bu_720,\n ._wrapper_1e3bu_3[data-follow='bar'] ._voice_1e3bu_130,\n ._wrapper_1e3bu_3[data-follow='bar'] ._studio_1e3bu_867 {\n display: none !important;\n }\n\n ._wrapper_1e3bu_3[data-follow='bar'] ._followBar_1e3bu_85 {\n display: flex;\n }\n\n ._header_1e3bu_148 {\n height: 48px;\n gap: 6px;\n padding: 0 8px 0 12px;\n }\n\n ._brand_1e3bu_161 {\n width: 26px;\n height: 26px;\n border-radius: 8px;\n font-size: 13px;\n }\n\n ._title_1e3bu_185 {\n font-size: 13px;\n }\n\n ._status_1e3bu_200 {\n font-size: 10.5px;\n }\n\n /* Compact visuals with an expanded hit area (~44px) via ::before. */\n ._controls_1e3bu_208 {\n gap: 6px;\n }\n\n ._iconButton_1e3bu_214 {\n position: relative;\n min-width: 32px;\n min-height: 32px;\n width: 32px;\n height: 32px;\n border-radius: 9px;\n }\n\n ._iconButton_1e3bu_214::before {\n content: '';\n position: absolute;\n inset: -6px;\n }\n\n ._feed_1e3bu_80 {\n padding: 8px 10px 8px 8px;\n gap: 6px;\n }\n\n ._feedWrap_1e3bu_80 {\n min-height: 72px;\n max-height: 240px;\n }\n\n ._composer_1e3bu_720 {\n padding: 8px 8px 10px;\n }\n\n ._box_1e3bu_735 {\n padding: 4px 4px 4px 10px;\n border-radius: 14px;\n }\n\n ._actions_1e3bu_774 {\n gap: 8px;\n }\n\n ._roundButton_1e3bu_836 {\n position: relative;\n width: 40px;\n height: 40px;\n }\n\n ._roundButton_1e3bu_836::before {\n content: '';\n position: absolute;\n inset: -4px;\n }\n\n /* Voice expanded: large lens, status, device, Mute + Stop row. */\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voice_1e3bu_130 {\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 14px 18px;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._lens_1e3bu_1223 {\n width: 72px;\n height: 72px;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._lens_1e3bu_1223 svg {\n width: 28px;\n height: 28px;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voiceMeta_1e3bu_1215 {\n align-items: center;\n text-align: center;\n width: 100%;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voiceText_1e3bu_1267 {\n font-size: 15px;\n white-space: normal;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._micDevice_1e3bu_1276 {\n align-self: center;\n text-align: center;\n font-size: 12px;\n min-height: 28px;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1e3bu_130 {\n gap: 12px;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1e3bu_130 [data-role='voice-stop'] {\n display: grid;\n }\n\n ._wrapper_1e3bu_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1e3bu_130 [data-role='back'] {\n display: none;\n }\n\n ._voice_1e3bu_130 {\n gap: 8px;\n padding: 8px 10px 10px;\n }\n\n ._lens_1e3bu_1223 {\n width: 26px;\n height: 26px;\n }\n\n ._micDevice_1e3bu_1276 {\n min-height: 32px;\n padding: 6px 0;\n font-size: 11px;\n }\n\n ._followBar_1e3bu_85 {\n min-height: 60px;\n padding: 10px 12px;\n padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));\n }\n\n ._followBar_1e3bu_85 ._roundButton_1e3bu_836 {\n width: 40px;\n height: 40px;\n }\n\n /* Skills Studio: wrap toolbars, full-width preview, no horizontal overflow. */\n ._studio_1e3bu_867 {\n overflow-x: hidden;\n padding: 10px 10px 14px;\n gap: 8px;\n }\n\n ._studioTabs_1e3bu_889 {\n flex-wrap: wrap;\n gap: 6px;\n }\n\n ._studioTab_1e3bu_889 {\n flex: 1 1 auto;\n min-width: calc(33% - 6px);\n padding: 10px 8px;\n font-size: 12px;\n }\n\n ._studioToolbar_1e3bu_927 {\n gap: 8px;\n }\n\n ._studioToolButton_1e3bu_933 {\n flex: 1 1 auto;\n min-height: 40px;\n padding: 8px 12px;\n font-size: 13px;\n }\n\n ._studioStep_1e3bu_997,\n ._studioCatalogRow_1e3bu_1010 {\n flex-wrap: wrap;\n padding: 10px 12px;\n gap: 10px;\n }\n\n ._studioStepActions_1e3bu_1133,\n ._studioCatalogActions_1e3bu_1134 {\n width: 100%;\n justify-content: flex-start;\n gap: 6px;\n }\n\n ._studioStepActions_1e3bu_1133 button,\n ._studioCatalogActions_1e3bu_1134 button {\n min-height: 36px;\n padding: 6px 10px;\n font-size: 12px;\n }\n\n ._studioPreview_1e3bu_1177 {\n max-height: none;\n width: 100%;\n overflow-x: auto;\n }\n\n ._studioAsk_1e3bu_979 {\n min-height: 88px;\n }\n\n ._fab_1e3bu_1324 {\n width: 56px;\n height: 56px;\n bottom: max(16px, env(safe-area-inset-bottom, 0px));\n right: max(16px, env(safe-area-inset-right, 0px));\n background: color-mix(in srgb, var(--pa-surface) 88%, transparent);\n backdrop-filter: blur(14px);\n -webkit-backdrop-filter: blur(14px);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);\n }\n\n ._fab_1e3bu_1324 img {\n width: 28px;\n height: 28px;\n }\n\n ._fab_1e3bu_1324 svg {\n width: 24px;\n height: 24px;\n }\n\n ._tip_1e3bu_1374::after {\n display: none;\n }\n}\n\n@media (hover: none) {\n ._tip_1e3bu_1374::after {\n display: none;\n }\n}\n\n/* Desktop (≥768px): keep binary collapse; never show the mobile follow strip. */\n@media (min-width: 768px) {\n ._followBar_1e3bu_85 {\n display: none !important;\n }\n}\n\n/* Reduced motion: keep the state text; drop the animation */\n\n@media (prefers-reduced-motion: reduce) {\n ._wrapper_1e3bu_3,\n ._enter_1e3bu_531,\n ._live_1e3bu_576::before,\n ._lens_1e3bu_1223,\n ._spinner_1e3bu_649 {\n animation: none !important;\n transition: none !important;\n }\n}\n\n/* Script card: compact. Each block shows a preview that fades out; a click opens it, a second click closes it. */\n._code_1e3bu_1767 {\n padding: 6px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 9px;\n background: var(--pa-raised);\n font-size: 11px;\n line-height: 1.3;\n}\n\n._code_1e3bu_1767[data-status='running'] {\n border-color: color-mix(in srgb, var(--pa-accent) 50%, transparent);\n}\n\n._code_1e3bu_1767[data-status='error'],\n._code_1e3bu_1767[data-status='refused'] {\n border-color: color-mix(in srgb, var(--pa-err) 55%, transparent);\n}\n\n._codeHead_1e3bu_1785 {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n._codeTitle_1e3bu_1792 {\n font-weight: 600;\n color: var(--pa-accent);\n}\n\n._codeMeta_1e3bu_1797 {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--pa-muted);\n font-size: 10px;\n}\n\n._codeStatus_1e3bu_1807 {\n font-size: 10px;\n color: var(--pa-muted);\n}\n\n._code_1e3bu_1767[data-status='error'] ._codeStatus_1e3bu_1807,\n._code_1e3bu_1767[data-status='refused'] ._codeStatus_1e3bu_1807 {\n color: var(--pa-err);\n}\n\n._codeBadge_1e3bu_1817 {\n padding: 0 5px;\n margin-right: 4px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--pa-accent) 18%, transparent);\n color: var(--pa-accent);\n font-size: 9px;\n font-weight: 600;\n}\n\n._codeSection_1e3bu_1827 {\n margin-top: 4px;\n min-width: 0;\n}\n\n._codeLabel_1e3bu_1832 {\n display: block;\n margin-bottom: 2px;\n font-size: 9px;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--pa-muted);\n}\n\n._clip_1e3bu_1841 {\n position: relative;\n min-width: 0;\n}\n\n._codeBlock_1e3bu_1846,\n._resultBlock_1e3bu_1847 {\n margin: 0;\n padding: 4px 6px;\n border-radius: 6px;\n background: var(--pa-surface);\n border: 1px solid var(--pa-line);\n font:\n 10px/1.35 ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n color: var(--pa-c-name);\n}\n\n._clipBody_1e3bu_1864 {\n position: relative;\n max-height: 4.1em;\n overflow: hidden;\n cursor: pointer;\n}\n\n._clip_1e3bu_1841[data-open='true'] ._clipBody_1e3bu_1864 {\n max-height: 14em;\n overflow: auto;\n}\n\n._clip_1e3bu_1841[data-clipped='true'][data-open='false'] ._clipBody_1e3bu_1864::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1.5em;\n background: linear-gradient(to bottom, transparent, var(--pa-surface));\n pointer-events: none;\n}\n\n._clipToggle_1e3bu_1887 {\n margin-top: 2px;\n padding: 0;\n border: 0;\n background: none;\n color: var(--pa-muted);\n font: inherit;\n font-size: 10px;\n cursor: pointer;\n}\n\n._clipToggle_1e3bu_1887:hover {\n color: var(--pa-fg);\n}\n\n._resultBlock_1e3bu_1847[data-ok='false'] {\n color: var(--pa-err);\n}\n\n._tkComment_1e3bu_1906 {\n color: var(--pa-c-comment);\n font-style: italic;\n}\n\n._tkString_1e3bu_1911 {\n color: var(--pa-c-string);\n}\n\n._tkNumber_1e3bu_1915 {\n color: var(--pa-c-number);\n}\n\n._tkKeyword_1e3bu_1919 {\n color: var(--pa-c-keyword);\n}\n\n._tkName_1e3bu_1923 {\n color: var(--pa-c-name);\n}\n\n._tkPunct_1e3bu_1927 {\n color: var(--pa-c-punct);\n}\n\n._tkKey_1e3bu_1919 {\n color: var(--pa-c-key);\n}\n\n._tkBool_1e3bu_1935 {\n color: var(--pa-c-bool);\n}\n\n/* REVERSIBLE (2026-11-17, card scale): tool cards and script cards at 75% of their size, with their contents.\n Remove this block to return to full size. */\n._tool_1e3bu_605,\n._code_1e3bu_1767 {\n zoom: 0.75;\n}\n\n/* REVERSIBLE (2026-11-17, card folding): folded cards. Each card starts folded; its head shows the state. */\n._foldHead_1e3bu_1947 {\n cursor: pointer;\n user-select: none;\n}\n\n._foldHead_1e3bu_1947::after {\n content: '';\n flex: none;\n width: 6px;\n height: 6px;\n margin-left: auto;\n border-right: 1.5px solid var(--pa-muted);\n border-bottom: 1.5px solid var(--pa-muted);\n transform: rotate(45deg);\n transition: transform 0.22s ease;\n}\n\n._foldHead_1e3bu_1947:focus-visible {\n outline: 1px solid var(--pa-accent);\n outline-offset: 2px;\n border-radius: 4px;\n}\n\n._foldBody_1e3bu_1970 {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.24s ease;\n}\n\n._foldInner_1e3bu_1976 {\n min-height: 0;\n overflow: hidden;\n}\n\n._fold_1e3bu_1947[data-open='true'] > ._foldBody_1e3bu_1970,\n[data-open='true'] > ._foldBody_1e3bu_1970 {\n grid-template-rows: 1fr;\n}\n\n[data-open='true'] > ._foldHead_1e3bu_1947::after {\n transform: rotate(-135deg);\n}\n\n._toolState_1e3bu_1990 {\n margin-left: auto;\n font-size: 10px;\n color: var(--pa-muted);\n}\n\n._tool_1e3bu_605[data-status='done'] ._toolState_1e3bu_1990 {\n color: var(--pa-ok);\n}\n\n._tool_1e3bu_605[data-status='error'] ._toolState_1e3bu_1990 {\n color: var(--pa-err);\n}\n\n._codeRunning_1e3bu_2004,\n._codeDot_1e3bu_2005 {\n flex: none;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--pa-accent);\n}\n\n._codeDot_1e3bu_2005 {\n background: var(--pa-ok);\n animation: _pop_1e3bu_1 0.32s ease-out both;\n}\n\n._codeRunning_1e3bu_2004 {\n animation: _pulse_1e3bu_1 1.2s ease-in-out infinite;\n}\n\n._toolDot_1e3bu_628 {\n animation: _pop_1e3bu_1 0.32s ease-out both;\n}\n\n@keyframes _pop_1e3bu_1 {\n from {\n transform: scale(0.3);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes _pulse_1e3bu_1 {\n 0%,\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n 50% {\n opacity: 0.35;\n transform: scale(0.7);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n ._foldBody_1e3bu_1970,\n ._foldHead_1e3bu_1947::after {\n transition: none;\n }\n ._codeDot_1e3bu_2005,\n ._codeRunning_1e3bu_2004,\n ._toolDot_1e3bu_628 {\n animation: none;\n }\n}\n\n/* REVERSIBLE (2026-11-17, tool visuals): each tool has its own tone: a left stripe, a tinted icon chip and a short summary. */\n._tool_1e3bu_605,\n._code_1e3bu_1767 {\n --tone: var(--pa-muted);\n border-left: 2px solid var(--tone);\n}\n\n._tool_1e3bu_605[data-tone='js'],\n._code_1e3bu_1767[data-tone='js'] {\n --tone: #b58cff;\n}\n\n._tool_1e3bu_605[data-tone='task'] {\n --tone: var(--pa-accent);\n}\n\n._tool_1e3bu_605[data-tone='move'] {\n --tone: #7cb8ff;\n}\n\n._tool_1e3bu_605[data-tone='act'] {\n --tone: #7fd9a4;\n}\n\n._tool_1e3bu_605[data-tone='time'] {\n --tone: var(--pa-muted);\n}\n\n._tool_1e3bu_605[data-tone='done'] {\n --tone: var(--pa-ok);\n}\n\n._tool_1e3bu_605[data-tone='ask'] {\n --tone: var(--pa-warn);\n}\n\n._tool_1e3bu_605[data-tone='generic'] {\n --tone: var(--pa-muted);\n}\n\n._toolChip_1e3bu_2101 {\n flex: none;\n display: grid;\n place-items: center;\n width: 18px;\n height: 18px;\n border-radius: 6px;\n background: color-mix(in srgb, var(--tone) 18%, transparent);\n color: var(--tone);\n}\n\n._toolSummary_1e3bu_2112 {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--pa-muted);\n font-size: 10px;\n}\n\n._toolLabel_1e3bu_636 {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n._toolState_1e3bu_1990 {\n margin-left: auto;\n}")); document.head.appendChild(elementStyle); } } catch (e) { console.error("vite-plugin-css-injected-by-js", e); }})();
1
+ (function() { try { if (typeof document != "undefined") { var elementStyle = document.createElement("style"); elementStyle.appendChild(document.createTextNode("/* Page Agent panel. Design from the modern renderer; dark by default, light when the system asks for it. */\n\n._wrapper_1jypc_3 {\n overscroll-behavior: contain;\n --pa-fg: #f4f3ee;\n --pa-muted: #aaa9a1;\n --pa-accent: #fa8d45;\n --pa-surface: #191918;\n --pa-raised: #20201e;\n --pa-line: rgba(244, 243, 238, 0.12);\n --pa-ok: #b1d8b8;\n --pa-warn: #ead39a;\n --pa-err: #ffb9a9;\n --pa-radius: 18px;\n --pa-c-keyword: #fa8d45;\n --pa-c-string: #b1d8b8;\n --pa-c-number: #ead39a;\n --pa-c-key: #9ec5f0;\n --pa-c-bool: #ffb9a9;\n --pa-c-comment: #7d7c75;\n --pa-c-name: #f4f3ee;\n --pa-c-punct: #aaa9a1;\n\n position: fixed;\n bottom: 100px;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translateY(20px);\n opacity: 0;\n z-index: 2147483642;\n box-sizing: border-box;\n /* 100% of the fixed containing block — avoids the classic 100vw horizontal overflow on mobile. */\n width: min(414px, calc(100% - 24px));\n max-height: min(640px, calc(100svh - 120px));\n display: none;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--pa-line);\n border-radius: var(--pa-radius);\n background: var(--pa-surface);\n color: var(--pa-fg);\n box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);\n font:\n 13px/1.4 system-ui,\n -apple-system,\n 'Segoe UI',\n sans-serif;\n transition:\n opacity 0.2s ease,\n transform 0.2s ease,\n box-shadow 0.3s ease,\n width 0.2s ease;\n}\n\n@media (min-width: 481px) {\n ._wrapper_1jypc_3[data-mode='skills-studio'] {\n width: min(560px, calc(100vw - 24px));\n }\n}\n\n._wrapper_1jypc_3 *,\n._wrapper_1jypc_3 *::before,\n._wrapper_1jypc_3 *::after {\n box-sizing: border-box;\n}\n\n._wrapper_1jypc_3[data-state='running'] {\n box-shadow:\n 0 0 0 1px color-mix(in srgb, var(--pa-accent) 55%, transparent),\n 0 16px 40px rgba(0, 0, 0, 0.35);\n}\n\n._wrapper_1jypc_3[data-state='waiting'] {\n box-shadow:\n 0 0 0 1px color-mix(in srgb, var(--pa-accent) 80%, transparent),\n 0 16px 40px rgba(0, 0, 0, 0.35);\n}\n\n._wrapper_1jypc_3._collapsed_1jypc_80 ._feedWrap_1jypc_80 {\n display: none;\n}\n\n/* Follow bar (mobile peek strip). Hidden unless data-follow=\"bar\" on narrow viewports. */\n._followBar_1jypc_85 {\n display: none;\n flex: none;\n align-items: center;\n gap: 8px;\n min-height: 56px;\n padding: 8px 10px;\n padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));\n}\n\n._followBarBody_1jypc_95 {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n._followBarStatus_1jypc_110 {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._followBarLens_1jypc_120 {\n width: 28px;\n height: 28px;\n}\n\n._followBarLens_1jypc_120 svg {\n width: 14px;\n height: 14px;\n}\n\n._voiceActions_1jypc_130 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Voice stop is for the mobile expanded voice layout; desktop keeps Stop in the header. */\n._voiceActions_1jypc_130 [data-role='voice-stop'] {\n display: none;\n}\n\n[hidden] {\n display: none !important;\n}\n\n/* Header */\n\n._header_1jypc_148 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 52px;\n padding: 0 12px 0 14px;\n border-bottom: 1px solid var(--pa-line);\n cursor: grab;\n touch-action: none;\n user-select: none;\n}\n\n._brand_1jypc_161:has(img) {\n background: transparent;\n}\n\n._brand_1jypc_161 img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: inherit;\n}\n\n._brand_1jypc_161 {\n flex: none;\n width: 30px;\n height: 30px;\n display: grid;\n place-items: center;\n border-radius: 10px;\n background: var(--pa-accent);\n color: #20150e;\n font-weight: 800;\n font-size: 16px;\n}\n\n._titleBlock_1jypc_185 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n}\n\n._title_1jypc_185 {\n font-size: 12px;\n font-weight: 650;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._status_1jypc_200 {\n font-size: 10.5px;\n color: var(--pa-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._controls_1jypc_208 {\n flex: none;\n display: flex;\n gap: 2px;\n}\n\n._iconButton_1jypc_214 {\n display: grid;\n place-items: center;\n min-width: 28px;\n min-height: 28px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n\n._iconButton_1jypc_214:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n\n._stopButton_1jypc_232 {\n color: #ff8a80;\n}\n\n/* Feed */\n\n._feedWrap_1jypc_80 {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 120px;\n max-height: 380px;\n}\n\n._feed_1jypc_80 {\n position: relative;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px 18px 14px 14px;\n scroll-behavior: auto;\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, var(--pa-muted) 40%, transparent) transparent;\n}\n\n/* Right-edge rail: viewport thumb plus one marker per turn, question and result. Click a marker to jump. */\n._rail_1jypc_263 {\n position: absolute;\n top: 8px;\n bottom: 8px;\n right: 0;\n width: 16px;\n opacity: 0.55;\n transition: opacity 0.2s ease;\n}\n\n._rail_1jypc_263::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 6px;\n width: 2px;\n border-radius: 2px;\n background: var(--pa-line);\n}\n\n._feedWrap_1jypc_80:hover ._rail_1jypc_263,\n._feedWrap_1jypc_80:focus-within ._rail_1jypc_263 {\n opacity: 1;\n}\n\n._feedWrap_1jypc_80:hover ._rail_1jypc_263,\n._feedWrap_1jypc_80:focus-within ._rail_1jypc_263 {\n opacity: 1;\n}\n\n._railThumb_1jypc_294 {\n position: absolute;\n right: 6px;\n width: 2px;\n border-radius: 2px;\n background: var(--pa-muted);\n transition: top 0.12s ease;\n}\n\n._railMark_1jypc_303 {\n position: absolute;\n right: 2px;\n height: 3px;\n width: 10px;\n margin-top: -1px;\n padding: 0;\n border: 0;\n border-radius: 3px;\n background: var(--pa-muted);\n opacity: 0.7;\n cursor: pointer;\n transition:\n width 0.15s ease,\n opacity 0.15s ease,\n background-color 0.15s ease;\n}\n\n._railMark_1jypc_303[data-kind='turn'] {\n width: 14px;\n}\n\n._railMark_1jypc_303[data-kind='question'],\n._railMark_1jypc_303[data-kind='result'] {\n width: 6px;\n height: 6px;\n right: 4px;\n margin-top: -2px;\n border-radius: 50%;\n}\n\n._railMark_1jypc_303[data-kind='question'] {\n background: var(--pa-accent);\n opacity: 1;\n}\n\n._railMark_1jypc_303[data-kind='result'] {\n background: var(--pa-ok);\n opacity: 1;\n}\n\n._railMark_1jypc_303[data-active='true'] {\n width: 18px;\n opacity: 1;\n background: var(--pa-fg);\n}\n\n._railMark_1jypc_303[data-pinned='true'] {\n background: var(--pa-accent);\n opacity: 1;\n}\n\n._railMark_1jypc_303:hover {\n width: 18px;\n opacity: 1;\n}\n\n._railMark_1jypc_303[data-kind='question'] {\n background: var(--pa-accent);\n}\n\n._railMark_1jypc_303[data-kind='turn'] {\n background: var(--pa-muted);\n}\n\n._railMark_1jypc_303[data-kind='result'] {\n background: var(--pa-ok);\n}\n\n/* Divider between finished tasks and the current one. */\n._divider_1jypc_373 {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 6px 0;\n color: var(--pa-muted);\n font-size: 10.5px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n\n._divider_1jypc_373::before,\n._divider_1jypc_373::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--pa-line);\n}\n\n/* Hover card for a rail tick. */\n._peek_1jypc_393 {\n position: absolute;\n right: 26px;\n z-index: 6;\n width: min(260px, calc(100% - 56px));\n padding: 10px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-surface);\n box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);\n animation: _peekIn_1jypc_1 0.16s ease-out both;\n}\n\n._peek_1jypc_393[hidden] {\n display: none !important;\n}\n\n@keyframes _peekIn_1jypc_1 {\n from {\n opacity: 0;\n transform: translateX(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n\n._peekHead_1jypc_421 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._peekHead_1jypc_421 strong {\n flex: 1;\n min-width: 0;\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._peekText_1jypc_436 {\n margin: 6px 0 0;\n max-height: 4.2em;\n overflow: hidden;\n color: var(--pa-muted);\n font-size: 11.5px;\n line-height: 1.4;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);\n mask-image: linear-gradient(to bottom, #000 60%, transparent);\n}\n\n._pin_1jypc_449 {\n flex: none;\n display: grid;\n place-items: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--pa-muted);\n cursor: pointer;\n}\n\n._pin_1jypc_449:hover {\n background: rgba(255, 255, 255, 0.08);\n color: var(--pa-fg);\n}\n\n._pin_1jypc_449[aria-pressed='true'] {\n color: var(--pa-accent);\n}\n\n._pin_1jypc_449[aria-pressed='true'] svg {\n fill: currentColor;\n}\n\n._pin_1jypc_449 svg {\n width: 14px;\n height: 14px;\n}\n\n/* Jump pill: appears while reading above, shows how many new events arrived. */\n._jump_1jypc_482 {\n position: absolute;\n left: 50%;\n bottom: 10px;\n transform: translateX(-50%);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px 6px 9px;\n border: 0;\n border-radius: 999px;\n background: var(--pa-fg);\n color: var(--pa-surface);\n font-size: 11px;\n font-weight: 600;\n white-space: nowrap;\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);\n cursor: pointer;\n animation: _jumpIn_1jypc_1 0.22s ease-out both;\n}\n\n._jump_1jypc_482 svg {\n width: 14px;\n height: 14px;\n}\n\n._jump_1jypc_482[hidden] {\n display: none !important;\n}\n\n@keyframes _jumpIn_1jypc_1 {\n from {\n opacity: 0;\n transform: translate(-50%, 6px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n\n._empty_1jypc_523 {\n margin: auto;\n padding: 24px 8px;\n text-align: center;\n color: var(--pa-muted);\n font-size: 13px;\n}\n\n._enter_1jypc_531 {\n animation: _enter_1jypc_531 0.2s ease-out both;\n}\n\n@keyframes _enter_1jypc_531 {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n\n._bubble_1jypc_546 {\n align-self: flex-end;\n max-width: 85%;\n padding: 8px 12px;\n border-radius: 14px 14px 4px 14px;\n background: var(--pa-raised);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._line_1jypc_556 {\n font-size: 12px;\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._reflection_1jypc_563 {\n padding-left: 8px;\n border-left: 2px solid var(--pa-line);\n}\n\n._observation_1jypc_568 {\n font-size: 12px;\n}\n\n._warning_1jypc_572 {\n color: var(--pa-warn);\n}\n\n._live_1jypc_576 {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--pa-accent);\n}\n\n._live_1jypc_576::before {\n content: '';\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--pa-accent);\n animation: _pulse_1jypc_1 1.6s ease-in-out infinite;\n}\n\n@keyframes _pulse_1jypc_1 {\n 0%,\n 100% {\n opacity: 0.35;\n }\n 50% {\n opacity: 1;\n }\n}\n\n/* Tool cards */\n\n._tool_1jypc_605 {\n padding: 9px 11px;\n border: 1px solid var(--pa-line);\n border-radius: 11px;\n background: var(--pa-raised);\n font-size: 12px;\n}\n\n._tool_1jypc_605[data-status='running'] {\n border-color: color-mix(in srgb, var(--pa-accent) 50%, transparent);\n}\n\n._tool_1jypc_605[data-status='error'] {\n border-color: color-mix(in srgb, var(--pa-err) 55%, transparent);\n color: var(--pa-err);\n}\n\n._toolHead_1jypc_622 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._toolDot_1jypc_628 {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--pa-ok);\n}\n\n._toolLabel_1jypc_636 {\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n\n._toolDetail_1jypc_641 {\n margin-top: 5px;\n padding-left: 15px;\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n._spinner_1jypc_649 {\n flex: none;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--pa-accent);\n border-right-color: transparent;\n border-radius: 50%;\n animation: _spin_1jypc_649 0.9s linear infinite;\n}\n\n@keyframes _spin_1jypc_649 {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Question and result cards */\n\n._question_1jypc_667 {\n padding: 2px 0 2px 12px;\n border-left: 2px solid var(--pa-accent);\n}\n\n._questionTag_1jypc_672 {\n display: block;\n margin-bottom: 4px;\n color: var(--pa-accent);\n font-size: 11px;\n font-weight: 650;\n}\n\n._questionText_1jypc_680 {\n margin: 0;\n font-size: 14px;\n}\n\n._result_1jypc_685 {\n padding: 11px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-raised);\n font-size: 12px;\n}\n\n._result_1jypc_685 strong {\n display: block;\n margin-bottom: 4px;\n font-size: 13px;\n}\n\n._result_1jypc_685[data-kind='done'] strong {\n color: var(--pa-ok);\n}\n\n._result_1jypc_685[data-kind='notDone'] strong,\n._result_1jypc_685[data-kind='stopped'] strong {\n color: var(--pa-warn);\n}\n\n._result_1jypc_685[data-kind='error'] strong {\n color: var(--pa-err);\n}\n\n._resultText_1jypc_712 {\n color: var(--pa-muted);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n/* Composer (text input and voice toggle share this area) */\n\n._composer_1jypc_720 {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 10px 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._answerContext_1jypc_729 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 11px;\n color: var(--pa-accent);\n font-weight: 650;\n}\n\n._choiceRow_1jypc_738 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n._choiceChip_1jypc_744 {\n appearance: none;\n border: 1px solid var(--pa-line);\n background: var(--pa-raised);\n color: inherit;\n border-radius: 999px;\n padding: 6px 12px;\n font: inherit;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n min-height: 32px;\n}\n\n._choiceChip_1jypc_744:hover {\n border-color: var(--pa-accent);\n}\n\n._choiceChip_1jypc_744[data-selected='true'],\n._choiceChip_1jypc_744[aria-pressed='true'] {\n border-color: var(--pa-accent);\n background: color-mix(in srgb, var(--pa-accent) 16%, var(--pa-raised));\n color: var(--pa-accent);\n}\n\n._choiceConfirm_1jypc_769 {\n appearance: none;\n border: 0;\n background: var(--pa-accent);\n color: #fff;\n border-radius: 999px;\n padding: 6px 14px;\n font: inherit;\n font-size: 12px;\n font-weight: 700;\n cursor: pointer;\n min-height: 32px;\n}\n\n._choiceConfirm_1jypc_769:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n._box_1jypc_788 {\n display: flex;\n align-items: flex-end;\n gap: 6px;\n padding: 6px 6px 6px 12px;\n border: 1px solid var(--pa-line);\n border-radius: 16px;\n background: var(--pa-raised);\n}\n\n._box_1jypc_788:focus-within {\n outline: 2px solid var(--pa-accent);\n outline-offset: 2px;\n}\n\n._box_1jypc_788 textarea {\n flex: 1;\n min-width: 0;\n min-height: 28px;\n max-height: 120px;\n resize: none;\n border: 0;\n outline: none;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 1.4;\n padding: 5px 0;\n}\n\n._box_1jypc_788 textarea:disabled {\n opacity: 0.6;\n}\n\n._box_1jypc_788 textarea::placeholder {\n color: var(--pa-muted);\n}\n\n._actions_1jypc_827 {\n flex: none;\n display: flex;\n gap: 4px;\n}\n\n._attachList_1jypc_833 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n._attachChip_1jypc_840 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 100%;\n padding: 2px 4px 2px 8px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.08);\n font-size: 12px;\n line-height: 1.3;\n}\n\n._attachName_1jypc_852 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n}\n\n._attachRemove_1jypc_859 {\n display: grid;\n place-items: center;\n padding: 0;\n width: 20px;\n height: 20px;\n border: 0;\n border-radius: 50%;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.7;\n}\n\n._attachRemove_1jypc_859:hover {\n opacity: 1;\n background: rgba(255, 255, 255, 0.1);\n}\n\n._attachRemove_1jypc_859 svg {\n width: 12px;\n height: 12px;\n}\n\n._attachError_1jypc_883 {\n color: #f5a3a3;\n font-size: 12px;\n line-height: 1.3;\n}\n\n._roundButton_1jypc_889 {\n display: grid;\n place-items: center;\n padding: 0;\n width: 30px;\n height: 30px;\n border: 0;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.08);\n color: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n\n._roundButton_1jypc_889[aria-pressed='true'] {\n background: color-mix(in srgb, var(--pa-accent) 35%, transparent);\n}\n\n._send_1jypc_907 {\n background: var(--pa-accent);\n color: #20150e;\n font-weight: 800;\n}\n\n._roundButton_1jypc_889:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Skills Studio (replaces feed + composer while authoring skills) */\n\n._studio_1jypc_920 {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 10px 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._studioHeader_1jypc_930 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n._studioTitle_1jypc_937 {\n font-size: 14px;\n font-weight: 700;\n}\n\n._studioTabs_1jypc_942 {\n display: flex;\n gap: 4px;\n}\n\n._studioTab_1jypc_942 {\n flex: 1;\n padding: 6px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioTab_1jypc_942[aria-selected='true'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n}\n\n._studioBody_1jypc_964 {\n flex: 1;\n min-height: 0;\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n._studioHint_1jypc_973 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 12px;\n line-height: 1.4;\n}\n\n._studioToolbar_1jypc_980 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n._studioToolButton_1jypc_986 {\n flex: none;\n padding: 6px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: var(--pa-raised);\n color: inherit;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioToolButton_1jypc_986:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n._studioToolButton_1jypc_986[data-variant='accent'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n}\n\n._studioToolButton_1jypc_986[data-variant='danger'] {\n color: var(--pa-err);\n}\n\n._studioStatus_1jypc_1012 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 11px;\n line-height: 1.4;\n white-space: pre-wrap;\n}\n\n._studioStatus_1jypc_1012[data-tone='ok'] {\n color: var(--pa-ok);\n}\n\n._studioStatus_1jypc_1012[data-tone='warn'] {\n color: var(--pa-warn);\n}\n\n._studioStatus_1jypc_1012[data-tone='err'] {\n color: var(--pa-err);\n}\n\n._studioAsk_1jypc_1032 {\n width: 100%;\n min-height: 72px;\n resize: vertical;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: var(--pa-raised);\n color: inherit;\n font: inherit;\n line-height: 1.4;\n}\n\n._studioAsk_1jypc_1032:focus {\n outline: 2px solid var(--pa-accent);\n outline-offset: 2px;\n}\n\n._studioSteps_1jypc_1050,\n._studioCatalog_1jypc_1051 {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n line-height: 1.45;\n}\n\n._studioStep_1jypc_1050,\n._studioCatalogRow_1jypc_1063 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.04);\n}\n\n._studioCatalogRow_1jypc_1063 {\n padding: 6px 8px;\n gap: 6px;\n}\n\n._studioWatchers_1jypc_1078 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--pa-line);\n border-radius: 12px;\n background: color-mix(in srgb, var(--pa-raised) 85%, transparent);\n}\n\n._studioWatchersHead_1jypc_1088 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n._studioWatchersTitle_1jypc_1095 {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--pa-muted);\n}\n\n._studioWatchersEmpty_1jypc_1103 {\n margin: 0;\n color: var(--pa-muted);\n font-size: 11px;\n}\n\n._studioWatchersList_1jypc_1109 {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n._studioWatcherChip_1jypc_1118 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n max-width: 100%;\n padding: 4px 6px 4px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.06);\n font-size: 11px;\n line-height: 1.3;\n}\n\n._studioWatcherLabel_1jypc_1131 {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600;\n}\n\n._studioWatcherMeta_1jypc_1139 {\n color: var(--pa-muted);\n font-size: 10px;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n\n._studioWatcherChip_1jypc_1118 button {\n padding: 2px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 999px;\n background: transparent;\n color: inherit;\n font-size: 10px;\n font-weight: 600;\n cursor: pointer;\n}\n\n._studioWatcherChip_1jypc_1118 button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n._studioStepBody_1jypc_1162,\n._studioCatalogBody_1jypc_1163 {\n flex: 1;\n min-width: 0;\n}\n\n._studioStepKind_1jypc_1168 {\n display: inline-block;\n margin-right: 6px;\n padding: 1px 6px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--pa-accent) 22%, transparent);\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n._studioStepMeta_1jypc_1180,\n._studioCatalogMeta_1jypc_1181 {\n color: var(--pa-muted);\n font-size: 11px;\n}\n\n._studioStepActions_1jypc_1186,\n._studioCatalogActions_1jypc_1187 {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n._studioStepActions_1jypc_1186 button,\n._studioCatalogActions_1jypc_1187 button {\n padding: 4px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n._studioCatalogActions_1jypc_1187 button[data-variant='accent'] {\n background: color-mix(in srgb, var(--pa-accent) 28%, transparent);\n border-color: color-mix(in srgb, var(--pa-accent) 55%, var(--pa-line));\n font-weight: 700;\n}\n\n._studioStepActions_1jypc_1186 button:disabled,\n._studioCatalogActions_1jypc_1187 button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n@media (min-width: 768px) {\n ._wrapper_1jypc_3[data-mode='skills-studio'] ._studioToolbar_1jypc_980 {\n gap: 8px;\n }\n\n ._wrapper_1jypc_3[data-mode='skills-studio'] ._studioToolButton_1jypc_986 {\n padding: 7px 12px;\n }\n\n ._wrapper_1jypc_3[data-mode='skills-studio'] ._studioCatalog_1jypc_1051 {\n gap: 5px;\n }\n}\n\n._studioPreviewLabel_1jypc_1230 {\n margin: 0;\n font-size: 11px;\n font-weight: 700;\n color: var(--pa-muted);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n._studioPreview_1jypc_1230 {\n margin: 0;\n max-height: 180px;\n overflow: auto;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 10px;\n background: var(--pa-raised);\n font:\n 11px/1.45 ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* Voice stage (replaces the composer while voice is selected) */\n\n._voice_1jypc_130 {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 12px;\n border-top: 1px solid var(--pa-line);\n}\n\n._voiceMeta_1jypc_1268 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n._lens_1jypc_1276 {\n flex: none;\n display: grid;\n place-items: center;\n width: 30px;\n height: 30px;\n border-radius: 50%;\n color: var(--pa-muted);\n background: var(--pa-raised);\n border: 1px solid var(--pa-line);\n transition:\n border-color 0.3s ease,\n color 0.3s ease,\n opacity 0.3s ease;\n}\n\n._lens_1jypc_1276 svg {\n width: 15px;\n height: 15px;\n}\n\n/* Microphone state: active breathes in accent, muted is dimmed, blocked or unavailable is red. */\n._lens_1jypc_1276[data-state='active'] {\n color: var(--pa-accent);\n border-color: var(--pa-accent);\n animation: _breathe_1jypc_1 2.8s ease-in-out infinite;\n}\n\n._lens_1jypc_1276[data-state='muted'] {\n opacity: 0.5;\n}\n\n._lens_1jypc_1276[data-state='denied'],\n._lens_1jypc_1276[data-state='unsupported'] {\n color: var(--pa-err);\n border-color: var(--pa-err);\n}\n\n@keyframes _breathe_1jypc_1 {\n 50% {\n transform: scale(1.06);\n }\n}\n\n._voiceText_1jypc_1320 {\n min-width: 0;\n font-size: 12px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._micDevice_1jypc_1329 {\n min-width: 0;\n max-width: 100%;\n align-self: start;\n padding: 0;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--pa-muted);\n font: inherit;\n font-size: 10.5px;\n font-weight: 500;\n line-height: 1.3;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n._micDevice_1jypc_1329:disabled {\n cursor: default;\n opacity: 0.7;\n}\n\n._micDevice_1jypc_1329:not(:disabled):hover {\n color: var(--pa-accent);\n}\n\n._textButton_1jypc_1358 {\n flex: none;\n white-space: nowrap;\n padding: 8px 10px;\n border: 1px solid var(--pa-line);\n border-radius: 9px;\n background: var(--pa-raised);\n color: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Pressed toggles (agent cursor visible, microphone on) read as on: tinted background and accent icon. */\n._iconButton_1jypc_214[aria-pressed='true'] {\n background: color-mix(in srgb, var(--pa-accent) 22%, transparent);\n color: var(--pa-accent);\n}\n\n/* Floating button shown while the panel is closed. Snaps to a corner after dragging. */\n._fab_1jypc_1377 {\n position: fixed;\n z-index: 2147483642;\n display: grid;\n place-items: center;\n width: 46px;\n height: 46px;\n padding: 0;\n border: 1px solid var(--pa-line);\n border-radius: 50%;\n background: var(--pa-surface);\n color: var(--pa-accent);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);\n cursor: grab;\n touch-action: none;\n user-select: none;\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease;\n}\n\n._fab_1jypc_1377:hover {\n transform: scale(1.06);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);\n}\n\n._fab_1jypc_1377[hidden] {\n display: none !important;\n}\n\n._fab_1jypc_1377 img {\n width: 26px;\n height: 26px;\n object-fit: contain;\n border-radius: 6px;\n pointer-events: none;\n}\n\n._fab_1jypc_1377 svg {\n width: 20px;\n height: 20px;\n pointer-events: none;\n}\n\n._fabLeft_1jypc_1421::after {\n left: 0;\n right: auto;\n}\n\n/* Icon hints: a short label on hover or keyboard focus. */\n._tip_1jypc_1427:not(._fab_1jypc_1377) {\n position: relative;\n}\n\n._tip_1jypc_1427::after {\n content: attr(data-tip);\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n z-index: 10;\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--pa-fg);\n color: var(--pa-surface);\n font-size: 11px;\n font-weight: 550;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n._tipUp_1jypc_1450::after {\n top: auto;\n bottom: calc(100% + 6px);\n}\n\n._tip_1jypc_1427:hover::after,\n._tip_1jypc_1427:focus-visible::after {\n opacity: 1;\n}\n\n._iconButton_1jypc_214 svg,\n._roundButton_1jypc_889 svg {\n display: block;\n}\n\n/* Light theme */\n\n@media (prefers-color-scheme: light) {\n ._wrapper_1jypc_3 {\n --pa-fg: #171716;\n --pa-muted: #61615b;\n --pa-accent: #c25a16;\n --pa-surface: #ffffff;\n --pa-raised: #f1f0ec;\n --pa-line: rgba(23, 23, 22, 0.12);\n --pa-ok: #1f6b3a;\n --pa-warn: #7a5a00;\n --pa-err: #a33a2a;\n --pa-c-keyword: #c25a16;\n --pa-c-string: #1f6b3a;\n --pa-c-number: #7a5a00;\n --pa-c-key: #1f4f8a;\n --pa-c-bool: #a33a2a;\n --pa-c-comment: #7a796f;\n --pa-c-name: #171716;\n --pa-c-punct: #61615b;\n box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);\n }\n ._stopButton_1jypc_232 {\n color: #a33a2a;\n }\n ._iconButton_1jypc_214:hover {\n background: rgba(0, 0, 0, 0.06);\n }\n ._roundButton_1jypc_889 {\n background: rgba(0, 0, 0, 0.06);\n }\n ._attachChip_1jypc_840 {\n background: rgba(0, 0, 0, 0.06);\n }\n ._attachRemove_1jypc_859:hover {\n background: rgba(0, 0, 0, 0.08);\n }\n ._attachError_1jypc_883 {\n color: #b42318;\n }\n ._send_1jypc_907 {\n color: #ffffff;\n }\n ._brand_1jypc_161 {\n color: #ffffff;\n }\n}\n\n/* Mobile: follow modes (expanded / bar / fab), larger hit areas, no sticky hover tips. */\n\n@media (max-width: 480px) {\n ._wrapper_1jypc_3 {\n left: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n width: auto;\n max-height: min(560px, calc(100svh - env(safe-area-inset-top, 0px) - 12px));\n border-radius: 18px 18px 0 0;\n border-bottom: 0;\n padding-bottom: env(safe-area-inset-bottom, 0px);\n background: color-mix(in srgb, var(--pa-surface) 92%, transparent);\n backdrop-filter: blur(18px);\n -webkit-backdrop-filter: blur(18px);\n }\n\n ._wrapper_1jypc_3[data-follow='bar'] {\n left: 8px;\n right: 8px;\n bottom: max(10px, env(safe-area-inset-bottom, 0px));\n max-height: none;\n border-radius: 16px;\n border: 1px solid var(--pa-line);\n padding-bottom: 0;\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);\n }\n\n ._wrapper_1jypc_3[data-follow='bar'] ._header_1jypc_148,\n ._wrapper_1jypc_3[data-follow='bar'] ._feedWrap_1jypc_80,\n ._wrapper_1jypc_3[data-follow='bar'] ._composer_1jypc_720,\n ._wrapper_1jypc_3[data-follow='bar'] ._voice_1jypc_130,\n ._wrapper_1jypc_3[data-follow='bar'] ._studio_1jypc_920 {\n display: none !important;\n }\n\n ._wrapper_1jypc_3[data-follow='bar'] ._followBar_1jypc_85 {\n display: flex;\n }\n\n ._header_1jypc_148 {\n height: 48px;\n gap: 6px;\n padding: 0 8px 0 12px;\n }\n\n ._brand_1jypc_161 {\n width: 26px;\n height: 26px;\n border-radius: 8px;\n font-size: 13px;\n }\n\n ._title_1jypc_185 {\n font-size: 13px;\n }\n\n ._status_1jypc_200 {\n font-size: 10.5px;\n }\n\n /* Compact visuals with an expanded hit area (~44px) via ::before. */\n ._controls_1jypc_208 {\n gap: 6px;\n }\n\n ._iconButton_1jypc_214 {\n position: relative;\n min-width: 32px;\n min-height: 32px;\n width: 32px;\n height: 32px;\n border-radius: 9px;\n }\n\n ._iconButton_1jypc_214::before {\n content: '';\n position: absolute;\n inset: -6px;\n }\n\n ._feed_1jypc_80 {\n padding: 8px 10px 8px 8px;\n gap: 6px;\n }\n\n ._feedWrap_1jypc_80 {\n min-height: 72px;\n max-height: 240px;\n }\n\n ._composer_1jypc_720 {\n padding: 8px 8px 10px;\n }\n\n ._box_1jypc_788 {\n padding: 4px 4px 4px 10px;\n border-radius: 14px;\n }\n\n ._actions_1jypc_827 {\n gap: 8px;\n }\n\n ._roundButton_1jypc_889 {\n position: relative;\n width: 40px;\n height: 40px;\n }\n\n ._roundButton_1jypc_889::before {\n content: '';\n position: absolute;\n inset: -4px;\n }\n\n /* Voice expanded: large lens, status, device, Mute + Stop row. */\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voice_1jypc_130 {\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 14px 18px;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._lens_1jypc_1276 {\n width: 72px;\n height: 72px;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._lens_1jypc_1276 svg {\n width: 28px;\n height: 28px;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voiceMeta_1jypc_1268 {\n align-items: center;\n text-align: center;\n width: 100%;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voiceText_1jypc_1320 {\n font-size: 15px;\n white-space: normal;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._micDevice_1jypc_1329 {\n align-self: center;\n text-align: center;\n font-size: 12px;\n min-height: 28px;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1jypc_130 {\n gap: 12px;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1jypc_130 [data-role='voice-stop'] {\n display: grid;\n }\n\n ._wrapper_1jypc_3[data-mode='voice'][data-follow='expanded'] ._voiceActions_1jypc_130 [data-role='back'] {\n display: none;\n }\n\n ._voice_1jypc_130 {\n gap: 8px;\n padding: 8px 10px 10px;\n }\n\n ._lens_1jypc_1276 {\n width: 26px;\n height: 26px;\n }\n\n ._micDevice_1jypc_1329 {\n min-height: 32px;\n padding: 6px 0;\n font-size: 11px;\n }\n\n ._followBar_1jypc_85 {\n min-height: 60px;\n padding: 10px 12px;\n padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));\n }\n\n ._followBar_1jypc_85 ._roundButton_1jypc_889 {\n width: 40px;\n height: 40px;\n }\n\n /* Skills Studio: wrap toolbars, full-width preview, no horizontal overflow. */\n ._studio_1jypc_920 {\n overflow-x: hidden;\n padding: 10px 10px 14px;\n gap: 8px;\n }\n\n ._studioTabs_1jypc_942 {\n flex-wrap: wrap;\n gap: 6px;\n }\n\n ._studioTab_1jypc_942 {\n flex: 1 1 auto;\n min-width: calc(33% - 6px);\n padding: 10px 8px;\n font-size: 12px;\n }\n\n ._studioToolbar_1jypc_980 {\n gap: 8px;\n }\n\n ._studioToolButton_1jypc_986 {\n flex: 1 1 auto;\n min-height: 40px;\n padding: 8px 12px;\n font-size: 13px;\n }\n\n ._studioStep_1jypc_1050,\n ._studioCatalogRow_1jypc_1063 {\n flex-wrap: wrap;\n padding: 10px 12px;\n gap: 10px;\n }\n\n ._studioStepActions_1jypc_1186,\n ._studioCatalogActions_1jypc_1187 {\n width: 100%;\n justify-content: flex-start;\n gap: 6px;\n }\n\n ._studioStepActions_1jypc_1186 button,\n ._studioCatalogActions_1jypc_1187 button {\n min-height: 36px;\n padding: 6px 10px;\n font-size: 12px;\n }\n\n ._studioPreview_1jypc_1230 {\n max-height: none;\n width: 100%;\n overflow-x: auto;\n }\n\n ._studioAsk_1jypc_1032 {\n min-height: 88px;\n }\n\n ._fab_1jypc_1377 {\n width: 56px;\n height: 56px;\n bottom: max(16px, env(safe-area-inset-bottom, 0px));\n right: max(16px, env(safe-area-inset-right, 0px));\n background: color-mix(in srgb, var(--pa-surface) 88%, transparent);\n backdrop-filter: blur(14px);\n -webkit-backdrop-filter: blur(14px);\n box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);\n }\n\n ._fab_1jypc_1377 img {\n width: 28px;\n height: 28px;\n }\n\n ._fab_1jypc_1377 svg {\n width: 24px;\n height: 24px;\n }\n\n ._tip_1jypc_1427::after {\n display: none;\n }\n}\n\n@media (hover: none) {\n ._tip_1jypc_1427::after {\n display: none;\n }\n}\n\n/* Desktop (≥768px): keep binary collapse; never show the mobile follow strip. */\n@media (min-width: 768px) {\n ._followBar_1jypc_85 {\n display: none !important;\n }\n}\n\n/* Reduced motion: keep the state text; drop the animation */\n\n@media (prefers-reduced-motion: reduce) {\n ._wrapper_1jypc_3,\n ._enter_1jypc_531,\n ._live_1jypc_576::before,\n ._lens_1jypc_1276,\n ._spinner_1jypc_649 {\n animation: none !important;\n transition: none !important;\n }\n}\n\n/* Script card: compact. Each block shows a preview that fades out; a click opens it, a second click closes it. */\n._code_1jypc_1820 {\n padding: 6px 8px;\n border: 1px solid var(--pa-line);\n border-radius: 9px;\n background: var(--pa-raised);\n font-size: 11px;\n line-height: 1.3;\n}\n\n._code_1jypc_1820[data-status='running'] {\n border-color: color-mix(in srgb, var(--pa-accent) 50%, transparent);\n}\n\n._code_1jypc_1820[data-status='error'],\n._code_1jypc_1820[data-status='refused'] {\n border-color: color-mix(in srgb, var(--pa-err) 55%, transparent);\n}\n\n._codeHead_1jypc_1838 {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n._codeTitle_1jypc_1845 {\n font-weight: 600;\n color: var(--pa-accent);\n}\n\n._codeMeta_1jypc_1850 {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--pa-muted);\n font-size: 10px;\n}\n\n._codeStatus_1jypc_1860 {\n font-size: 10px;\n color: var(--pa-muted);\n}\n\n._code_1jypc_1820[data-status='error'] ._codeStatus_1jypc_1860,\n._code_1jypc_1820[data-status='refused'] ._codeStatus_1jypc_1860 {\n color: var(--pa-err);\n}\n\n._codeBadge_1jypc_1870 {\n padding: 0 5px;\n margin-right: 4px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--pa-accent) 18%, transparent);\n color: var(--pa-accent);\n font-size: 9px;\n font-weight: 600;\n}\n\n._codeSection_1jypc_1880 {\n margin-top: 4px;\n min-width: 0;\n}\n\n._codeLabel_1jypc_1885 {\n display: block;\n margin-bottom: 2px;\n font-size: 9px;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--pa-muted);\n}\n\n._clip_1jypc_1894 {\n position: relative;\n min-width: 0;\n}\n\n._codeBlock_1jypc_1899,\n._resultBlock_1jypc_1900 {\n margin: 0;\n padding: 4px 6px;\n border-radius: 6px;\n background: var(--pa-surface);\n border: 1px solid var(--pa-line);\n font:\n 10px/1.35 ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n color: var(--pa-c-name);\n}\n\n._clipBody_1jypc_1917 {\n position: relative;\n max-height: 4.1em;\n overflow: hidden;\n cursor: pointer;\n}\n\n._clip_1jypc_1894[data-open='true'] ._clipBody_1jypc_1917 {\n max-height: 14em;\n overflow: auto;\n}\n\n._clip_1jypc_1894[data-clipped='true'][data-open='false'] ._clipBody_1jypc_1917::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1.5em;\n background: linear-gradient(to bottom, transparent, var(--pa-surface));\n pointer-events: none;\n}\n\n._clipToggle_1jypc_1940 {\n margin-top: 2px;\n padding: 0;\n border: 0;\n background: none;\n color: var(--pa-muted);\n font: inherit;\n font-size: 10px;\n cursor: pointer;\n}\n\n._clipToggle_1jypc_1940:hover {\n color: var(--pa-fg);\n}\n\n._resultBlock_1jypc_1900[data-ok='false'] {\n color: var(--pa-err);\n}\n\n._tkComment_1jypc_1959 {\n color: var(--pa-c-comment);\n font-style: italic;\n}\n\n._tkString_1jypc_1964 {\n color: var(--pa-c-string);\n}\n\n._tkNumber_1jypc_1968 {\n color: var(--pa-c-number);\n}\n\n._tkKeyword_1jypc_1972 {\n color: var(--pa-c-keyword);\n}\n\n._tkName_1jypc_1976 {\n color: var(--pa-c-name);\n}\n\n._tkPunct_1jypc_1980 {\n color: var(--pa-c-punct);\n}\n\n._tkKey_1jypc_1972 {\n color: var(--pa-c-key);\n}\n\n._tkBool_1jypc_1988 {\n color: var(--pa-c-bool);\n}\n\n/* REVERSIBLE (2026-11-17, card scale): tool cards and script cards at 75% of their size, with their contents.\n Remove this block to return to full size. */\n._tool_1jypc_605,\n._code_1jypc_1820 {\n zoom: 0.75;\n}\n\n/* REVERSIBLE (2026-11-17, card folding): folded cards. Each card starts folded; its head shows the state. */\n._foldHead_1jypc_2000 {\n cursor: pointer;\n user-select: none;\n}\n\n._foldHead_1jypc_2000::after {\n content: '';\n flex: none;\n width: 6px;\n height: 6px;\n margin-left: auto;\n border-right: 1.5px solid var(--pa-muted);\n border-bottom: 1.5px solid var(--pa-muted);\n transform: rotate(45deg);\n transition: transform 0.22s ease;\n}\n\n._foldHead_1jypc_2000:focus-visible {\n outline: 1px solid var(--pa-accent);\n outline-offset: 2px;\n border-radius: 4px;\n}\n\n._foldBody_1jypc_2023 {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.24s ease;\n}\n\n._foldInner_1jypc_2029 {\n min-height: 0;\n overflow: hidden;\n}\n\n._fold_1jypc_2000[data-open='true'] > ._foldBody_1jypc_2023,\n[data-open='true'] > ._foldBody_1jypc_2023 {\n grid-template-rows: 1fr;\n}\n\n[data-open='true'] > ._foldHead_1jypc_2000::after {\n transform: rotate(-135deg);\n}\n\n._toolState_1jypc_2043 {\n margin-left: auto;\n font-size: 10px;\n color: var(--pa-muted);\n}\n\n._tool_1jypc_605[data-status='done'] ._toolState_1jypc_2043 {\n color: var(--pa-ok);\n}\n\n._tool_1jypc_605[data-status='error'] ._toolState_1jypc_2043 {\n color: var(--pa-err);\n}\n\n._codeRunning_1jypc_2057,\n._codeDot_1jypc_2058 {\n flex: none;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--pa-accent);\n}\n\n._codeDot_1jypc_2058 {\n background: var(--pa-ok);\n animation: _pop_1jypc_1 0.32s ease-out both;\n}\n\n._codeRunning_1jypc_2057 {\n animation: _pulse_1jypc_1 1.2s ease-in-out infinite;\n}\n\n._toolDot_1jypc_628 {\n animation: _pop_1jypc_1 0.32s ease-out both;\n}\n\n@keyframes _pop_1jypc_1 {\n from {\n transform: scale(0.3);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes _pulse_1jypc_1 {\n 0%,\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n 50% {\n opacity: 0.35;\n transform: scale(0.7);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n ._foldBody_1jypc_2023,\n ._foldHead_1jypc_2000::after {\n transition: none;\n }\n ._codeDot_1jypc_2058,\n ._codeRunning_1jypc_2057,\n ._toolDot_1jypc_628 {\n animation: none;\n }\n}\n\n/* REVERSIBLE (2026-11-17, tool visuals): each tool has its own tone: a left stripe, a tinted icon chip and a short summary. */\n._tool_1jypc_605,\n._code_1jypc_1820 {\n --tone: var(--pa-muted);\n border-left: 2px solid var(--tone);\n}\n\n._tool_1jypc_605[data-tone='js'],\n._code_1jypc_1820[data-tone='js'] {\n --tone: #b58cff;\n}\n\n._tool_1jypc_605[data-tone='task'] {\n --tone: var(--pa-accent);\n}\n\n._tool_1jypc_605[data-tone='move'] {\n --tone: #7cb8ff;\n}\n\n._tool_1jypc_605[data-tone='act'] {\n --tone: #7fd9a4;\n}\n\n._tool_1jypc_605[data-tone='time'] {\n --tone: var(--pa-muted);\n}\n\n._tool_1jypc_605[data-tone='done'] {\n --tone: var(--pa-ok);\n}\n\n._tool_1jypc_605[data-tone='ask'] {\n --tone: var(--pa-warn);\n}\n\n._tool_1jypc_605[data-tone='generic'] {\n --tone: var(--pa-muted);\n}\n\n._toolChip_1jypc_2154 {\n flex: none;\n display: grid;\n place-items: center;\n width: 18px;\n height: 18px;\n border-radius: 6px;\n background: color-mix(in srgb, var(--tone) 18%, transparent);\n color: var(--tone);\n}\n\n._toolSummary_1jypc_2165 {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--pa-muted);\n font-size: 10px;\n}\n\n._toolLabel_1jypc_636 {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n._toolState_1jypc_2043 {\n margin-left: auto;\n}")); document.head.appendChild(elementStyle); } } catch (e) { console.error("vite-plugin-css-injected-by-js", e); }})();
2
2
  import * as z from "zod/v4";
3
3
  import chalk from "chalk";
4
4
  //#region \0rolldown/runtime.js
@@ -442,7 +442,7 @@ function parseLLMConfig(config) {
442
442
  }
443
443
  //#endregion
444
444
  //#region ../core/src/prompts/system_prompt.md?raw
445
- var system_prompt_default = "You are an AI agent designed to operate in an iterative loop to automate browser tasks. Your ultimate goal is accomplishing the task provided in <user_request>.\n\n<intro>\nYou excel at following tasks:\n1. Navigating complex websites and extracting precise information\n2. Automating form submissions and interactive web actions\n3. Gathering and saving information \n4. Operate effectively in an agent loop\n5. Efficiently performing diverse web tasks\n</intro>\n\n<language_settings>\n- Default working language: **English**\n- Use the language that user is using. Return in user's language.\n</language_settings>\n\n<input>\nAt every step, your input will consist of: \n1. <agent_history>: A chronological event stream including your previous actions and their results.\n2. <agent_state>: Current <user_request> and <step_info>.\n3. <browser_state>: Current URL, interactive elements indexed for actions, and visible page content.\n</input>\n\n<agent_history>\nAgent history will be given as a list of step information as follows:\n\n<step_{step_number}>:\nEvaluation of Previous Step: Assessment of last action\nMemory: Your memory of this step\nNext Goal: Your goal for this step\nAction Results: Your actions and their results\n</step_{step_number}>\n\nand system messages wrapped in <sys> tag.\n</agent_history>\n\n<user_request>\nUSER REQUEST: This is your ultimate objective and always remains visible.\n- This has the highest priority. Make the user happy.\n- If the user request is very specific - then carefully follow each step and don't skip or hallucinate steps.\n- If the task is open ended you can plan yourself how to get it done.\n</user_request>\n\n<browser_state>\n1. Browser State will be given as:\n\nCurrent URL: URL of the page you are currently viewing.\nInteractive Elements: All interactive elements will be provided in format as [index]<type>text</type> where\n- index: Numeric identifier for interaction\n- type: HTML element type (button, input, etc.)\n- text: Element description\n\nExamples:\n[33]<div>User form</div>\n\\t*[35]<button aria-label='Submit form'>Submit</button>\n\nNote that:\n- Only elements with numeric indexes in [] are interactive\n- (stacked) indentation (with \\t) is important and means that the element is a (html) child of the element above (with a lower index)\n- Elements tagged with `*[` are the new clickable elements that appeared on the website since the last step - if url has not changed.\n- Pure text elements without [] are not interactive.\n</browser_state>\n\n<browser_rules>\nStrictly follow these rules while using the browser and navigating the web:\n- Only interact with elements that have a numeric [index] assigned.\n- Only use indexes that are explicitly provided.\n- If the page changes after, for example, an input text action, analyze if you need to interact with new elements, e.g. selecting the right option from the list.\n- Check the observation scope: a full-page tree can include elements outside the viewport. A viewport annotation describes geometry, not whether the user can see an unobscured element. When asked to navigate to or show an element, measure its position, scroll if needed, and verify its position again before reporting success. For reading or summarizing, content in the full-page tree can be used without scrolling.\n- You can scroll by a specific number of pages using the num_pages parameter (e.g., 0.5 for half page, 2.0 for two pages).\n- All the elements that are scrollable are marked with `data-scrollable` attribute. Including the scrollable distance in every directions. You can scroll *the element* in case some area are overflowed.\n- If a captcha appears, tell user you can not solve captcha. Finish the task and ask user to solve it.\n- If the page is not fully loaded, use the `wait` action.\n- Do not repeat one action for more than 3 times unless some conditions changed.\n- If you fill an input field and your action sequence is interrupted, most often something changed e.g. suggestions popped up under the field.\n- If the <user_request> includes specific page information such as product type, rating, price, location, etc., try to apply filters to be more efficient.\n- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.\n- If you input_text into a field, you might need to press enter, click the search button, or select from dropdown for completion.\n- Don't login into a page if you don't have to. Don't login if you don't have the credentials. \n- There are 2 types of tasks always first think which type of request you are dealing with:\n1. Very specific step by step instructions:\n- Follow them as very precise and don't skip steps. Try to complete everything as requested.\n2. Open ended tasks. Plan yourself, be creative in achieving them.\n- If you get stuck e.g. with logins or captcha in open-ended tasks you can re-evaluate the task and try alternative ways, e.g. sometimes accidentally login pops up, even though there some part of the page is accessible or you get some information via web search.\n</browser_rules>\n\n\n<!-- REVERSIBLE: <script_evidence> added 2026-11-17 (merged the position and javascript blocks). To revert, delete this block and its entry in docs/ALMA.md. -->\n<script_evidence>\nUse execute_javascript to check facts the text does not prove. Procedure: measure, compare, decide, cite.\n1. Measure with a short read-only script that returns the numbers or booleans you need.\n2. Compare them. If the comparison is false, the goal is not met: measure again or act.\n3. Done text: cite the measured values in plain language. Never quote state markers such as [End of page], and never quote these rules as evidence.\n Only numbers returned by a tool in this task may appear as evidence. If no measurement was returned, say so.\nCases:\n- End of page: scrollY + innerHeight >= scrollHeight - 2\n- Top of page: scrollY === 0\n- Element visible: rect.top < innerHeight && rect.bottom > 0\n- Form field: value, checkValidity(), validationMessage, required, disabled\n- Control state: aria-expanded, aria-selected, aria-checked, aria-current, disabled\n- Shown or hidden: getComputedStyle(el).display, visibility, opacity\n- Count: querySelectorAll(selector).length against the number requested\n- Text in a container: container.textContent.includes(...), never the whole body\n- Hover reveal: dispatch pointerenter and mouseover, then measure what appears\n- Fixed or sticky navbar: computed position and rect.top after scrolling\n- Dialog open: dialog.open, or role=\"dialog\" with a visible rect\n- Component data: data-* and aria-* attributes, computed styles\nFor long moves, one script may scroll to the target and return the measured numbers. Choose one script or measured steps by the request, including for checks.\nRead and move only. Never submit, send data, click controls that change data, or read passwords, tokens or sensitive fields.\nIf a script fails or returns nothing useful, use the normal actions and say so.\n<\/script_evidence>\n\n<!-- REVERSIBLE: <task_intake> and <script_use_case> added 2026-11-17. To revert, delete both blocks and restore the previous task_intake from docs/ALMA.md. -->\n<task_intake>\nAt the first step, turn the user request into a goal you can check. Write it in memory in one sentence: the goal, the stop condition, and what you do not know yet.\n- Use the site rules and the page data. Do not invent names, addresses, numbers, sections or results.\n- If the request names something, search the page for a candidate that matches the words. One clear candidate: use it. Several or none: ask the user with ask_user.\n- If a fact is neither on the page nor in the rules, say you did not find it.\n- Investigate with read-only checks. After 5 investigation actions without a clear answer, ask the user with ask_user.\n</task_intake>\n\n<script_use_case>\nexecute_javascript is your most general tool. It can explore the page in detail and do things the common tools cannot. Use it when one script does the job better than several steps.\n- Explore: query the DOM by text, role, aria or data attributes; read hidden and visible elements, structure, computed styles, attributes and state of components. Scripts may be concise or complex, as the question needs.\n- Navigate: go to a target in one script with window.scrollTo, or move through a container, then return the measured position in the same result. Bringing one indexed element into view without that measurement is scroll_into_view.\n- Act beyond the common tools: read computed styles, attributes and component state, or fire the input and change events a custom control expects. Hover, a key, a double-click, a drag, focus, a native checkbox or radio, a native range, scroll-into-view and a wheel event stay on their indexed tools. Do this only for the action the user asked for.\n- Repeat: a loop inside the script with a maximum number of iterations, stopping when the condition is met, then returning the final measure.\nUse the common tools for single steps that need an indexed element from the page state (click_element_by_index, input_text, select_dropdown_option, drag_element, hover_element, press_key, double_click_element, focus_element, set_checked, set_range, scroll_into_view, wheel), for plain scrolling, for waiting, and for questions to the user (ask_user).\nTo drag one element onto another, call drag_element with the indexes of this step. Do not write a DragEvent script for that. If html5 is not applied, the next step may call drag_element once with mode pointer-paced. Neither result proves the page accepted the drag.\nTo hover, press one key, or double-click an indexed element, call that tool. The event is synthetic: CSS :hover does not open, and a key does not type, move focus, or activate a control.\nTo focus an indexed element, call focus_element. The message says whether it was focused right after.\nTo set a native checkbox or radio, call set_checked. To set a native range, call set_range. The message says whether the control held that state right after. It does not show that a form was saved.\nTo bring an indexed element into view, call scroll_into_view. The message gives the window scroll before and after. Nested scrollers are not measured.\nTo send a wheel event a component listens for, call wheel. It does not scroll. Use scroll to move the page.\nChoose per task: one script when the goal is clear; measured steps when the answer depends on what appears along the way.\nEvery task ends with a measurement that proves the stop condition. If the condition is not met and you can still act, act: move the rest of the distance with a script, then measure again. \"Pages below\" in the page state tells you how far is left.\nNever submit forms, send user data, click controls that change data, or read passwords, tokens or sensitive fields, unless the user asked for that exact action.\nIf the result starts with blocked_by_csp, user_denied or unavailable, do not call execute_javascript again on this page. The user cannot allow that script on the page. Use the indexed tools.\nIf a script fails for another reason, read the error, fix the script once and retry. Then use the common tools.\nFinish with notDone only when you are blocked, and list what you tried.\n<\/script_use_case>\n\n\n<capability>\n- You can only handle single page app. Do not jump out of current page.\n- Do not click on link if it will open in a new page (e.g., <a target=\"_blank\">)\n- It is ok to fail the task.\n - User can be wrong. If the request of user is not achievable, inappropriate or you do not have enough information or tools to achieve it. Tell user to make a better request.\n - Webpage can be broken. All webpages or apps have bugs. Some bug will make it hard for your job. It's encouraged to tell user the problem of current page. Your feedbacks (including failing) are valuable for user.\n - Trying too hard can be harmful. Repeating some action back and forth or pushing for a complex procedure with little knowledge can cause unwanted results and harmful side-effects. User would rather you complete the task with a fail.\n- If you do not have knowledge for the current webpage or task. You must require user to give specific instructions and detailed steps.\n</capability>\n\n<task_completion_rules>\nYou must call the `done` action in one of three cases:\n- When you have fully completed the USER REQUEST.\n- When you reach the final allowed step (`max_steps`), even if the task is incomplete.\n- When you feel stuck or unable to solve user request. Or user request is not clear or contains inappropriate content.\n- If it is ABSOLUTELY IMPOSSIBLE to continue.\n\nThe `done` action is your opportunity to terminate and share your findings with the user.\n- Set `success` to `true` only if the full USER REQUEST has been completed with no missing components.\n- If any part of the request is missing, incomplete, or uncertain, set `success` to `false`.\n- You can use the `text` field of the `done` action to communicate your findings and to provide a coherent reply to the user and fulfill the USER REQUEST.\n- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.\n- If the user asks for specified format, such as \"return JSON with following structure\", \"return a list of format...\", MAKE sure to use the right format in your answer.\n- If the user asks for a structured output, your `done` action's schema may be modified. Take this schema into account when solving the task!\n</task_completion_rules>\n\n<reasoning_rules>\nExhibit the following reasoning patterns to successfully achieve the <user_request>:\n\n- Reason about <agent_history> to track progress and context toward <user_request>.\n- Analyze the most recent \"Next Goal\" and \"Action Result\" in <agent_history> and clearly state what you previously tried to achieve.\n- Analyze all relevant items in <agent_history> and <browser_state> to understand your state.\n- Explicitly judge success/failure/uncertainty of the last action. Never assume an action succeeded just because it appears to be executed in your last step in <agent_history>. If the expected change is missing, mark the last action as failed (or uncertain) and plan a recovery.\n- Analyze whether you are stuck, e.g. when you repeat the same actions multiple times without any progress. Then consider alternative approaches e.g. scrolling for more context or ask user for help.\n- Ask user for help if you have any difficulty. Keep user in the loop.\n- If you see information relevant to <user_request>, plan saving the information to memory.\n- Always reason about the <user_request>. Make sure to carefully analyze the specific steps and information required. E.g. specific filters, specific form fields, specific information to search. Make sure to always compare the current trajectory with the user request and think carefully if thats how the user requested it.\n</reasoning_rules>\n\n<examples>\nHere are examples of good output patterns. Use them as reference but never copy them directly.\n\n<evaluation_examples>\n\"evaluation_previous_goal\": \"Successfully navigated to the product page and found the target information. Verdict: Success\"\n\"evaluation_previous_goal\": \"Clicked the login button and user authentication form appeared. Verdict: Success\"\n</evaluation_examples>\n\n<memory_examples>\n\"memory\": \"Found many pending reports that need to be analyzed in the main page. Successfully processed the first 2 reports on quarterly sales data and moving on to inventory analysis and customer feedback reports.\"\n</memory_examples>\n\n<next_goal_examples>\n\"next_goal\": \"Click on the 'Add to Cart' button to proceed with the purchase flow.\"\n</next_goal_examples>\n</examples>\n\n<output>\n{\n \"evaluation_previous_goal\": \"Concise one-sentence analysis of your last action. Clearly state success, failure, or uncertain.\",\n \"memory\": \"1-3 concise sentences of specific memory of this step and overall progress. You should put here everything that will help you track progress in future steps. Like counting pages visited, items found, etc.\",\n \"next_goal\": \"State the next immediate goal and action to achieve it, in one clear sentence.\",\n \"action\":{\n \"Action name\": {// Action parameters}\n }\n}\n</output>\n";
445
+ var system_prompt_default = "You are an AI agent designed to operate in an iterative loop to automate browser tasks. Your ultimate goal is accomplishing the task provided in <user_request>.\n\n<intro>\nYou excel at following tasks:\n1. Navigating complex websites and extracting precise information\n2. Automating form submissions and interactive web actions\n3. Gathering and saving information \n4. Operate effectively in an agent loop\n5. Efficiently performing diverse web tasks\n</intro>\n\n<language_settings>\n- Default working language: **English**\n- Use the language that user is using. Return in user's language.\n</language_settings>\n\n<input>\nAt every step, your input will consist of: \n1. <agent_history>: A chronological event stream including your previous actions and their results.\n2. <agent_state>: Current <user_request> and <step_info>.\n3. <browser_state>: Current URL, interactive elements indexed for actions, and visible page content.\n</input>\n\n<agent_history>\nAgent history will be given as a list of step information as follows:\n\n<step_{step_number}>:\nEvaluation of Previous Step: Assessment of last action\nMemory: Your memory of this step\nNext Goal: Your goal for this step\nAction Results: Your actions and their results\n</step_{step_number}>\n\nand system messages wrapped in <sys> tag.\n</agent_history>\n\n<user_request>\nUSER REQUEST: This is your ultimate objective and always remains visible.\n- This has the highest priority. Make the user happy.\n- If the user request is very specific - then carefully follow each step and don't skip or hallucinate steps.\n- If the task is open ended you can plan yourself how to get it done.\n</user_request>\n\n<browser_state>\n1. Browser State will be given as:\n\nCurrent URL: URL of the page you are currently viewing.\nInteractive Elements: All interactive elements will be provided in format as [index]<type>text</type> where\n- index: Numeric identifier for interaction\n- type: HTML element type (button, input, etc.)\n- text: Element description\n\nExamples:\n[33]<div>User form</div>\n\\t*[35]<button aria-label='Submit form'>Submit</button>\n\nNote that:\n- Only elements with numeric indexes in [] are interactive\n- (stacked) indentation (with \\t) is important and means that the element is a (html) child of the element above (with a lower index)\n- Elements tagged with `*[` are the new clickable elements that appeared on the website since the last step - if url has not changed.\n- Pure text elements without [] are not interactive.\n</browser_state>\n\n<browser_rules>\nStrictly follow these rules while using the browser and navigating the web:\n- Only interact with elements that have a numeric [index] assigned.\n- Only use indexes that are explicitly provided.\n- If the page changes after, for example, an input text action, analyze if you need to interact with new elements, e.g. selecting the right option from the list.\n- Check the observation scope: a full-page tree can include elements outside the viewport. A viewport annotation describes geometry, not whether the user can see an unobscured element. When asked to navigate to or show an element, measure its position, scroll if needed, and verify its position again before reporting success. For reading or summarizing, content in the full-page tree can be used without scrolling.\n- You can scroll by a specific number of pages using the num_pages parameter (e.g., 0.5 for half page, 2.0 for two pages).\n- All the elements that are scrollable are marked with `data-scrollable` attribute. Including the scrollable distance in every directions. You can scroll *the element* in case some area are overflowed.\n- If a captcha appears, tell user you can not solve captcha. Finish the task and ask user to solve it.\n- If the page is not fully loaded, use the `wait` action.\n- Do not repeat one action for more than 3 times unless some conditions changed.\n- If you fill an input field and your action sequence is interrupted, most often something changed e.g. suggestions popped up under the field.\n- If the <user_request> includes specific page information such as product type, rating, price, location, etc., try to apply filters to be more efficient.\n- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.\n- If you input_text into a field, you might need to press enter, click the search button, or select from dropdown for completion.\n- Don't login into a page if you don't have to. Don't login if you don't have the credentials. \n- There are 2 types of tasks always first think which type of request you are dealing with:\n1. Very specific step by step instructions:\n- Follow them as very precise and don't skip steps. Try to complete everything as requested.\n2. Open ended tasks. Plan yourself, be creative in achieving them.\n- If you get stuck e.g. with logins or captcha in open-ended tasks you can re-evaluate the task and try alternative ways, e.g. sometimes accidentally login pops up, even though there some part of the page is accessible or you get some information via web search.\n</browser_rules>\n\n\n<!-- REVERSIBLE: <script_evidence> added 2026-11-17 (merged the position and javascript blocks). To revert, delete this block and its entry in docs/ALMA.md. -->\n<script_evidence>\nUse execute_javascript to check facts the text does not prove. Procedure: measure, compare, decide, cite.\n1. Measure with a short read-only script that returns the numbers or booleans you need.\n2. Compare them. If the comparison is false, the goal is not met: measure again or act.\n3. Done text: cite the measured values in plain language. Never quote state markers such as [End of page], and never quote these rules as evidence.\n Only numbers returned by a tool in this task may appear as evidence. If no measurement was returned, say so.\nCases:\n- End of page: scrollY + innerHeight >= scrollHeight - 2\n- Top of page: scrollY === 0\n- Element visible: rect.top < innerHeight && rect.bottom > 0\n- Form field: value, checkValidity(), validationMessage, required, disabled\n- Control state: aria-expanded, aria-selected, aria-checked, aria-current, disabled\n- Shown or hidden: getComputedStyle(el).display, visibility, opacity\n- Count: querySelectorAll(selector).length against the number requested\n- Text in a container: container.textContent.includes(...), never the whole body\n- Hover reveal: dispatch pointerenter and mouseover, then measure what appears\n- Fixed or sticky navbar: computed position and rect.top after scrolling\n- Dialog open: dialog.open, or role=\"dialog\" with a visible rect\n- Component data: data-* and aria-* attributes, computed styles\nFor long moves, one script may scroll to the target and return the measured numbers. Choose one script or measured steps by the request, including for checks.\nRead and move only. Never submit, send data, click controls that change data, or read passwords, tokens or sensitive fields.\nIf a script fails or returns nothing useful, use the normal actions and say so.\n<\/script_evidence>\n\n<!-- REVERSIBLE: <task_intake> and <script_use_case> added 2026-11-17. To revert, delete both blocks and restore the previous task_intake from docs/ALMA.md. -->\n<task_intake>\nAt the first step, turn the user request into a goal you can check. Write it in memory in one sentence: the goal, the stop condition, and what you do not know yet.\n- Use the site rules and the page data. Do not invent names, addresses, numbers, sections or results.\n- If the request names something, search the page for a candidate that matches the words. One clear candidate: use it. Several or none: ask the user with ask_user (kind=choice when the candidates are a short list).\n- If a fact is neither on the page nor in the rules, say you did not find it.\n- Investigate with read-only checks (get_context for large pages). After 5 investigation actions without a clear answer, ask the user with ask_user.\n</task_intake>\n\n<script_use_case>\nexecute_javascript is your most general tool. It can explore the page in detail and do things the common tools cannot. Use it when one script does the job better than several steps.\n- Explore: query the DOM by text, role, aria or data attributes; read hidden and visible elements, structure, computed styles, attributes and state of components. Scripts may be concise or complex, as the question needs.\n- Navigate: go to a target in one script with window.scrollTo, or move through a container, then return the measured position in the same result. Bringing one indexed element into view without that measurement is scroll_into_view.\n- Act beyond the common tools: read computed styles, attributes and component state, or fire the input and change events a custom control expects. Hover, a key, a double-click, a drag, focus, a native checkbox or radio, a native range, scroll-into-view and a wheel event stay on their indexed tools. Do this only for the action the user asked for.\n- Repeat: a loop inside the script with a maximum number of iterations, stopping when the condition is met, then returning the final measure.\nUse the common tools for single steps that need an indexed element from the page state (click_element_by_index, input_text, select_dropdown_option, drag_element, hover_element, press_key, double_click_element, focus_element, set_checked, set_range, scroll_into_view, wheel), for plain scrolling, for waiting, for reading a vertical slice of a large page (get_context with y_min/y_max), and for questions to the user (ask_user). Prefer ask_user kind=choice or kind=multi when the answer is a closed set of options.\nWhen <browser_state> is too long or you only need one band of the page, call get_context(y_min, y_max) to skim that slice. Document Y is page coordinates (0 at the top of the document). Omit both Y bounds to read the current viewport band. Use query to filter by role/name. With bind_indexes true, indexes in the slice replace the previous ones for the next actions.\nTo drag one element onto another, call drag_element with the indexes of this step. Do not write a DragEvent script for that. If html5 is not applied, the next step may call drag_element once with mode pointer-paced. Neither result proves the page accepted the drag.\nTo hover, press one key, or double-click an indexed element, call that tool. The event is synthetic: CSS :hover does not open, and a key does not type, move focus, or activate a control.\nTo focus an indexed element, call focus_element. The message says whether it was focused right after.\nTo set a native checkbox or radio, call set_checked. To set a native range, call set_range. The message says whether the control held that state right after. It does not show that a form was saved.\nTo bring an indexed element into view, call scroll_into_view. The message gives the window scroll before and after. Nested scrollers are not measured.\nTo send a wheel event a component listens for, call wheel. It does not scroll. Use scroll to move the page.\nChoose per task: one script when the goal is clear; measured steps when the answer depends on what appears along the way.\nEvery task ends with a measurement that proves the stop condition. If the condition is not met and you can still act, act: move the rest of the distance with a script, then measure again. \"Pages below\" in the page state tells you how far is left.\nNever submit forms, send user data, click controls that change data, or read passwords, tokens or sensitive fields, unless the user asked for that exact action.\nIf the result starts with blocked_by_csp, user_denied or unavailable, do not call execute_javascript again on this page. The user cannot allow that script on the page. Use the indexed tools.\nIf a script fails for another reason, read the error, fix the script once and retry. Then use the common tools.\nFinish with notDone only when you are blocked, and list what you tried.\n<\/script_use_case>\n\n\n<capability>\n- You can only handle single page app. Do not jump out of current page.\n- Do not click on link if it will open in a new page (e.g., <a target=\"_blank\">)\n- It is ok to fail the task.\n - User can be wrong. If the request of user is not achievable, inappropriate or you do not have enough information or tools to achieve it. Tell user to make a better request.\n - Webpage can be broken. All webpages or apps have bugs. Some bug will make it hard for your job. It's encouraged to tell user the problem of current page. Your feedbacks (including failing) are valuable for user.\n - Trying too hard can be harmful. Repeating some action back and forth or pushing for a complex procedure with little knowledge can cause unwanted results and harmful side-effects. User would rather you complete the task with a fail.\n- If you do not have knowledge for the current webpage or task. You must require user to give specific instructions and detailed steps.\n</capability>\n\n<task_completion_rules>\nYou must call the `done` action in one of three cases:\n- When you have fully completed the USER REQUEST.\n- When you reach the final allowed step (`max_steps`), even if the task is incomplete.\n- When you feel stuck or unable to solve user request. Or user request is not clear or contains inappropriate content.\n- If it is ABSOLUTELY IMPOSSIBLE to continue.\n\nThe `done` action is your opportunity to terminate and share your findings with the user.\n- Set `success` to `true` only if the full USER REQUEST has been completed with no missing components.\n- If any part of the request is missing, incomplete, or uncertain, set `success` to `false`.\n- You can use the `text` field of the `done` action to communicate your findings and to provide a coherent reply to the user and fulfill the USER REQUEST.\n- You are ONLY ALLOWED to call `done` as a single action. Don't call it together with other actions.\n- If the user asks for specified format, such as \"return JSON with following structure\", \"return a list of format...\", MAKE sure to use the right format in your answer.\n- If the user asks for a structured output, your `done` action's schema may be modified. Take this schema into account when solving the task!\n</task_completion_rules>\n\n<reasoning_rules>\nExhibit the following reasoning patterns to successfully achieve the <user_request>:\n\n- Reason about <agent_history> to track progress and context toward <user_request>. Observations that start with \"User said while the task was running\" are mid-task voice or typed notes: treat them as new instructions for the current request.\n- Analyze the most recent \"Next Goal\" and \"Action Result\" in <agent_history> and clearly state what you previously tried to achieve. Reuse facts already in memory and history; do not re-search the page for something you already found unless the page changed.\n- Analyze all relevant items in <agent_history> and <browser_state> to understand your state. When <browser_state> is large, call get_context on the band you need instead of ignoring prior context.\n- Explicitly judge success/failure/uncertainty of the last action. Never assume an action succeeded just because it appears to be executed in your last step in <agent_history>. If the expected change is missing, mark the last action as failed (or uncertain) and plan a recovery.\n- Analyze whether you are stuck, e.g. when you repeat the same actions multiple times without any progress. Then consider alternative approaches e.g. scrolling for more context or ask user for help.\n- Ask user for help if you have any difficulty. Keep user in the loop.\n- If you see information relevant to <user_request>, plan saving the information to memory.\n- Always reason about the <user_request>. Make sure to carefully analyze the specific steps and information required. E.g. specific filters, specific form fields, specific information to search. Make sure to always compare the current trajectory with the user request and think carefully if thats how the user requested it.\n</reasoning_rules>\n\n<examples>\nHere are examples of good output patterns. Use them as reference but never copy them directly.\n\n<evaluation_examples>\n\"evaluation_previous_goal\": \"Successfully navigated to the product page and found the target information. Verdict: Success\"\n\"evaluation_previous_goal\": \"Clicked the login button and user authentication form appeared. Verdict: Success\"\n</evaluation_examples>\n\n<memory_examples>\n\"memory\": \"Found many pending reports that need to be analyzed in the main page. Successfully processed the first 2 reports on quarterly sales data and moving on to inventory analysis and customer feedback reports.\"\n</memory_examples>\n\n<next_goal_examples>\n\"next_goal\": \"Click on the 'Add to Cart' button to proceed with the purchase flow.\"\n</next_goal_examples>\n</examples>\n\n<output>\n{\n \"evaluation_previous_goal\": \"Concise one-sentence analysis of your last action. Clearly state success, failure, or uncertain.\",\n \"memory\": \"1-3 concise sentences of specific memory of this step and overall progress. You should put here everything that will help you track progress in future steps. Like counting pages visited, items found, etc.\",\n \"next_goal\": \"State the next immediate goal and action to achieve it, in one clear sentence.\",\n \"action\":{\n \"Action name\": {// Action parameters}\n }\n}\n</output>\n";
446
446
  //#endregion
447
447
  //#region ../core/src/skills/files.ts
448
448
  /** Soft cap so panel attaches stay in memory without blowing the tab. */
@@ -777,12 +777,43 @@ tools.set("wait", tool({
777
777
  return `✅ Waited for ${(secondsSinceLastUpdate + actualWaitTime).toFixed(2)} seconds.`;
778
778
  }
779
779
  }));
780
+ tools.set("get_context", tool({
781
+ description: "Read a vertical slice of the page accessibility tree by document Y (page coordinates in CSS pixels). Use when browser_state is too large or you need only one band. y_min/y_max are inclusive overlap bounds; omit both to read the current viewport band. query filters role/name/description. bind_indexes=true (default) replaces action indexes with this slice for the next actions; set false for a read-only skim.",
782
+ inputSchema: z.object({
783
+ y_min: z.number().min(0).optional(),
784
+ y_max: z.number().min(0).optional(),
785
+ max_lines: z.number().int().min(10).max(200).default(80),
786
+ query: z.string().optional(),
787
+ bind_indexes: z.boolean().default(true)
788
+ }),
789
+ execute: async function(input) {
790
+ return (await this.pageController.getContext({
791
+ yMin: input.y_min,
792
+ yMax: input.y_max,
793
+ maxLines: input.max_lines,
794
+ query: input.query,
795
+ bindIndexes: input.bind_indexes
796
+ })).message;
797
+ }
798
+ }));
780
799
  tools.set("ask_user", tool({
781
- description: "Ask the user a question and wait for their answer. Use this if you need more information or clarification.",
782
- inputSchema: z.object({ question: z.string() }),
800
+ description: "Ask the user a question and wait for their answer. Use kind=text for free text, kind=choice for one option, kind=multi for several options. For choice/multi, pass 2+ distinct choices. Prefer choice/multi when the answer is a closed set.",
801
+ inputSchema: z.object({
802
+ question: z.string(),
803
+ kind: z.enum([
804
+ "text",
805
+ "choice",
806
+ "multi"
807
+ ]).default("text"),
808
+ choices: z.array(z.string()).max(12).optional()
809
+ }),
783
810
  execute: async function(input, { signal }) {
784
811
  if (!this.onAskUser) throw new Error("ask_user tool requires onAskUser callback to be set");
785
- return `User answered: ${await this.onAskUser(input.question, { signal })}`;
812
+ return `User answered: ${await this.onAskUser(input.question, {
813
+ signal,
814
+ kind: input.kind,
815
+ choices: input.choices
816
+ })}`;
786
817
  }
787
818
  }));
788
819
  tools.set("click_element_by_index", tool({
@@ -4516,9 +4547,15 @@ var AccessibilityController = class {
4516
4547
  const capture = await this.#observation(session);
4517
4548
  const doc = session.document;
4518
4549
  const maxLines = options.maxLines ?? this.#options.observationMaxLines ?? 400;
4550
+ const indexLabels = options.indexLabels !== false;
4551
+ const query = options.query?.trim().toLowerCase() || "";
4552
+ const hasYRange = options.yMin !== void 0 || options.yMax !== void 0;
4553
+ const yMin = options.yMin ?? Number.NEGATIVE_INFINITY;
4554
+ const yMax = options.yMax ?? Number.POSITIVE_INFINITY;
4519
4555
  const domNodes = /* @__PURE__ */ new Map();
4520
4556
  for (const node of capture.nodes) domNodes.set(node.id, !doc ? null : node.domPath === "" ? doc : resolveDomPath(doc, node.domPath));
4521
4557
  const view = doc?.defaultView;
4558
+ const scrollY = view?.scrollY ?? 0;
4522
4559
  const viewportAnnotation = (node) => {
4523
4560
  const domNode = domNodes.get(node.id);
4524
4561
  if (!view || !domNode || domNode.nodeType !== 1) return null;
@@ -4541,6 +4578,27 @@ var AccessibilityController = class {
4541
4578
  return null;
4542
4579
  }
4543
4580
  };
4581
+ const documentBand = (node) => {
4582
+ const domNode = domNodes.get(node.id);
4583
+ if (!view || !domNode || domNode === doc) return null;
4584
+ const element = domNode.nodeType === 1 ? domNode : domNode.parentElement;
4585
+ if (!element) return null;
4586
+ try {
4587
+ const rect = element.getBoundingClientRect();
4588
+ if (![
4589
+ rect.top,
4590
+ rect.bottom,
4591
+ rect.width,
4592
+ rect.height
4593
+ ].every(Number.isFinite) || rect.width <= 0 || rect.height <= 0) return null;
4594
+ return {
4595
+ top: rect.top + scrollY,
4596
+ bottom: rect.bottom + scrollY
4597
+ };
4598
+ } catch {
4599
+ return null;
4600
+ }
4601
+ };
4544
4602
  const inViewport = (margin) => (node) => {
4545
4603
  const domNode = domNodes.get(node.id);
4546
4604
  if (!view || !domNode || domNode === doc) return true;
@@ -4549,18 +4607,36 @@ var AccessibilityController = class {
4549
4607
  const rect = element.getBoundingClientRect();
4550
4608
  return rect.bottom >= -margin && rect.top <= view.innerHeight + margin && rect.right >= -margin && rect.left <= view.innerWidth + margin;
4551
4609
  };
4610
+ const matchesQuery = (node) => {
4611
+ if (!query) return true;
4612
+ const value = typeof node.value === "string" || typeof node.value === "number" ? String(node.value) : "";
4613
+ return [
4614
+ node.role,
4615
+ node.name,
4616
+ node.description,
4617
+ value
4618
+ ].join(" ").toLowerCase().includes(query);
4619
+ };
4620
+ const inDocumentY = (node) => {
4621
+ if (!hasYRange) return true;
4622
+ const band = documentBand(node);
4623
+ if (!band) return true;
4624
+ return band.bottom >= yMin && band.top <= yMax;
4625
+ };
4552
4626
  const format = (filter) => {
4553
4627
  const ids = [];
4554
4628
  const labels = [];
4629
+ const combined = filter || hasYRange || query ? (node) => (filter ? filter(node) : true) && inDocumentY(node) && matchesQuery(node) : void 0;
4555
4630
  return {
4556
4631
  ...formatTree(capture.nodes, {
4557
4632
  ...OBSERVATION_FORMAT,
4558
4633
  maxLines,
4559
- filter,
4634
+ filter: combined,
4560
4635
  annotation: viewportAnnotation,
4561
4636
  idLabel: (node) => {
4562
4637
  if (domNodes.get(node.id)?.nodeType !== 1) return null;
4563
4638
  labels.push(`${node.role} ${JSON.stringify(clip$1(node.name))}`);
4639
+ if (!indexLabels) return null;
4564
4640
  return String(ids.push(node.id) - 1);
4565
4641
  }
4566
4642
  }),
@@ -4569,9 +4645,10 @@ var AccessibilityController = class {
4569
4645
  };
4570
4646
  };
4571
4647
  const expansion = options.viewportExpansion ?? -1;
4572
- let viewportOnly = expansion !== -1;
4648
+ const sliceMode = hasYRange || Boolean(query);
4649
+ let viewportOnly = expansion !== -1 && !sliceMode;
4573
4650
  let result = format(viewportOnly ? inViewport(expansion) : void 0);
4574
- if (!viewportOnly && result.hiddenNodes > 0) {
4651
+ if (!viewportOnly && !sliceMode && result.hiddenNodes > 0) {
4575
4652
  viewportOnly = true;
4576
4653
  result = format(inViewport(0));
4577
4654
  }
@@ -7004,6 +7081,80 @@ var PageController = class extends EventTarget {
7004
7081
  };
7005
7082
  }
7006
7083
  /**
7084
+ * Read a vertical slice of the accessibility tree by document Y (page coordinates).
7085
+ * Use it to skim large pages in pieces. When `bindIndexes` is true, the returned `[index]`
7086
+ * handles replace the current action indexes for this step. When false, the text is read-only
7087
+ * (no indexes) and the agent's current indexes stay as they are.
7088
+ */
7089
+ async getContext(options = {}) {
7090
+ const page = getPageInfo();
7091
+ const bindIndexes = options.bindIndexes === true;
7092
+ const maxLines = Math.max(10, Math.min(options.maxLines ?? 80, 200));
7093
+ const hasY = options.yMin !== void 0 || options.yMax !== void 0;
7094
+ const yMin = hasY ? Math.max(0, options.yMin ?? 0) : Math.max(0, Math.floor(page.scroll_y));
7095
+ const yMax = hasY ? Math.max(yMin, options.yMax ?? page.page_height) : Math.max(yMin + 1, Math.floor(page.scroll_y + page.viewport_height));
7096
+ if (!this.usesAccessibility()) return {
7097
+ text: "",
7098
+ yMin,
7099
+ yMax,
7100
+ pageHeight: page.page_height,
7101
+ scrollY: page.scroll_y,
7102
+ viewportHeight: page.viewport_height,
7103
+ shownNodes: 0,
7104
+ totalNodes: 0,
7105
+ hiddenNodes: 0,
7106
+ filteredNodes: 0,
7107
+ boundIndexes: false,
7108
+ message: "get_context needs observation: accessibility. The current mode is the element list; scroll and read browser_state instead."
7109
+ };
7110
+ await this.mask?.startProgress();
7111
+ const started = performance.now();
7112
+ try {
7113
+ const observation = await this.accessibility.observeIndexed({
7114
+ maxLines,
7115
+ viewportExpansion: -1,
7116
+ yMin,
7117
+ yMax,
7118
+ query: options.query,
7119
+ indexLabels: bindIndexes
7120
+ });
7121
+ if (bindIndexes) {
7122
+ const indexed = await this.withSurfaceIndexes(observation);
7123
+ this.axObservation = indexed;
7124
+ this.simplifiedHTML = indexed.text;
7125
+ this.indexSource = "accessibility";
7126
+ this.selectorMap.clear();
7127
+ this.elementTextMap = new Map(indexed.labels.map((label, index) => [index, label]));
7128
+ this.lastTimeUpdate = Date.now();
7129
+ this.lastTreeReadMs = Math.round(performance.now() - started);
7130
+ this.isIndexed = true;
7131
+ }
7132
+ const header = [
7133
+ `Context slice y=${Math.round(yMin)}..${Math.round(yMax)} of page_height=${Math.round(page.page_height)} (scrollY=${Math.round(page.scroll_y)}, viewport=${Math.round(page.viewport_height)}).`,
7134
+ options.query ? `Query: ${JSON.stringify(options.query)}.` : null,
7135
+ bindIndexes ? "Indexes in this slice replace the previous action indexes for this step." : "Read-only: no action indexes. Current agent indexes are unchanged.",
7136
+ `Nodes shown ${observation.shownNodes}/${observation.totalNodes}; hidden ${observation.hiddenNodes}; filtered ${observation.filteredNodes}.`
7137
+ ].filter(Boolean).join(" ");
7138
+ const text = observation.text.trim() ? `${header}\n\n${observation.text}` : header;
7139
+ return {
7140
+ text,
7141
+ yMin,
7142
+ yMax,
7143
+ pageHeight: page.page_height,
7144
+ scrollY: page.scroll_y,
7145
+ viewportHeight: page.viewport_height,
7146
+ shownNodes: observation.shownNodes,
7147
+ totalNodes: observation.totalNodes,
7148
+ hiddenNodes: observation.hiddenNodes,
7149
+ filteredNodes: observation.filteredNodes,
7150
+ boundIndexes: bindIndexes,
7151
+ message: text
7152
+ };
7153
+ } finally {
7154
+ this.mask?.stopProgress();
7155
+ }
7156
+ }
7157
+ /**
7007
7158
  * Get structured browser state for LLM consumption.
7008
7159
  * Automatically calls updateTree() to refresh the DOM state.
7009
7160
  */
@@ -7657,6 +7808,11 @@ var enUS = { ui: {
7657
7808
  resultError: "Task failed",
7658
7809
  questionTitle: "Question",
7659
7810
  answerTitle: "Your answer",
7811
+ answerTitleChoice: "Choose one",
7812
+ answerTitleMulti: "Choose all that apply",
7813
+ answerConfirmMulti: "Confirm selection",
7814
+ composerAnswerChoice: "Tap an option above…",
7815
+ composerAnswerMulti: "Select options, then confirm…",
7660
7816
  memory: "Memory",
7661
7817
  nextGoal: "Next goal",
7662
7818
  evaluation: "Last step",
@@ -7823,6 +7979,11 @@ var ptBR = { ui: {
7823
7979
  resultError: "Tarefa falhou",
7824
7980
  questionTitle: "Pergunta",
7825
7981
  answerTitle: "Sua resposta",
7982
+ answerTitleChoice: "Escolha uma",
7983
+ answerTitleMulti: "Escolha todas que se aplicam",
7984
+ answerConfirmMulti: "Confirmar seleção",
7985
+ composerAnswerChoice: "Toque em uma opção acima…",
7986
+ composerAnswerMulti: "Selecione as opções e confirme…",
7826
7987
  memory: "Memória",
7827
7988
  nextGoal: "Próximo objetivo",
7828
7989
  evaluation: "Último passo",
@@ -7901,6 +8062,8 @@ var TRANSCRIPTION_MODEL = "gpt-4o-mini-transcribe";
7901
8062
  var REALTIME_VOICE = "marin";
7902
8063
  var RUN_TASK = "run_task";
7903
8064
  var EXECUTE_JS = "execute_javascript";
8065
+ var ANSWER_QUESTION = "answer_question";
8066
+ var GET_CONTEXT = "get_context";
7904
8067
  /** Hands a multi-step task or a judgment about the page to the agent. */
7905
8068
  var RUN_TASK_TOOL = {
7906
8069
  type: "function",
@@ -7919,7 +8082,7 @@ var RUN_TASK_TOOL = {
7919
8082
  var EXECUTE_JS_TOOL = {
7920
8083
  type: "function",
7921
8084
  name: EXECUTE_JS,
7922
- description: "Runs JavaScript in this page and returns its result. The variable `agent` is the page-agent instance (`agent.pageController`, `agent.tools`). Use it to read the page, measure positions, or act on an element, without starting an agent task. `await agent.pageController.getState()` reads the page only when needed. Write one script for the whole job, and return a small object with the values you need.",
8085
+ description: "Runs JavaScript in this page and returns its result. The variable `agent` is the page-agent instance (`agent.pageController`, `agent.tools`). Use it to read the page, measure positions, or act on an element, without starting an agent task. Prefer get_context for a vertical tree slice. `await agent.pageController.getState()` reads the page only when needed. Write one script for the whole job, and return a small object with the values you need.",
7923
8086
  parameters: {
7924
8087
  type: "object",
7925
8088
  properties: { script: {
@@ -7929,6 +8092,48 @@ var EXECUTE_JS_TOOL = {
7929
8092
  required: ["script"]
7930
8093
  }
7931
8094
  };
8095
+ /** Sends the user's spoken answer to a pending agent ask_user. */
8096
+ var ANSWER_QUESTION_TOOL = {
8097
+ type: "function",
8098
+ name: ANSWER_QUESTION,
8099
+ description: "Send the user's answer to the agent's pending question. Use this only after the agent asked something (report kind question). Pass the answer exactly as the user said it, or the chosen option label(s).",
8100
+ parameters: {
8101
+ type: "object",
8102
+ properties: { answer: {
8103
+ type: "string",
8104
+ description: "The user's answer, exactly as spoken or the chosen option text."
8105
+ } },
8106
+ required: ["answer"]
8107
+ }
8108
+ };
8109
+ /** Read-only vertical slice of the accessibility tree. */
8110
+ var GET_CONTEXT_TOOL = {
8111
+ type: "function",
8112
+ name: GET_CONTEXT,
8113
+ description: "Read a vertical slice of the page accessibility tree by document Y (page coordinates). Use to skim large pages. Omit y_min/y_max to read the current viewport band. query filters role/name. Read-only for voice: does not change agent action indexes.",
8114
+ parameters: {
8115
+ type: "object",
8116
+ properties: {
8117
+ y_min: {
8118
+ type: "number",
8119
+ description: "Document Y start in CSS pixels."
8120
+ },
8121
+ y_max: {
8122
+ type: "number",
8123
+ description: "Document Y end in CSS pixels."
8124
+ },
8125
+ max_lines: {
8126
+ type: "number",
8127
+ description: "Max tree lines (10–200). Default 60."
8128
+ },
8129
+ query: {
8130
+ type: "string",
8131
+ description: "Optional case-insensitive filter on role/name."
8132
+ }
8133
+ },
8134
+ required: []
8135
+ }
8136
+ };
7932
8137
  /**
7933
8138
  * Session configuration sent when the call is created. The model answers conversation by itself and uses its
7934
8139
  * two tools for the page. Speech interrupts the model (barge-in) through server-side turn detection.
@@ -7939,7 +8144,12 @@ function callSessionConfig(settings) {
7939
8144
  model: REALTIME_MODEL,
7940
8145
  instructions: settings.instructions,
7941
8146
  output_modalities: ["audio"],
7942
- tools: [RUN_TASK_TOOL, EXECUTE_JS_TOOL],
8147
+ tools: [
8148
+ RUN_TASK_TOOL,
8149
+ ANSWER_QUESTION_TOOL,
8150
+ GET_CONTEXT_TOOL,
8151
+ EXECUTE_JS_TOOL
8152
+ ],
7943
8153
  tool_choice: "auto",
7944
8154
  audio: {
7945
8155
  input: {
@@ -7970,7 +8180,7 @@ function currentTimeLine(now = /* @__PURE__ */ new Date()) {
7970
8180
  }).format(now)} (${zone}).`;
7971
8181
  }
7972
8182
  var KIND_LABEL = {
7973
- question: "The agent needs an answer from the user",
8183
+ question: "The agent needs an answer from the user. Speak the question. When the user answers, call answer_question with their answer exactly. Do not call run_task for that answer",
7974
8184
  done: "The task was completed",
7975
8185
  "not-done": "The task was not completed",
7976
8186
  stopped: "The task was stopped",
@@ -8082,7 +8292,12 @@ function toGeminiSchema(schema) {
8082
8292
  }
8083
8293
  /** The two tools, declared with the same names, descriptions and parameters as for OpenAI. */
8084
8294
  function geminiTools() {
8085
- return [{ functionDeclarations: [RUN_TASK_TOOL, EXECUTE_JS_TOOL].map((tool) => ({
8295
+ return [{ functionDeclarations: [
8296
+ RUN_TASK_TOOL,
8297
+ ANSWER_QUESTION_TOOL,
8298
+ GET_CONTEXT_TOOL,
8299
+ EXECUTE_JS_TOOL
8300
+ ].map((tool) => ({
8086
8301
  name: tool.name,
8087
8302
  description: tool.description,
8088
8303
  parameters: toGeminiSchema(tool.parameters)
@@ -8352,24 +8567,35 @@ var GeminiLiveClient = class {
8352
8567
  this.#inTurn = false;
8353
8568
  this.#flush(true);
8354
8569
  this.#turnStart = true;
8570
+ this.#resumeAudio();
8355
8571
  this.#callbacks.onEvent({ type: "response_done" });
8356
8572
  return;
8357
8573
  case "speech_started":
8358
8574
  this.#stopPlayback();
8359
8575
  this.#inTurn = false;
8576
+ this.#resumeAudio();
8360
8577
  this.#callbacks.onEvent({ type: "speech_started" });
8361
8578
  return;
8362
8579
  case "ready":
8363
8580
  this.#onReady?.();
8581
+ this.#resumeAudio();
8364
8582
  this.#callbacks.onEvent({ type: "ready" });
8365
8583
  return;
8366
8584
  case "tool_call":
8367
8585
  this.#send.callNames.set(event.callId, event.name);
8586
+ this.#resumeAudio();
8368
8587
  this.#callbacks.onEvent(event);
8369
8588
  return;
8370
8589
  default: this.#callbacks.onEvent(event);
8371
8590
  }
8372
8591
  }
8592
+ /** Mobile and Bluetooth speaker paths often suspend AudioContext; resume on every turn edge. */
8593
+ async #resumeAudio() {
8594
+ try {
8595
+ if (this.#ctx && this.#ctx.state !== "running") await this.#ctx.resume();
8596
+ if (this.#playCtx && this.#playCtx.state !== "running") await this.#playCtx.resume();
8597
+ } catch {}
8598
+ }
8373
8599
  /** Sends a command in the session's shape, translated for Gemini. Cancel stops the local playback. */
8374
8600
  send(message) {
8375
8601
  if (this.#ws?.readyState !== WebSocket.OPEN) return;
@@ -8559,7 +8785,7 @@ var RealtimeClient = class {
8559
8785
  };
8560
8786
  //#endregion
8561
8787
  //#region ../ui/src/voice/prompts/voice.md?raw
8562
- var voice_default = "You are the voice of a web assistant that works on the website the user is looking at. You talk with the user; the page agent carries out page tasks.\n\n- Reply in the language set by the panel, in short sentences.\n- Answer greetings, small talk and anything you can answer without the page. Do not use a tool for them.\n- Before you call a tool, say nothing. After a tool result, say only its result in one short sentence.\n- To check or read the page yourself, write ONE execute_javascript script that does the whole job. `await agent.pageController.getState()` reads the page only when it was never read or the last read is older than 10 seconds.\n- For any task that changes the page or needs several steps, call run_task with the user's request exactly as the user said it. Do not rewrite it, do not add context, do not interpret it. The agent understands the request and asks the user when it needs more.\n- Never call agent.execute yourself.\n- After run_task starts, do not use execute_javascript on the page until the agent reports a result. Tell the user the task started; do not say it finished.\n- If a tool says the agent is busy, say so and suggest trying again when the task ends.\n- If the user asks to stop, tell them to press the stop button in the panel.\n- When the agent reports a result, say it in one sentence, without technical details, element indexes or markers such as [End of page].\n- Never say an action was done or a check passed unless a tool result or the agent reported it.\n";
8788
+ var voice_default = "You are the voice of a web assistant that works on the website the user is looking at. You talk with the user; the page agent carries out page tasks.\n\n- Reply in the language set by the panel, in short sentences.\n- Answer greetings, small talk and anything you can answer without the page. Do not use a tool for them.\n- Before you call a tool, say nothing. After a tool result, say only its result in one short sentence.\n- To skim the page tree in pieces, call get_context with optional y_min/y_max (document Y in CSS pixels) or query. Omit both Y bounds to read the current viewport band. Prefer a narrow band or a query over a huge slice. get_context also returns the active task and recent steps — use that before guessing.\n- To check or change the page yourself with a script, write ONE execute_javascript script that does the whole job. Prefer get_context for reading. `await agent.pageController.getState()` reads the page only when it was never read or the last read is older than 10 seconds.\n- For any task that changes the page or needs several steps, call run_task with the user's request exactly as the user said it. Do not rewrite it, do not add context, do not interpret it. The agent understands the request and asks the user when it needs more.\n- Never call agent.execute yourself.\n- When the agent asks a question (report kind question), speak that question. When the user answers, call answer_question with their answer exactly (or the chosen option label). Do not call run_task for that answer.\n- After run_task starts, do not use execute_javascript on the page until the agent reports a result. get_context and answer_question remain allowed. If the user speaks a correction or extra detail while a task is running and there is no pending question, call run_task with their words exactly — the panel delivers it as a note to the running agent.\n- If a tool says the agent is busy, say so once. Do not keep calling tools in a loop.\n- If the user asks to stop, tell them to press the stop button in the panel.\n- When the agent reports a result, say it in one sentence, without technical details, element indexes or markers such as [End of page].\n- Never say an action was done or a check passed unless a tool result or the agent reported it.\n";
8563
8789
  //#endregion
8564
8790
  //#region ../ui/src/voice/voice-prompt.ts
8565
8791
  /**
@@ -8585,6 +8811,17 @@ function resolveVoicePrompt(custom, override = false) {
8585
8811
  var BUSY_OUTPUT = "O agente está ocupado com outra tarefa. Avise o usuário e não repita o pedido agora.";
8586
8812
  /** Result given to the model when the task was started. */
8587
8813
  var STARTED_OUTPUT = "Tarefa iniciada no agente. Confirme ao usuário em uma frase.";
8814
+ /** Result when a mid-task spoken note was delivered to the running agent. */
8815
+ var NOTE_OUTPUT = "Mensagem do usuário entregue ao agente em execução. Confirme ao usuário em uma frase.";
8816
+ /** Result when answer_question is used without a pending ask. */
8817
+ var NO_PENDING_QUESTION_OUTPUT = "Não há pergunta pendente do agente. Se o usuário pediu uma tarefa, use run_task.";
8818
+ /** Result when the answer was delivered to the agent. */
8819
+ var ANSWERED_OUTPUT = "Resposta enviada ao agente. Confirme ao usuário em uma frase.";
8820
+ /** Empty tool args must still get a tool result, or Gemini Live waits forever. */
8821
+ var EMPTY_TASK_OUTPUT = "No task was given. Ask the user what to do, then call run_task.";
8822
+ var EMPTY_ANSWER_OUTPUT = "No answer was given. Ask the user again, then call answer_question with their reply.";
8823
+ /** Default cap so a stuck page tree read cannot freeze the voice session. */
8824
+ var DEFAULT_CONTEXT_TIMEOUT_MS = 8e3;
8588
8825
  /** Errors about cancelling a response that is not running are harmless and must not end the call. */
8589
8826
  function isHarmlessCancelError(message) {
8590
8827
  return /cancel/i.test(message);
@@ -8725,10 +8962,44 @@ var VoiceSession = class {
8725
8962
  }
8726
8963
  }
8727
8964
  #handleToolCall(name, callId, args) {
8965
+ if (name === "answer_question") {
8966
+ const answer = typeof args.answer === "string" ? args.answer.trim() : "";
8967
+ if (!answer) {
8968
+ this.#answer(callId, EMPTY_ANSWER_OUTPUT);
8969
+ return;
8970
+ }
8971
+ const delivered = this.#options.onAnswer?.(answer) ?? false;
8972
+ this.#answer(callId, delivered ? ANSWERED_OUTPUT : NO_PENDING_QUESTION_OUTPUT);
8973
+ return;
8974
+ }
8728
8975
  if (name === "run_task") {
8729
8976
  const task = typeof args.task === "string" ? args.task.trim() : "";
8730
- if (!task) return;
8731
- this.#answer(callId, this.#options.onTask(task) ? STARTED_OUTPUT : BUSY_OUTPUT);
8977
+ if (!task) {
8978
+ this.#answer(callId, EMPTY_TASK_OUTPUT);
8979
+ return;
8980
+ }
8981
+ if (this.#options.isWaitingForAnswer?.()) {
8982
+ const delivered = this.#options.onAnswer?.(task) ?? this.#options.onTask(task);
8983
+ this.#answer(callId, delivered ? ANSWERED_OUTPUT : NO_PENDING_QUESTION_OUTPUT);
8984
+ return;
8985
+ }
8986
+ if (this.#options.onTask(task)) {
8987
+ this.#answer(callId, STARTED_OUTPUT);
8988
+ return;
8989
+ }
8990
+ if (this.#options.onNote?.(task)) {
8991
+ this.#answer(callId, NOTE_OUTPUT);
8992
+ return;
8993
+ }
8994
+ this.#answer(callId, BUSY_OUTPUT);
8995
+ return;
8996
+ }
8997
+ if (name === "get_context") {
8998
+ if (!this.#options.onGetContext) {
8999
+ this.#answer(callId, "get_context is not available in this session.");
9000
+ return;
9001
+ }
9002
+ this.#runGetContext(callId, args);
8732
9003
  return;
8733
9004
  }
8734
9005
  if (name === "execute_javascript") {
@@ -8742,7 +9013,33 @@ var VoiceSession = class {
8742
9013
  return;
8743
9014
  }
8744
9015
  this.#runScript(callId, script);
9016
+ return;
9017
+ }
9018
+ this.#answer(callId, `Unknown tool ${name}.`);
9019
+ }
9020
+ async #runGetContext(callId, args) {
9021
+ const client = this.#client;
9022
+ const run = this.#options.onGetContext;
9023
+ if (!client || !run) {
9024
+ this.#answer(callId, "get_context is not available in this session.");
9025
+ return;
9026
+ }
9027
+ const num = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
9028
+ const timeoutMs = Math.max(50, this.#options.contextTimeoutMs ?? 8e3);
9029
+ let output;
9030
+ try {
9031
+ const result = run({
9032
+ yMin: num(args.y_min),
9033
+ yMax: num(args.y_max),
9034
+ maxLines: num(args.max_lines),
9035
+ query: typeof args.query === "string" ? args.query : void 0
9036
+ });
9037
+ output = await Promise.race([result, new Promise((resolve) => setTimeout(() => resolve("get_context timed out. Tell the user briefly and try a smaller y band or query."), timeoutMs))]);
9038
+ } catch (error) {
9039
+ output = `get_context failed: ${error instanceof Error ? error.message : "unknown error"}`;
8745
9040
  }
9041
+ if (this.#client !== client) return;
9042
+ this.#answer(callId, output.slice(0, 2500));
8746
9043
  }
8747
9044
  /** Sends the result of a tool call back to the model, then the model speaks again. */
8748
9045
  #answer(callId, output) {
@@ -8752,7 +9049,10 @@ var VoiceSession = class {
8752
9049
  async #runScript(callId, script) {
8753
9050
  const client = this.#client;
8754
9051
  const run = this.#options.onScript;
8755
- if (!client || !run) return;
9052
+ if (!client || !run) {
9053
+ this.#answer(callId, "Running scripts is not available in this session.");
9054
+ return;
9055
+ }
8756
9056
  let output;
8757
9057
  try {
8758
9058
  output = await run(script);
@@ -8794,140 +9094,143 @@ function truncate(text, maxLength) {
8794
9094
  }
8795
9095
  //#endregion
8796
9096
  //#region ../ui/src/panel/Panel.module.css
8797
- var wrapper = "_wrapper_1e3bu_3";
8798
- var collapsed = "_collapsed_1e3bu_80";
8799
- var feedWrap = "_feedWrap_1e3bu_80";
8800
- var followBar = "_followBar_1e3bu_85";
8801
- var followBarBody = "_followBarBody_1e3bu_95";
8802
- var followBarStatus = "_followBarStatus_1e3bu_110";
8803
- var followBarLens = "_followBarLens_1e3bu_120";
8804
- var voiceActions = "_voiceActions_1e3bu_130";
8805
- var header = "_header_1e3bu_148";
8806
- var brand = "_brand_1e3bu_161";
8807
- var titleBlock = "_titleBlock_1e3bu_185";
8808
- var title = "_title_1e3bu_185";
8809
- var status = "_status_1e3bu_200";
8810
- var controls = "_controls_1e3bu_208";
8811
- var iconButton = "_iconButton_1e3bu_214";
8812
- var stopButton = "_stopButton_1e3bu_232";
8813
- var feed = "_feed_1e3bu_80";
8814
- var rail = "_rail_1e3bu_263";
8815
- var railThumb = "_railThumb_1e3bu_294";
8816
- var railMark = "_railMark_1e3bu_303";
8817
- var divider = "_divider_1e3bu_373";
8818
- var peek = "_peek_1e3bu_393";
8819
- var peekIn = "_peekIn_1e3bu_1";
8820
- var peekHead = "_peekHead_1e3bu_421";
8821
- var peekText = "_peekText_1e3bu_436";
8822
- var pin = "_pin_1e3bu_449";
8823
- var jump = "_jump_1e3bu_482";
8824
- var jumpIn = "_jumpIn_1e3bu_1";
8825
- var empty = "_empty_1e3bu_523";
8826
- var enter = "_enter_1e3bu_531";
8827
- var bubble = "_bubble_1e3bu_546";
8828
- var line$1 = "_line_1e3bu_556";
8829
- var reflection = "_reflection_1e3bu_563";
8830
- var observation = "_observation_1e3bu_568";
8831
- var warning = "_warning_1e3bu_572";
8832
- var live = "_live_1e3bu_576";
8833
- var pulse = "_pulse_1e3bu_1";
8834
- var tool$1 = "_tool_1e3bu_605";
8835
- var toolHead = "_toolHead_1e3bu_622";
8836
- var toolDot = "_toolDot_1e3bu_628";
8837
- var toolLabel$1 = "_toolLabel_1e3bu_636";
8838
- var toolDetail = "_toolDetail_1e3bu_641";
8839
- var spinner$1 = "_spinner_1e3bu_649";
8840
- var spin = "_spin_1e3bu_649";
8841
- var question = "_question_1e3bu_667";
8842
- var questionTag = "_questionTag_1e3bu_672";
8843
- var questionText = "_questionText_1e3bu_680";
8844
- var result = "_result_1e3bu_685";
8845
- var resultText = "_resultText_1e3bu_712";
8846
- var composer = "_composer_1e3bu_720";
8847
- var answerContext = "_answerContext_1e3bu_729";
8848
- var box = "_box_1e3bu_735";
8849
- var actions = "_actions_1e3bu_774";
8850
- var attachList = "_attachList_1e3bu_780";
8851
- var attachChip = "_attachChip_1e3bu_787";
8852
- var attachName = "_attachName_1e3bu_799";
8853
- var attachRemove = "_attachRemove_1e3bu_806";
8854
- var attachError = "_attachError_1e3bu_830";
8855
- var roundButton = "_roundButton_1e3bu_836";
8856
- var send = "_send_1e3bu_854";
8857
- var studio = "_studio_1e3bu_867";
8858
- var studioHeader = "_studioHeader_1e3bu_877";
8859
- var studioTitle = "_studioTitle_1e3bu_884";
8860
- var studioTabs = "_studioTabs_1e3bu_889";
8861
- var studioTab = "_studioTab_1e3bu_889";
8862
- var studioBody = "_studioBody_1e3bu_911";
8863
- var studioHint = "_studioHint_1e3bu_920";
8864
- var studioToolbar = "_studioToolbar_1e3bu_927";
8865
- var studioToolButton = "_studioToolButton_1e3bu_933";
8866
- var studioStatus = "_studioStatus_1e3bu_959";
8867
- var studioAsk = "_studioAsk_1e3bu_979";
8868
- var studioSteps = "_studioSteps_1e3bu_997";
8869
- var studioCatalog = "_studioCatalog_1e3bu_998";
8870
- var studioStep = "_studioStep_1e3bu_997";
8871
- var studioCatalogRow = "_studioCatalogRow_1e3bu_1010";
8872
- var studioWatchers = "_studioWatchers_1e3bu_1025";
8873
- var studioWatchersHead = "_studioWatchersHead_1e3bu_1035";
8874
- var studioWatchersTitle = "_studioWatchersTitle_1e3bu_1042";
8875
- var studioWatchersEmpty = "_studioWatchersEmpty_1e3bu_1050";
8876
- var studioWatchersList = "_studioWatchersList_1e3bu_1056";
8877
- var studioWatcherChip = "_studioWatcherChip_1e3bu_1065";
8878
- var studioWatcherLabel = "_studioWatcherLabel_1e3bu_1078";
8879
- var studioWatcherMeta = "_studioWatcherMeta_1e3bu_1086";
8880
- var studioStepBody = "_studioStepBody_1e3bu_1109";
8881
- var studioCatalogBody = "_studioCatalogBody_1e3bu_1110";
8882
- var studioStepKind = "_studioStepKind_1e3bu_1115";
8883
- var studioStepMeta = "_studioStepMeta_1e3bu_1127";
8884
- var studioCatalogMeta = "_studioCatalogMeta_1e3bu_1128";
8885
- var studioStepActions = "_studioStepActions_1e3bu_1133";
8886
- var studioCatalogActions = "_studioCatalogActions_1e3bu_1134";
8887
- var studioPreviewLabel = "_studioPreviewLabel_1e3bu_1177";
8888
- var studioPreview = "_studioPreview_1e3bu_1177";
8889
- var voice = "_voice_1e3bu_130";
8890
- var voiceMeta = "_voiceMeta_1e3bu_1215";
8891
- var lens = "_lens_1e3bu_1223";
8892
- var breathe = "_breathe_1e3bu_1";
8893
- var voiceText = "_voiceText_1e3bu_1267";
8894
- var micDevice = "_micDevice_1e3bu_1276";
8895
- var textButton = "_textButton_1e3bu_1305";
8896
- var fab = "_fab_1e3bu_1324";
8897
- var fabLeft = "_fabLeft_1e3bu_1368";
8898
- var tip = "_tip_1e3bu_1374";
8899
- var tipUp = "_tipUp_1e3bu_1397";
8900
- var code = "_code_1e3bu_1767";
8901
- var codeHead = "_codeHead_1e3bu_1785";
8902
- var codeTitle = "_codeTitle_1e3bu_1792";
8903
- var codeMeta = "_codeMeta_1e3bu_1797";
8904
- var codeStatus = "_codeStatus_1e3bu_1807";
8905
- var codeBadge = "_codeBadge_1e3bu_1817";
8906
- var codeSection = "_codeSection_1e3bu_1827";
8907
- var codeLabel = "_codeLabel_1e3bu_1832";
8908
- var clip = "_clip_1e3bu_1841";
8909
- var codeBlock$1 = "_codeBlock_1e3bu_1846";
8910
- var resultBlock = "_resultBlock_1e3bu_1847";
8911
- var clipBody = "_clipBody_1e3bu_1864";
8912
- var clipToggle = "_clipToggle_1e3bu_1887";
8913
- var tkComment = "_tkComment_1e3bu_1906";
8914
- var tkString = "_tkString_1e3bu_1911";
8915
- var tkNumber = "_tkNumber_1e3bu_1915";
8916
- var tkKeyword = "_tkKeyword_1e3bu_1919";
8917
- var tkName = "_tkName_1e3bu_1923";
8918
- var tkPunct = "_tkPunct_1e3bu_1927";
8919
- var tkKey = "_tkKey_1e3bu_1919";
8920
- var tkBool = "_tkBool_1e3bu_1935";
8921
- var foldHead = "_foldHead_1e3bu_1947";
8922
- var foldBody = "_foldBody_1e3bu_1970";
8923
- var foldInner = "_foldInner_1e3bu_1976";
8924
- var fold = "_fold_1e3bu_1947";
8925
- var toolState = "_toolState_1e3bu_1990";
8926
- var codeRunning = "_codeRunning_1e3bu_2004";
8927
- var codeDot = "_codeDot_1e3bu_2005";
8928
- var pop = "_pop_1e3bu_1";
8929
- var toolChip = "_toolChip_1e3bu_2101";
8930
- var toolSummary = "_toolSummary_1e3bu_2112";
9097
+ var wrapper = "_wrapper_1jypc_3";
9098
+ var collapsed = "_collapsed_1jypc_80";
9099
+ var feedWrap = "_feedWrap_1jypc_80";
9100
+ var followBar = "_followBar_1jypc_85";
9101
+ var followBarBody = "_followBarBody_1jypc_95";
9102
+ var followBarStatus = "_followBarStatus_1jypc_110";
9103
+ var followBarLens = "_followBarLens_1jypc_120";
9104
+ var voiceActions = "_voiceActions_1jypc_130";
9105
+ var header = "_header_1jypc_148";
9106
+ var brand = "_brand_1jypc_161";
9107
+ var titleBlock = "_titleBlock_1jypc_185";
9108
+ var title = "_title_1jypc_185";
9109
+ var status = "_status_1jypc_200";
9110
+ var controls = "_controls_1jypc_208";
9111
+ var iconButton = "_iconButton_1jypc_214";
9112
+ var stopButton = "_stopButton_1jypc_232";
9113
+ var feed = "_feed_1jypc_80";
9114
+ var rail = "_rail_1jypc_263";
9115
+ var railThumb = "_railThumb_1jypc_294";
9116
+ var railMark = "_railMark_1jypc_303";
9117
+ var divider = "_divider_1jypc_373";
9118
+ var peek = "_peek_1jypc_393";
9119
+ var peekIn = "_peekIn_1jypc_1";
9120
+ var peekHead = "_peekHead_1jypc_421";
9121
+ var peekText = "_peekText_1jypc_436";
9122
+ var pin = "_pin_1jypc_449";
9123
+ var jump = "_jump_1jypc_482";
9124
+ var jumpIn = "_jumpIn_1jypc_1";
9125
+ var empty = "_empty_1jypc_523";
9126
+ var enter = "_enter_1jypc_531";
9127
+ var bubble = "_bubble_1jypc_546";
9128
+ var line$1 = "_line_1jypc_556";
9129
+ var reflection = "_reflection_1jypc_563";
9130
+ var observation = "_observation_1jypc_568";
9131
+ var warning = "_warning_1jypc_572";
9132
+ var live = "_live_1jypc_576";
9133
+ var pulse = "_pulse_1jypc_1";
9134
+ var tool$1 = "_tool_1jypc_605";
9135
+ var toolHead = "_toolHead_1jypc_622";
9136
+ var toolDot = "_toolDot_1jypc_628";
9137
+ var toolLabel$1 = "_toolLabel_1jypc_636";
9138
+ var toolDetail = "_toolDetail_1jypc_641";
9139
+ var spinner$1 = "_spinner_1jypc_649";
9140
+ var spin = "_spin_1jypc_649";
9141
+ var question = "_question_1jypc_667";
9142
+ var questionTag = "_questionTag_1jypc_672";
9143
+ var questionText = "_questionText_1jypc_680";
9144
+ var result = "_result_1jypc_685";
9145
+ var resultText = "_resultText_1jypc_712";
9146
+ var composer = "_composer_1jypc_720";
9147
+ var answerContext = "_answerContext_1jypc_729";
9148
+ var choiceRow = "_choiceRow_1jypc_738";
9149
+ var choiceChip = "_choiceChip_1jypc_744";
9150
+ var choiceConfirm = "_choiceConfirm_1jypc_769";
9151
+ var box = "_box_1jypc_788";
9152
+ var actions = "_actions_1jypc_827";
9153
+ var attachList = "_attachList_1jypc_833";
9154
+ var attachChip = "_attachChip_1jypc_840";
9155
+ var attachName = "_attachName_1jypc_852";
9156
+ var attachRemove = "_attachRemove_1jypc_859";
9157
+ var attachError = "_attachError_1jypc_883";
9158
+ var roundButton = "_roundButton_1jypc_889";
9159
+ var send = "_send_1jypc_907";
9160
+ var studio = "_studio_1jypc_920";
9161
+ var studioHeader = "_studioHeader_1jypc_930";
9162
+ var studioTitle = "_studioTitle_1jypc_937";
9163
+ var studioTabs = "_studioTabs_1jypc_942";
9164
+ var studioTab = "_studioTab_1jypc_942";
9165
+ var studioBody = "_studioBody_1jypc_964";
9166
+ var studioHint = "_studioHint_1jypc_973";
9167
+ var studioToolbar = "_studioToolbar_1jypc_980";
9168
+ var studioToolButton = "_studioToolButton_1jypc_986";
9169
+ var studioStatus = "_studioStatus_1jypc_1012";
9170
+ var studioAsk = "_studioAsk_1jypc_1032";
9171
+ var studioSteps = "_studioSteps_1jypc_1050";
9172
+ var studioCatalog = "_studioCatalog_1jypc_1051";
9173
+ var studioStep = "_studioStep_1jypc_1050";
9174
+ var studioCatalogRow = "_studioCatalogRow_1jypc_1063";
9175
+ var studioWatchers = "_studioWatchers_1jypc_1078";
9176
+ var studioWatchersHead = "_studioWatchersHead_1jypc_1088";
9177
+ var studioWatchersTitle = "_studioWatchersTitle_1jypc_1095";
9178
+ var studioWatchersEmpty = "_studioWatchersEmpty_1jypc_1103";
9179
+ var studioWatchersList = "_studioWatchersList_1jypc_1109";
9180
+ var studioWatcherChip = "_studioWatcherChip_1jypc_1118";
9181
+ var studioWatcherLabel = "_studioWatcherLabel_1jypc_1131";
9182
+ var studioWatcherMeta = "_studioWatcherMeta_1jypc_1139";
9183
+ var studioStepBody = "_studioStepBody_1jypc_1162";
9184
+ var studioCatalogBody = "_studioCatalogBody_1jypc_1163";
9185
+ var studioStepKind = "_studioStepKind_1jypc_1168";
9186
+ var studioStepMeta = "_studioStepMeta_1jypc_1180";
9187
+ var studioCatalogMeta = "_studioCatalogMeta_1jypc_1181";
9188
+ var studioStepActions = "_studioStepActions_1jypc_1186";
9189
+ var studioCatalogActions = "_studioCatalogActions_1jypc_1187";
9190
+ var studioPreviewLabel = "_studioPreviewLabel_1jypc_1230";
9191
+ var studioPreview = "_studioPreview_1jypc_1230";
9192
+ var voice = "_voice_1jypc_130";
9193
+ var voiceMeta = "_voiceMeta_1jypc_1268";
9194
+ var lens = "_lens_1jypc_1276";
9195
+ var breathe = "_breathe_1jypc_1";
9196
+ var voiceText = "_voiceText_1jypc_1320";
9197
+ var micDevice = "_micDevice_1jypc_1329";
9198
+ var textButton = "_textButton_1jypc_1358";
9199
+ var fab = "_fab_1jypc_1377";
9200
+ var fabLeft = "_fabLeft_1jypc_1421";
9201
+ var tip = "_tip_1jypc_1427";
9202
+ var tipUp = "_tipUp_1jypc_1450";
9203
+ var code = "_code_1jypc_1820";
9204
+ var codeHead = "_codeHead_1jypc_1838";
9205
+ var codeTitle = "_codeTitle_1jypc_1845";
9206
+ var codeMeta = "_codeMeta_1jypc_1850";
9207
+ var codeStatus = "_codeStatus_1jypc_1860";
9208
+ var codeBadge = "_codeBadge_1jypc_1870";
9209
+ var codeSection = "_codeSection_1jypc_1880";
9210
+ var codeLabel = "_codeLabel_1jypc_1885";
9211
+ var clip = "_clip_1jypc_1894";
9212
+ var codeBlock$1 = "_codeBlock_1jypc_1899";
9213
+ var resultBlock = "_resultBlock_1jypc_1900";
9214
+ var clipBody = "_clipBody_1jypc_1917";
9215
+ var clipToggle = "_clipToggle_1jypc_1940";
9216
+ var tkComment = "_tkComment_1jypc_1959";
9217
+ var tkString = "_tkString_1jypc_1964";
9218
+ var tkNumber = "_tkNumber_1jypc_1968";
9219
+ var tkKeyword = "_tkKeyword_1jypc_1972";
9220
+ var tkName = "_tkName_1jypc_1976";
9221
+ var tkPunct = "_tkPunct_1jypc_1980";
9222
+ var tkKey = "_tkKey_1jypc_1972";
9223
+ var tkBool = "_tkBool_1jypc_1988";
9224
+ var foldHead = "_foldHead_1jypc_2000";
9225
+ var foldBody = "_foldBody_1jypc_2023";
9226
+ var foldInner = "_foldInner_1jypc_2029";
9227
+ var fold = "_fold_1jypc_2000";
9228
+ var toolState = "_toolState_1jypc_2043";
9229
+ var codeRunning = "_codeRunning_1jypc_2057";
9230
+ var codeDot = "_codeDot_1jypc_2058";
9231
+ var pop = "_pop_1jypc_1";
9232
+ var toolChip = "_toolChip_1jypc_2154";
9233
+ var toolSummary = "_toolSummary_1jypc_2165";
8931
9234
  var Panel_module_default = {
8932
9235
  wrapper,
8933
9236
  collapsed,
@@ -8980,6 +9283,9 @@ var Panel_module_default = {
8980
9283
  resultText,
8981
9284
  composer,
8982
9285
  answerContext,
9286
+ choiceRow,
9287
+ choiceChip,
9288
+ choiceConfirm,
8983
9289
  box,
8984
9290
  actions,
8985
9291
  attachList,
@@ -9478,6 +9784,15 @@ function toolVisual(name, input, output) {
9478
9784
  tone: "ask",
9479
9785
  summary: truncate(textOf(args.question), 32)
9480
9786
  };
9787
+ case "get_context": {
9788
+ const yMin = textOf(args.y_min);
9789
+ const yMax = textOf(args.y_max);
9790
+ return {
9791
+ icon: "list",
9792
+ tone: "generic",
9793
+ summary: truncate(yMin || yMax ? `${yMin || "0"}–${yMax || "…"}` : "viewport", 24)
9794
+ };
9795
+ }
9481
9796
  default: return {
9482
9797
  icon: "spark",
9483
9798
  tone: "generic",
@@ -10100,6 +10415,7 @@ var Panel = class {
10100
10415
  #outcomeSpoken = false;
10101
10416
  #live = null;
10102
10417
  #question = null;
10418
+ #choiceRow = null;
10103
10419
  #fab;
10104
10420
  #rail;
10105
10421
  #thumb;
@@ -10167,7 +10483,7 @@ var Panel = class {
10167
10483
  this.#recovery = null;
10168
10484
  console.warn("[page-agent] Conversation recovery unavailable", error);
10169
10485
  }
10170
- this.#agent.onAskUser = (question, options) => this.#askUser(question, options?.signal);
10486
+ this.#agent.onAskUser = (question, options) => this.#askUser(question, options);
10171
10487
  this.#wrapper = this.#createWrapper();
10172
10488
  this.#feed = this.#wrapper.querySelector("[data-role=\"feed\"]");
10173
10489
  if (typeof ResizeObserver !== "undefined") new ResizeObserver(() => {
@@ -10555,26 +10871,97 @@ var Panel = class {
10555
10871
  * Ask the user a question on behalf of the agent. Rejects when `signal` aborts
10556
10872
  * (task stopped or disposed), so the agent loop can settle.
10557
10873
  */
10558
- #askUser(question, signal) {
10874
+ #askUser(question, options) {
10559
10875
  return new Promise((resolve, reject) => {
10876
+ const choices = (options?.choices ?? []).map((c) => c.trim()).filter(Boolean);
10877
+ let kind = options?.kind ?? "text";
10878
+ if ((kind === "choice" || kind === "multi") && choices.length < 2) kind = "text";
10560
10879
  this.#question = {
10561
- text: question,
10880
+ text: question.trim(),
10881
+ kind,
10882
+ choices,
10883
+ selected: /* @__PURE__ */ new Set(),
10562
10884
  resolve
10563
10885
  };
10564
10886
  this.#setCollapsed(false);
10565
10887
  this.#render();
10888
+ const choiceLine = kind === "text" || choices.length === 0 ? "" : `\nOptions (${kind}): ${choices.map((c, i) => `${i + 1}. ${c}`).join("; ")}`;
10566
10889
  this.#voice.report({
10567
10890
  kind: "question",
10568
- text: question
10891
+ text: `${question.trim()}${choiceLine}`
10569
10892
  });
10570
- this.#textarea.focus();
10571
- signal?.addEventListener("abort", () => {
10893
+ if (kind === "text") this.#textarea.focus();
10894
+ options?.signal?.addEventListener("abort", () => {
10572
10895
  this.#question = null;
10573
10896
  this.#render();
10574
- reject(signal.reason);
10897
+ reject(options.signal.reason);
10575
10898
  }, { once: true });
10576
10899
  });
10577
10900
  }
10901
+ /** Resolve a pending ask from text, voice, or a choice chip. */
10902
+ #resolveQuestion(answer) {
10903
+ if (!this.#question) return false;
10904
+ const value = answer.trim();
10905
+ if (!value) return false;
10906
+ const { resolve } = this.#question;
10907
+ this.#question = null;
10908
+ this.#choiceRow?.remove();
10909
+ this.#choiceRow = null;
10910
+ resolve(value);
10911
+ this.#render();
10912
+ return true;
10913
+ }
10914
+ /** Choice / multi-choice chips under the ask prompt. */
10915
+ #renderChoiceChips() {
10916
+ const q = this.#question;
10917
+ if (!q || q.kind !== "choice" && q.kind !== "multi" || q.choices.length === 0) {
10918
+ this.#choiceRow?.remove();
10919
+ this.#choiceRow = null;
10920
+ return;
10921
+ }
10922
+ const t = this.#i18n.t.bind(this.#i18n);
10923
+ let row = this.#choiceRow;
10924
+ if (!row) {
10925
+ row = document.createElement("div");
10926
+ row.className = Panel_module_default.choiceRow;
10927
+ row.dataset.role = "choice-row";
10928
+ this.#answerContext.append(row);
10929
+ this.#choiceRow = row;
10930
+ }
10931
+ row.replaceChildren();
10932
+ for (const choice of q.choices) {
10933
+ const btn = document.createElement("button");
10934
+ btn.type = "button";
10935
+ btn.className = Panel_module_default.choiceChip;
10936
+ btn.textContent = choice;
10937
+ const selected = q.selected.has(choice);
10938
+ btn.setAttribute("aria-pressed", String(selected));
10939
+ if (selected) btn.dataset.selected = "true";
10940
+ btn.addEventListener("click", () => {
10941
+ if (!this.#question) return;
10942
+ if (this.#question.kind === "choice") {
10943
+ this.#resolveQuestion(choice);
10944
+ return;
10945
+ }
10946
+ if (this.#question.selected.has(choice)) this.#question.selected.delete(choice);
10947
+ else this.#question.selected.add(choice);
10948
+ this.#render();
10949
+ });
10950
+ row.append(btn);
10951
+ }
10952
+ if (q.kind === "multi") {
10953
+ const confirm = document.createElement("button");
10954
+ confirm.type = "button";
10955
+ confirm.className = Panel_module_default.choiceConfirm;
10956
+ confirm.textContent = t("ui.panel.answerConfirmMulti");
10957
+ confirm.disabled = q.selected.size === 0;
10958
+ confirm.addEventListener("click", () => {
10959
+ if (!this.#question || this.#question.selected.size === 0) return;
10960
+ this.#resolveQuestion([...this.#question.selected].join("; "));
10961
+ });
10962
+ row.append(confirm);
10963
+ }
10964
+ }
10578
10965
  #submit() {
10579
10966
  const value = this.#textarea.value.trim();
10580
10967
  if (!value) return;
@@ -10582,15 +10969,21 @@ var Panel = class {
10582
10969
  this.#textarea.value = "";
10583
10970
  this.#autoSize();
10584
10971
  }
10972
+ /**
10973
+ * Mid-task user note for the running agent. Returns false when there is no running task
10974
+ * or the agent cannot take observations.
10975
+ */
10976
+ #noteRunning(text) {
10977
+ const value = text.trim();
10978
+ if (!value || this.#agent.status !== "running") return false;
10979
+ if (typeof this.#agent.pushObservation !== "function") return false;
10980
+ this.#agent.pushObservation(`User said while the task was running: ${value}`);
10981
+ this.#render();
10982
+ return true;
10983
+ }
10585
10984
  /** Sends a task or answers a pending question. The text field and voice both use this path. */
10586
10985
  #send(value) {
10587
- if (this.#question) {
10588
- const { resolve } = this.#question;
10589
- this.#question = null;
10590
- resolve(value);
10591
- this.#render();
10592
- return true;
10593
- }
10986
+ if (this.#question) return this.#resolveQuestion(value);
10594
10987
  if (this.#agent.status === "running") return false;
10595
10988
  this.#archiveCurrent();
10596
10989
  this.#anchorTurn = true;
@@ -10647,6 +11040,40 @@ var Panel = class {
10647
11040
  this.#render();
10648
11041
  return output;
10649
11042
  }
11043
+ /** Active task / ask / recent steps so the voice can explain without losing prior context. */
11044
+ #voiceAgentBrief() {
11045
+ const lines = [];
11046
+ const status = this.#agent.status;
11047
+ const task = this.#agent.task?.trim();
11048
+ if (task) lines.push(`Active task (${status}): ${task}`);
11049
+ else lines.push(`Agent status: ${status}`);
11050
+ if (this.#question) lines.push(`Pending ask (${this.#question.kind}): ${this.#question.text}` + (this.#question.choices.length ? ` Options: ${this.#question.choices.join(" | ")}` : ""));
11051
+ const recent = this.#agent.history.slice(-6);
11052
+ for (const event of recent) {
11053
+ if (event.type === "observation" && event.content) {
11054
+ lines.push(`obs: ${event.content.slice(0, 180)}`);
11055
+ continue;
11056
+ }
11057
+ if (event.type === "step") {
11058
+ const goal = event.reflection?.next_goal?.trim();
11059
+ const action = event.action?.name;
11060
+ const bit = [goal && `goal=${goal}`, action && `action=${action}`].filter(Boolean).join(", ");
11061
+ if (bit) lines.push(`step: ${bit}`);
11062
+ }
11063
+ }
11064
+ return lines.join("\n");
11065
+ }
11066
+ /** Read-only context slice for the voice; allowed while the agent is running. */
11067
+ async #runVoiceGetContext(args) {
11068
+ const brief = this.#voiceAgentBrief();
11069
+ const run = this.#config.getContext;
11070
+ if (!run) return `${brief}\n\nget_context is not available in this session.`;
11071
+ try {
11072
+ return `${brief}\n\n${await run(args)}`;
11073
+ } catch (error) {
11074
+ return `${brief}\n\nget_context failed: ${error instanceof Error ? error.message : "unknown error"}`;
11075
+ }
11076
+ }
10650
11077
  /**
10651
11078
  * The voice session. The voice model hands a task to the agent through run_task; a task that the agent
10652
11079
  * cannot take now (already running) is answered back to the model by the session.
@@ -10662,6 +11089,10 @@ var Panel = class {
10662
11089
  createClient: (callbacks) => this.#config.voice?.provider === "gemini" ? new GeminiLiveClient(callbacks) : new RealtimeClient(callbacks),
10663
11090
  onTask: (task) => this.#send(task),
10664
11091
  onScript: (script) => this.#runVoiceScript(script),
11092
+ isWaitingForAnswer: () => this.#question !== null,
11093
+ onAnswer: (answer) => this.#resolveQuestion(answer),
11094
+ onNote: (text) => this.#noteRunning(text),
11095
+ onGetContext: (args) => this.#runVoiceGetContext(args),
10665
11096
  onChange: () => this.#render()
10666
11097
  });
10667
11098
  }
@@ -10744,7 +11175,12 @@ var Panel = class {
10744
11175
  this.#agent.history.length,
10745
11176
  this.#agent.history.at(-1) ?? null,
10746
11177
  this.#agent.status === "running" ? this.#live : null,
10747
- this.#question?.text ?? null,
11178
+ this.#question ? {
11179
+ text: this.#question.text,
11180
+ kind: this.#question.kind,
11181
+ choices: this.#question.choices,
11182
+ selected: [...this.#question.selected]
11183
+ } : null,
10748
11184
  this.#question ? null : this.#resultKind(),
10749
11185
  this.#voiceRuns.list,
10750
11186
  this.#archive.length,
@@ -10777,10 +11213,24 @@ var Panel = class {
10777
11213
  this.#renderFollowBar();
10778
11214
  this.#renderSkillsStudio();
10779
11215
  this.#answerContext.hidden = !answering;
10780
- this.#answerContext.textContent = answering ? t("ui.panel.answerTitle") : "";
10781
- this.#textarea.disabled = running && !answering;
10782
- this.#textarea.placeholder = answering ? t("ui.panel.composerAnswer") : running ? t("ui.panel.composerRunning") : t("ui.panel.composerPlaceholder");
10783
- this.#sendButton.disabled = running && !answering;
11216
+ if (answering && this.#question) {
11217
+ const q = this.#question;
11218
+ const title = q.kind === "multi" ? t("ui.panel.answerTitleMulti") : q.kind === "choice" ? t("ui.panel.answerTitleChoice") : t("ui.panel.answerTitle");
11219
+ this.#choiceRow = null;
11220
+ this.#answerContext.replaceChildren();
11221
+ const label = document.createElement("div");
11222
+ label.textContent = `${title}: ${q.text}`;
11223
+ this.#answerContext.append(label);
11224
+ this.#renderChoiceChips();
11225
+ } else {
11226
+ this.#answerContext.textContent = "";
11227
+ this.#choiceRow?.remove();
11228
+ this.#choiceRow = null;
11229
+ }
11230
+ const choiceOnly = answering && this.#question !== null && this.#question.kind === "choice";
11231
+ this.#textarea.disabled = running && !answering || choiceOnly;
11232
+ this.#textarea.placeholder = answering ? this.#question?.kind === "multi" ? t("ui.panel.composerAnswerMulti") : this.#question?.kind === "choice" ? t("ui.panel.composerAnswerChoice") : t("ui.panel.composerAnswer") : running ? t("ui.panel.composerRunning") : t("ui.panel.composerPlaceholder");
11233
+ this.#sendButton.disabled = running && !answering || choiceOnly;
10784
11234
  setButton(this.#sendButton, "send", t("ui.panel.send"));
10785
11235
  setButton(this.#exportButton, "download", t("ui.panel.exportLog"));
10786
11236
  this.#exportButton.hidden = this.#archive.length === 0 && this.#agent.history.length === 0;
@@ -11970,7 +12420,8 @@ var PageAgent = class extends PageAgentCore {
11970
12420
  promptForNextTask: config.promptForNextTask,
11971
12421
  name: config.name,
11972
12422
  voice: config.voice,
11973
- runScript: (script) => this.#runScript(script)
12423
+ runScript: (script) => this.#runScript(script),
12424
+ getContext: (args) => this.#getContext(args)
11974
12425
  });
11975
12426
  }
11976
12427
  /** Runs a script in the page with this agent in scope, through the same tool the executor uses. */
@@ -11988,6 +12439,16 @@ var PageAgent = class extends PageAgentCore {
11988
12439
  const run = tool.execute.call(this, { script }, { signal: controller.signal });
11989
12440
  return Promise.race([run, limit]).finally(() => clearTimeout(timer));
11990
12441
  }
12442
+ /** Read-only context slice for the voice tool (does not rebind agent indexes). */
12443
+ async #getContext(args) {
12444
+ return (await this.pageController.getContext({
12445
+ yMin: args.yMin,
12446
+ yMax: args.yMax,
12447
+ maxLines: args.maxLines ?? 60,
12448
+ query: args.query,
12449
+ bindIndexes: false
12450
+ })).message;
12451
+ }
11991
12452
  };
11992
12453
  //#endregion
11993
12454
  export { AxError, DEFAULT_REMOTE_CACHE_TTL_MS, MAX_AGENT_SKILLS, MAX_SKILL_DOCUMENT_BYTES, MAX_TASK_FILE_BYTES, PageAgent, PageAgentCore, SKILL_COMMAND_PATTERN, SKILL_COMMAND_TIMEOUT_MS, SKILL_ID_PATTERN, SKILL_JS_FENCE, SKILL_STORAGE_KEY, SkillHost, SkillParseError, SkillRemoteError, createBrowserSkillStorage, createMemorySkillStorage, createSkillCommandAbort, createSkillFileStore, createSkillRecorder, createTestSkillHost, evaluateSkillCommands, extractSkillJs, parseFrontmatterYaml, parseSkillDocument, readTaskFileBlob, skillToolName, splitFrontmatter, synthesizeFromSteps, tool };