// 浏览器侧子入口:page-operate 工具包的页面执行面。 // // 单独成入口(不并进 client 桶文件)是因为宿主接这段时只想要 DOM 执行与事件桥, // 不该被迫拖进 ai-page 的预览/发布页模块。本入口只依赖 DOM 与助手挂件的事件常量, // 不引服务端模块(ai / zod / node:*)。 // // 典型接法(宿主侧): // mountPageOperateEffectOnPage({ // resolvePageDocument: () => 当前那张页面的 document, // 整页宿主直接回 document // onFailure: (reason) => toast(reason, 'warning'), // 必须出声,理由见模块抬头 // }); // 别忘了同时在 ai.config 里开包:assistant.toolkits.page-operate.enabled: true export { mountPageOperateEffect, mountPageOperateEffectOnPage, resolveCurrentPageDocument, runPageOperation, matchRiskyKeyword, DEFAULT_RISKY_KEYWORDS, type PageOperateEffectContext, type PageOperateEffectHandle, type PageOperateRetryOptions, type PageOperateRiskContext, } from '../domain/ai-assistant/page-operate/mountPageOperateEffect'; export { isRetryableDomOperateResult, operateInDocument, type DomOperateFailureCode, type DomOperateRequest, type DomOperateResult, } from '../domain/ai-assistant/page-operate/operateInDocument'; export { describePageControls, describePageText, type DescribePageControlsOptions, } from '../domain/ai-assistant/page-operate/describePageControls'; export { normalizeAiChatPageContext, type AiChatPageContext, } from '../domain/ai-assistant/AiChatPageContext'; export { PAGE_OPERATE_ACTIONS, PAGE_OPERATE_EFFECT, PAGE_OPERATE_TARGET_MAX_LENGTH, PAGE_OPERATE_TOOL, PAGE_OPERATE_VALUE_MAX_LENGTH, isPageOperateAction, normalizePageOperateEffect, type PageOperateAction, type PageOperateEffect, } from '../domain/ai-assistant/page-operate/PageOperateContract';