@tanzerfe/page-use 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/flow.d.mts +1 -1
- package/dist/flow.mjs +1 -1
- package/dist/{index-zDjmWzFh.d.mts → index-CzWLOKue.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{options-BhKU0oJ5.d.mts → options-CS8LsaB8.d.mts} +11 -1
- package/dist/{src-DAbH8ij6.mjs → src-BgrtN4uP.mjs} +9 -7
- package/dist/{tool-CvEvIsN9.mjs → tool-B-3dgswr.mjs} +302 -25
- package/dist/vue.d.mts +3 -3
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/flow.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as FlowCheckBinding, $t as FlowStatus, A as PageUseManagerPresentation, At as FlowPermissions, B as validateFlowInputs, Bt as FlowRepository, C as getPageUseFlowCatalog, Ct as FlowKnowledgeRecord, D as mountPageUseManager, Dt as FlowOutputReference, E as definePageUseManagerElement, Et as FlowMode, F as parseFlowRegion, Ft as FlowRegionContext, G as FlowActionBinding, Gt as FlowRunner, H as FLOW_BUNDLE_VERSION, Ht as FlowResolvedTarget, I as parseFlowScene, It as FlowRegionFailure, J as FlowApiSyncOptions, Jt as FlowScope, K as FlowApiRequest, Kt as FlowScene, L as parseFlowSceneDraft, Lt as FlowRegionHost, M as newRevision, Mt as FlowRegion, N as parseFlowBundle, Nt as FlowRegionAnchor, O as PAGE_USE_MANAGER_TAG, Ot as FlowParameter, P as parseFlowKnowledge, Pt as FlowRegionCandidate, Q as FlowCheck, Qt as FlowSnapshot, R as sceneKey, Rt as FlowRegionPage, S as PAGE_USE_FLOW_TOOL, St as FlowKnowledge, T as MountPageUseManagerOptions, Tt as FlowManagerState, U as FLOW_SCHEMA_VERSION, Ut as FlowRunOptions, V as validateSceneBindings, Vt as FlowRepositorySnapshot, W as FlowAction, Wt as FlowRunResult, X as FlowBoundCheck, Xt as FlowSegmentLog, Y as FlowBindings, Yt as FlowSegment, Z as FlowBundle, Zt as FlowSessionContext, _t as FlowGenerator, an as PageUseFlowOptions, at as FlowCloudState, bt as FlowImportStrategy, ct as FlowConfigResponse, dt as FlowDescriptionCheck, en as FlowStep, et as FlowClient, ft as FlowError, gt as FlowExportOptions, ht as FlowExecutionPorts, in as PageUseFlowHandle, it as FlowCloudRelease, j as FLOW_SEGMENT_MAX_CHARS, jt as FlowPresenter, k as PageUseManagerElement, kt as FlowParameterDefinition, lt as FlowContext, mt as FlowEvent, nn as JsonObject, nt as FlowCloudCache, o as NormalizedLLMOptions, ot as FlowCompletionDecision, pt as FlowErrorCode, q as FlowApiResponse, qt as FlowSceneRecord, rn as JsonValue, rt as FlowCloudController, st as FlowCompletionEvaluator, tn as FlowTombstone, tt as FlowCloudAdapter, ut as FlowContextBinding, vt as FlowIdentity, w as runPageUseFlowTool, wt as FlowManager, xt as FlowInputDefinition, yt as FlowImportPreview, z as scopeKey, zt as FlowRegionSelector } from "./options-CS8LsaB8.mjs";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
//#region src/flow/schema.d.ts
|
|
4
4
|
export declare const FLOW_SCENE_JSON_SCHEMA: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
package/dist/flow.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as parseFlowBundle, C as createIndexedDbFlowRepository, D as flowSceneDraftSchema, E as flowBundleSchema, F as sceneKey, I as scopeKey, L as validateFlowInputs,
|
|
1
|
+
import { A as parseFlowBundle, Bt as FLOW_SCHEMA_VERSION, C as createIndexedDbFlowRepository, D as flowSceneDraftSchema, E as flowBundleSchema, F as sceneKey, I as scopeKey, L as validateFlowInputs, M as parseFlowRegion, N as parseFlowScene, O as flowSceneSchema, P as parseFlowSceneDraft, S as previewFlowImport, Vt as FlowError, _ as createFlowApiAdapter, a as mountPageUseManager, b as exportFlowBundle, c as createFlowRegionPicker, d as evaluateFlowCompletion, g as validateRegionPages, i as definePageUseManagerElement, j as parseFlowKnowledge, k as newRevision, l as createFlowRunner, m as locateFlowRegion, n as getPageUseFlowCatalog, o as PAGE_USE_MANAGER_TAG, r as runPageUseFlowTool, s as PageUseManagerElement, t as PAGE_USE_FLOW_TOOL, u as createCompletionEvaluator, w as FLOW_SEGMENT_MAX_CHARS, x as importFlowBundle, y as createFlowCloud, z as validateSceneBindings, zt as FLOW_BUNDLE_VERSION } from "./tool-B-3dgswr.mjs";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
|
|
4
4
|
//#region src/flow/schema.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as PageUsePreset, dn as PageUseSnapshot, fn as PageUseStepLog, h as PageUseTtsEngine, in as PageUseFlowHandle, ln as PageUseProgressEvent, mn as PageUseTaskSource, pn as PageUseTaskResult, s as NormalizedPageUseOptions, sn as PageUseMenuNode, u as PageUseOptions, un as PageUseRunOptions } from "./options-CS8LsaB8.mjs";
|
|
2
2
|
import { AgentStatus } from "page-agent";
|
|
3
3
|
import { LitElement, PropertyValues, nothing } from "lit";
|
|
4
4
|
//#region src/capability/api.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as PageUseGlobal, B as MountPageUseUIOptions, C as getElapsedSeconds, D as pageUseStore, E as isRunning, F as PAGE_USE_TOOL_NAME, G as PageUseLauncherElement, H as mountPageUseUI, I as PageUseCommand, J as createPageUse, K as PageUseLauncherLayout, L as formatPageUseResultForModel, M as showPageUseLauncher, N as PAGE_USE_COMMAND_TYPE, O as ReadonlyStore, P as PAGE_USE_TOOL, R as isPageUseCommand, S as clearPageUseLog, T as isPageUseConfigured, U as PAGE_USE_LAUNCHER_TAG, V as definePageUseElements, W as PageUseLauncherConfig, X as PageUseCapability, Y as getPageUseFlow, Z as pageUseCapability, _ as pageUseSettings, a as PAGE_USE_ROBOT_ICON_SVG, b as PageUseQuestion, c as PageUseCustomPreset, d as pageUsePresets, f as PageUseHistoryEntry, g as PageUseSettings, h as PageUsePoint, i as PageUseGlowElement, j as hidePageUseLauncher, k as PAGE_USE_GLOBAL_KEY, l as PageUsePresetSaveResult, m as DEFAULT_PAGE_USE_SETTINGS, n as SIMULATOR_MASK_ID, o as PAGE_USE_STATIC_PRESETS, p as pageUseHistory, q as PageUseHandle, r as PAGE_USE_GLOW_TAG, s as buildMenuPresets, t as PAGE_USE_MASK_COLORS, u as PageUsePresetState, v as BROWSER_ENGINE_ID, w as getPageUseConfig, x as PageUseState, y as browserTtsEngine, z as runPageUseTool } from "./index-
|
|
3
|
-
export { BROWSER_ENGINE_ID, DEFAULT_MAX_STEPS, DEFAULT_MODEL, DEFAULT_PAGE_USE_SETTINGS, DEFAULT_SESSION_HEADER, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_TOUR_MAX_TAB_SWITCHES, DEFAULT_TOUR_STYLES, FLOW_BUNDLE_VERSION, FLOW_SCHEMA_VERSION, FlowAction, FlowActionBinding, FlowApiRequest, FlowApiResponse, FlowApiSyncOptions, FlowBindings, FlowBoundCheck, FlowBundle, FlowCheck, FlowCheckBinding, FlowClient, FlowCloudAdapter, FlowCloudCache, FlowCloudController, FlowCloudRelease, FlowCloudState, FlowCompletionDecision, FlowCompletionEvaluator, FlowConfigResponse, FlowContext, FlowContextBinding, FlowDescriptionCheck, FlowError, FlowErrorCode, FlowEvent, FlowExecutionPorts, FlowExportOptions, FlowGenerator, FlowIdentity, FlowImportPreview, FlowImportStrategy, FlowInputDefinition, FlowKnowledge, FlowKnowledgeRecord, FlowManager, FlowManagerState, FlowMode, FlowOutputReference, FlowParameter, FlowParameterDefinition, FlowPermissions, FlowPresenter, FlowRegion, FlowRegionAnchor, FlowRegionCandidate, FlowRegionContext, FlowRegionFailure, FlowRegionHost, FlowRegionPage, FlowRegionSelector, FlowRepository, FlowRepositorySnapshot, FlowResolvedTarget, FlowRunOptions, FlowRunResult, FlowRunner, FlowScene, FlowSceneRecord, FlowScope, FlowSegment, FlowSegmentLog, FlowSessionContext, FlowSnapshot, FlowStatus, FlowStep, FlowTombstone, JsonObject, JsonValue, type MountPageUseManagerOptions, type MountPageUseUIOptions, type NormalizedPageUseOptions, PAGE_USE_COMMAND_TYPE, PAGE_USE_FLOW_TOOL, PAGE_USE_GLOBAL_KEY, PAGE_USE_GLOW_TAG, PAGE_USE_LAUNCHER_TAG, PAGE_USE_MASK_COLORS, PAGE_USE_ROBOT_ICON_SVG, PAGE_USE_STATIC_PRESETS, PAGE_USE_TOOL, PAGE_USE_TOOL_NAME, type PageUseCapability, type PageUseCommand, type PageUseCustomPreset, type PageUseErrorCode, PageUseFlowHandle, PageUseFlowOptions, type PageUseGlobal, PageUseGlowElement, type PageUseHandle, type PageUseHistoryEntry, type PageUseLLMOptions, type PageUseLauncherConfig, PageUseLauncherElement, type PageUseLauncherLayout, type PageUseMenuNode, type PageUseOptions, type PageUsePoint, type PageUsePreset, type PageUsePresetSaveResult, type PageUsePresetState, type PageUseProgressEvent, type PageUseQuestion, type PageUseRouterMode, type PageUseRunOptions, type PageUseSettings, type PageUseSnapshot, type PageUseState, type PageUseStepLog, type PageUseTaskResult, type PageUseTaskSource, type PageUseTaskStatus, type PageUseTourOptions, type PageUseTourStyle, type PageUseTtsEngine, type PageUseTtsSpeakOptions, type PageUseTtsVoice, type ReadonlyStore, SIMULATOR_MASK_ID, TOUR_STYLE_TRAINER, TOUR_STYLE_USER, browserTtsEngine, buildMenuPresets, clearPageUseLog, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher };
|
|
1
|
+
import { $ as FlowCheckBinding, $t as FlowStatus, At as FlowPermissions, Bt as FlowRepository, C as getPageUseFlowCatalog, Ct as FlowKnowledgeRecord, D as mountPageUseManager, Dt as FlowOutputReference, E as definePageUseManagerElement, Et as FlowMode, Ft as FlowRegionContext, G as FlowActionBinding, Gt as FlowRunner, H as FLOW_BUNDLE_VERSION, Ht as FlowResolvedTarget, I as parseFlowScene, It as FlowRegionFailure, J as FlowApiSyncOptions, Jt as FlowScope, K as FlowApiRequest, Kt as FlowScene, L as parseFlowSceneDraft, Lt as FlowRegionHost, M as newRevision, Mt as FlowRegion, Nt as FlowRegionAnchor, Ot as FlowParameter, P as parseFlowKnowledge, Pt as FlowRegionCandidate, Q as FlowCheck, Qt as FlowSnapshot, R as sceneKey, Rt as FlowRegionPage, S as PAGE_USE_FLOW_TOOL, St as FlowKnowledge, T as MountPageUseManagerOptions, Tt as FlowManagerState, U as FLOW_SCHEMA_VERSION, Ut as FlowRunOptions, Vt as FlowRepositorySnapshot, W as FlowAction, Wt as FlowRunResult, X as FlowBoundCheck, Xt as FlowSegmentLog, Y as FlowBindings, Yt as FlowSegment, Z as FlowBundle, Zt as FlowSessionContext, _ as PageUseTtsVoice, _t as FlowGenerator, a as DEFAULT_TOUR_MAX_TAB_SWITCHES, an as PageUseFlowOptions, at as FlowCloudState, b as TOUR_STYLE_TRAINER, bt as FlowImportStrategy, c as PageUseLLMOptions, cn as PageUsePreset, ct as FlowConfigResponse, d as PageUseRouterMode, dn as PageUseSnapshot, dt as FlowDescriptionCheck, en as FlowStep, et as FlowClient, f as PageUseTourOptions, fn as PageUseStepLog, ft as FlowError, g as PageUseTtsSpeakOptions, gt as FlowExportOptions, h as PageUseTtsEngine, hn as PageUseTaskStatus, ht as FlowExecutionPorts, i as DEFAULT_STORAGE_KEY_PREFIX, in as PageUseFlowHandle, it as FlowCloudRelease, jt as FlowPresenter, kt as FlowParameterDefinition, l as PageUseLLMStreamOptions, ln as PageUseProgressEvent, lt as FlowContext, m as readLauncherSwitch, mn as PageUseTaskSource, mt as FlowEvent, n as DEFAULT_MODEL, nn as JsonObject, nt as FlowCloudCache, on as PageUseErrorCode, ot as FlowCompletionDecision, p as normalizeOptions, pn as PageUseTaskResult, pt as FlowErrorCode, q as FlowApiResponse, qt as FlowSceneRecord, r as DEFAULT_SESSION_HEADER, rn as JsonValue, rt as FlowCloudController, s as NormalizedPageUseOptions, sn as PageUseMenuNode, st as FlowCompletionEvaluator, t as DEFAULT_MAX_STEPS, tn as FlowTombstone, tt as FlowCloudAdapter, u as PageUseOptions, un as PageUseRunOptions, ut as FlowContextBinding, v as DEFAULT_TOUR_STYLES, vt as FlowIdentity, w as runPageUseFlowTool, wt as FlowManager, x as TOUR_STYLE_USER, xt as FlowInputDefinition, y as PageUseTourStyle, yt as FlowImportPreview, zt as FlowRegionSelector } from "./options-CS8LsaB8.mjs";
|
|
2
|
+
import { A as PageUseGlobal, B as MountPageUseUIOptions, C as getElapsedSeconds, D as pageUseStore, E as isRunning, F as PAGE_USE_TOOL_NAME, G as PageUseLauncherElement, H as mountPageUseUI, I as PageUseCommand, J as createPageUse, K as PageUseLauncherLayout, L as formatPageUseResultForModel, M as showPageUseLauncher, N as PAGE_USE_COMMAND_TYPE, O as ReadonlyStore, P as PAGE_USE_TOOL, R as isPageUseCommand, S as clearPageUseLog, T as isPageUseConfigured, U as PAGE_USE_LAUNCHER_TAG, V as definePageUseElements, W as PageUseLauncherConfig, X as PageUseCapability, Y as getPageUseFlow, Z as pageUseCapability, _ as pageUseSettings, a as PAGE_USE_ROBOT_ICON_SVG, b as PageUseQuestion, c as PageUseCustomPreset, d as pageUsePresets, f as PageUseHistoryEntry, g as PageUseSettings, h as PageUsePoint, i as PageUseGlowElement, j as hidePageUseLauncher, k as PAGE_USE_GLOBAL_KEY, l as PageUsePresetSaveResult, m as DEFAULT_PAGE_USE_SETTINGS, n as SIMULATOR_MASK_ID, o as PAGE_USE_STATIC_PRESETS, p as pageUseHistory, q as PageUseHandle, r as PAGE_USE_GLOW_TAG, s as buildMenuPresets, t as PAGE_USE_MASK_COLORS, u as PageUsePresetState, v as BROWSER_ENGINE_ID, w as getPageUseConfig, x as PageUseState, y as browserTtsEngine, z as runPageUseTool } from "./index-CzWLOKue.mjs";
|
|
3
|
+
export { BROWSER_ENGINE_ID, DEFAULT_MAX_STEPS, DEFAULT_MODEL, DEFAULT_PAGE_USE_SETTINGS, DEFAULT_SESSION_HEADER, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_TOUR_MAX_TAB_SWITCHES, DEFAULT_TOUR_STYLES, FLOW_BUNDLE_VERSION, FLOW_SCHEMA_VERSION, FlowAction, FlowActionBinding, FlowApiRequest, FlowApiResponse, FlowApiSyncOptions, FlowBindings, FlowBoundCheck, FlowBundle, FlowCheck, FlowCheckBinding, FlowClient, FlowCloudAdapter, FlowCloudCache, FlowCloudController, FlowCloudRelease, FlowCloudState, FlowCompletionDecision, FlowCompletionEvaluator, FlowConfigResponse, FlowContext, FlowContextBinding, FlowDescriptionCheck, FlowError, FlowErrorCode, FlowEvent, FlowExecutionPorts, FlowExportOptions, FlowGenerator, FlowIdentity, FlowImportPreview, FlowImportStrategy, FlowInputDefinition, FlowKnowledge, FlowKnowledgeRecord, FlowManager, FlowManagerState, FlowMode, FlowOutputReference, FlowParameter, FlowParameterDefinition, FlowPermissions, FlowPresenter, FlowRegion, FlowRegionAnchor, FlowRegionCandidate, FlowRegionContext, FlowRegionFailure, FlowRegionHost, FlowRegionPage, FlowRegionSelector, FlowRepository, FlowRepositorySnapshot, FlowResolvedTarget, FlowRunOptions, FlowRunResult, FlowRunner, FlowScene, FlowSceneRecord, FlowScope, FlowSegment, FlowSegmentLog, FlowSessionContext, FlowSnapshot, FlowStatus, FlowStep, FlowTombstone, JsonObject, JsonValue, type MountPageUseManagerOptions, type MountPageUseUIOptions, type NormalizedPageUseOptions, PAGE_USE_COMMAND_TYPE, PAGE_USE_FLOW_TOOL, PAGE_USE_GLOBAL_KEY, PAGE_USE_GLOW_TAG, PAGE_USE_LAUNCHER_TAG, PAGE_USE_MASK_COLORS, PAGE_USE_ROBOT_ICON_SVG, PAGE_USE_STATIC_PRESETS, PAGE_USE_TOOL, PAGE_USE_TOOL_NAME, type PageUseCapability, type PageUseCommand, type PageUseCustomPreset, type PageUseErrorCode, PageUseFlowHandle, PageUseFlowOptions, type PageUseGlobal, PageUseGlowElement, type PageUseHandle, type PageUseHistoryEntry, type PageUseLLMOptions, type PageUseLLMStreamOptions, type PageUseLauncherConfig, PageUseLauncherElement, type PageUseLauncherLayout, type PageUseMenuNode, type PageUseOptions, type PageUsePoint, type PageUsePreset, type PageUsePresetSaveResult, type PageUsePresetState, type PageUseProgressEvent, type PageUseQuestion, type PageUseRouterMode, type PageUseRunOptions, type PageUseSettings, type PageUseSnapshot, type PageUseState, type PageUseStepLog, type PageUseTaskResult, type PageUseTaskSource, type PageUseTaskStatus, type PageUseTourOptions, type PageUseTourStyle, type PageUseTtsEngine, type PageUseTtsSpeakOptions, type PageUseTtsVoice, type ReadonlyStore, SIMULATOR_MASK_ID, TOUR_STYLE_TRAINER, TOUR_STYLE_USER, browserTtsEngine, buildMenuPresets, clearPageUseLog, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
import { _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as showPageUseLauncher, c as PAGE_USE_GLOW_TAG, d as getPageUseFlow, f as PAGE_USE_GLOBAL_KEY, g as formatPageUseResultForModel, h as PAGE_USE_TOOL_NAME, i as PageUseLauncherElement, l as PageUseGlowElement, m as PAGE_USE_TOOL, n as mountPageUseUI, o as buildMenuPresets, p as PAGE_USE_COMMAND_TYPE, r as PAGE_USE_LAUNCHER_TAG, s as PAGE_USE_ROBOT_ICON_SVG, t as definePageUseElements, u as createPageUse, v as runPageUseTool, x as pageUseCapability, y as hidePageUseLauncher } from "./src-
|
|
1
|
+
import { At as SIMULATOR_MASK_ID, Bt as FLOW_SCHEMA_VERSION, Ct as DEFAULT_TOUR_MAX_TAB_SWITCHES, Et as readLauncherSwitch, F as sceneKey, Ft as TOUR_STYLE_TRAINER, It as TOUR_STYLE_USER, J as isRunning, Mt as browserTtsEngine, N as parseFlowScene, P as parseFlowSceneDraft, Pt as DEFAULT_TOUR_STYLES, St as DEFAULT_STORAGE_KEY_PREFIX, U as getElapsedSeconds, V as clearPageUseLog, Vt as FlowError, W as getPageUseConfig, Y as pageUseStore, _t as pageUseSettings, a as mountPageUseManager, at as pageUseHistory, bt as DEFAULT_MODEL, gt as DEFAULT_PAGE_USE_SETTINGS, i as definePageUseManagerElement, it as pageUsePresets, j as parseFlowKnowledge, jt as BROWSER_ENGINE_ID, k as newRevision, kt as PAGE_USE_MASK_COLORS, n as getPageUseFlowCatalog, q as isPageUseConfigured, r as runPageUseFlowTool, t as PAGE_USE_FLOW_TOOL, wt as normalizeOptions, xt as DEFAULT_SESSION_HEADER, yt as DEFAULT_MAX_STEPS, zt as FLOW_BUNDLE_VERSION } from "./tool-B-3dgswr.mjs";
|
|
2
|
+
import { _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as showPageUseLauncher, c as PAGE_USE_GLOW_TAG, d as getPageUseFlow, f as PAGE_USE_GLOBAL_KEY, g as formatPageUseResultForModel, h as PAGE_USE_TOOL_NAME, i as PageUseLauncherElement, l as PageUseGlowElement, m as PAGE_USE_TOOL, n as mountPageUseUI, o as buildMenuPresets, p as PAGE_USE_COMMAND_TYPE, r as PAGE_USE_LAUNCHER_TAG, s as PAGE_USE_ROBOT_ICON_SVG, t as definePageUseElements, u as createPageUse, v as runPageUseTool, x as pageUseCapability, y as hidePageUseLauncher } from "./src-BgrtN4uP.mjs";
|
|
3
3
|
|
|
4
4
|
export { BROWSER_ENGINE_ID, DEFAULT_MAX_STEPS, DEFAULT_MODEL, DEFAULT_PAGE_USE_SETTINGS, DEFAULT_SESSION_HEADER, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_TOUR_MAX_TAB_SWITCHES, DEFAULT_TOUR_STYLES, FLOW_BUNDLE_VERSION, FLOW_SCHEMA_VERSION, FlowError, PAGE_USE_COMMAND_TYPE, PAGE_USE_FLOW_TOOL, PAGE_USE_GLOBAL_KEY, PAGE_USE_GLOW_TAG, PAGE_USE_LAUNCHER_TAG, PAGE_USE_MASK_COLORS, PAGE_USE_ROBOT_ICON_SVG, PAGE_USE_STATIC_PRESETS, PAGE_USE_TOOL, PAGE_USE_TOOL_NAME, PageUseGlowElement, PageUseLauncherElement, SIMULATOR_MASK_ID, TOUR_STYLE_TRAINER, TOUR_STYLE_USER, browserTtsEngine, buildMenuPresets, clearPageUseLog, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher };
|
|
@@ -1091,6 +1091,10 @@ interface PageUseLLMOptions {
|
|
|
1091
1091
|
maxSteps?: number;
|
|
1092
1092
|
/** 部分模型拒绝对象形式 tool_choice("Invalid tool_choice type")时打开 */
|
|
1093
1093
|
disableNamedToolChoice?: boolean;
|
|
1094
|
+
/** 使用 SSE 传输,完整聚合并校验后才执行工具;默认 false,不改变面板或语音时序。 */
|
|
1095
|
+
stream?: boolean;
|
|
1096
|
+
/** 仅 stream=true 时生效;由网关决定是否返回 usage。 */
|
|
1097
|
+
streamOptions?: PageUseLLMStreamOptions;
|
|
1094
1098
|
/** 额外合并进请求体的字段,例:DeepSeek 关闭思考模式 { thinking: { type: 'disabled' } } */
|
|
1095
1099
|
extraBody?: Record<string, unknown>;
|
|
1096
1100
|
/**
|
|
@@ -1099,6 +1103,10 @@ interface PageUseLLMOptions {
|
|
|
1099
1103
|
*/
|
|
1100
1104
|
sessionHeader?: string | false;
|
|
1101
1105
|
}
|
|
1106
|
+
interface PageUseLLMStreamOptions {
|
|
1107
|
+
/** 请求末尾的 usage 统计;默认不发送 stream_options,兼容未支持此参数的网关。 */
|
|
1108
|
+
includeUsage?: boolean;
|
|
1109
|
+
}
|
|
1102
1110
|
/**
|
|
1103
1111
|
* 路由模式,决定站点地图中路径的写法与默认的当前路径读取方式:
|
|
1104
1112
|
* - hash:页面 URL 形如 `/#/a/b`
|
|
@@ -1176,6 +1184,8 @@ interface NormalizedLLMOptions {
|
|
|
1176
1184
|
model: string;
|
|
1177
1185
|
maxSteps: number;
|
|
1178
1186
|
disableNamedToolChoice: boolean;
|
|
1187
|
+
stream: boolean;
|
|
1188
|
+
streamOptions: PageUseLLMStreamOptions;
|
|
1179
1189
|
extraBody: Record<string, unknown>;
|
|
1180
1190
|
/** 空串表示不发送会话头 */
|
|
1181
1191
|
sessionHeader: string;
|
|
@@ -1208,4 +1218,4 @@ declare function normalizeOptions(options: PageUseOptions): NormalizedPageUseOpt
|
|
|
1208
1218
|
*/
|
|
1209
1219
|
declare function readLauncherSwitch(fallback: boolean, storageKeyPrefix?: string): boolean;
|
|
1210
1220
|
//#endregion
|
|
1211
|
-
export {
|
|
1221
|
+
export { FlowCheckBinding as $, FlowStatus as $t, PageUseManagerPresentation as A, FlowPermissions as At, validateFlowInputs as B, FlowRepository as Bt, getPageUseFlowCatalog as C, FlowKnowledgeRecord as Ct, mountPageUseManager as D, FlowOutputReference as Dt, definePageUseManagerElement as E, FlowMode as Et, parseFlowRegion as F, FlowRegionContext as Ft, FlowActionBinding as G, FlowRunner as Gt, FLOW_BUNDLE_VERSION as H, FlowResolvedTarget as Ht, parseFlowScene as I, FlowRegionFailure as It, FlowApiSyncOptions as J, FlowScope as Jt, FlowApiRequest as K, FlowScene as Kt, parseFlowSceneDraft as L, FlowRegionHost as Lt, newRevision as M, FlowRegion as Mt, parseFlowBundle as N, FlowRegionAnchor as Nt, PAGE_USE_MANAGER_TAG as O, FlowParameter as Ot, parseFlowKnowledge as P, FlowRegionCandidate as Pt, FlowCheck as Q, FlowSnapshot as Qt, sceneKey as R, FlowRegionPage as Rt, PAGE_USE_FLOW_TOOL as S, FlowKnowledge as St, MountPageUseManagerOptions as T, FlowManagerState as Tt, FLOW_SCHEMA_VERSION as U, FlowRunOptions as Ut, validateSceneBindings as V, FlowRepositorySnapshot as Vt, FlowAction as W, FlowRunResult as Wt, FlowBoundCheck as X, FlowSegmentLog as Xt, FlowBindings as Y, FlowSegment as Yt, FlowBundle as Z, FlowSessionContext as Zt, PageUseTtsVoice as _, FlowGenerator as _t, DEFAULT_TOUR_MAX_TAB_SWITCHES as a, PageUseFlowOptions as an, FlowCloudState as at, TOUR_STYLE_TRAINER as b, FlowImportStrategy as bt, PageUseLLMOptions as c, PageUsePreset as cn, FlowConfigResponse as ct, PageUseRouterMode as d, PageUseSnapshot as dn, FlowDescriptionCheck as dt, FlowStep as en, FlowClient as et, PageUseTourOptions as f, PageUseStepLog as fn, FlowError as ft, PageUseTtsSpeakOptions as g, FlowExportOptions as gt, PageUseTtsEngine as h, PageUseTaskStatus as hn, FlowExecutionPorts as ht, DEFAULT_STORAGE_KEY_PREFIX as i, PageUseFlowHandle as in, FlowCloudRelease as it, FLOW_SEGMENT_MAX_CHARS as j, FlowPresenter as jt, PageUseManagerElement as k, FlowParameterDefinition as kt, PageUseLLMStreamOptions as l, PageUseProgressEvent as ln, FlowContext as lt, readLauncherSwitch as m, PageUseTaskSource as mn, FlowEvent as mt, DEFAULT_MODEL as n, JsonObject as nn, FlowCloudCache as nt, NormalizedLLMOptions as o, PageUseErrorCode as on, FlowCompletionDecision as ot, normalizeOptions as p, PageUseTaskResult as pn, FlowErrorCode as pt, FlowApiResponse as q, FlowSceneRecord as qt, DEFAULT_SESSION_HEADER as r, JsonValue as rn, FlowCloudController as rt, NormalizedPageUseOptions as s, PageUseMenuNode as sn, FlowCompletionEvaluator as st, DEFAULT_MAX_STEPS as t, FlowTombstone as tn, FlowCloudAdapter as tt, PageUseOptions as u, PageUseRunOptions as un, FlowContextBinding as ut, DEFAULT_TOUR_STYLES as v, FlowIdentity as vt, runPageUseFlowTool as w, FlowManager as wt, TOUR_STYLE_USER as x, FlowInputDefinition as xt, PageUseTourStyle as y, FlowImportPreview as yt, scopeKey as z, FlowRegionSelector as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as showFlowMask,
|
|
1
|
+
import { $ as showFlowMask, At as SIMULATOR_MASK_ID, B as acquireFlowExecution, C as createIndexedDbFlowRepository, Dt as listTtsEngines, F as sceneKey, G as getPageUseSnapshot, H as configurePageUse, I as scopeKey, J as isRunning, K as hideFlowMask, Lt as cancelRegionPicker, M as parseFlowRegion, N as parseFlowScene, Nt as isSpeechSupported, Ot as resolveTtsEngine, P as parseFlowSceneDraft, Q as runTaskForFlow, R as validateRegionPreviewInputs, Rt as hasRegionPicker, S as previewFlowImport, T as cloneJson, Tt as readLauncherQuery, U as getElapsedSeconds, V as clearPageUseLog, Vt as FlowError, W as getPageUseConfig, X as registerQuestionUi, Y as pageUseStore, Z as runTask, _ as createFlowApiAdapter, _t as pageUseSettings, at as pageUseHistory, b as exportFlowBundle, ct as hideTourHighlight, dt as narrationMute, et as stopTask, f as composedParent, ft as registerNarrationPanelName, g as validateRegionPages, h as regionAbortable, ht as stopPreview, i as definePageUseManagerElement, it as pageUsePresets, j as parseFlowKnowledge, jt as BROWSER_ENGINE_ID, k as newRevision, l as createFlowRunner, lt as showTourHighlight, m as locateFlowRegion, mt as startPreview, nt as subscribePageUse, ot as completionRequestBody, p as createRegionSelector, pt as previewStore, rt as updateFlowExecution, st as readCompletionResponse, tt as stopTaskForFlow, u as createCompletionEvaluator, ut as narrate, v as validateFlowApiOptions, vt as createStore, w as FLOW_SEGMENT_MAX_CHARS, wt as normalizeOptions, x as importFlowBundle, y as createFlowCloud, z as validateSceneBindings } from "./tool-B-3dgswr.mjs";
|
|
2
2
|
import { LitElement, css, html, nothing, svg } from "lit";
|
|
3
3
|
import { keyed } from "lit/directives/keyed.js";
|
|
4
4
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -282,14 +282,14 @@ function createFlowGenerator(llm) {
|
|
|
282
282
|
const headers = new Headers({ "Content-Type": "application/json" });
|
|
283
283
|
if (llm.apiKey) headers.set("Authorization", `Bearer ${llm.apiKey}`);
|
|
284
284
|
if (llm.sessionHeader) headers.set(llm.sessionHeader, context.sessionId);
|
|
285
|
+
const { tools: _tools, tool_choice: _choice, functions: _functions, function_call: _call, ...extra } = llm.extraBody;
|
|
285
286
|
const response = await fetch(`${llm.baseURL}/chat/completions`, {
|
|
286
287
|
method: "POST",
|
|
287
288
|
headers,
|
|
288
289
|
signal,
|
|
289
|
-
body: JSON.stringify({
|
|
290
|
-
...
|
|
290
|
+
body: JSON.stringify(completionRequestBody({
|
|
291
|
+
...extra,
|
|
291
292
|
model: llm.model,
|
|
292
|
-
stream: false,
|
|
293
293
|
temperature: .2,
|
|
294
294
|
messages: [{
|
|
295
295
|
role: "system",
|
|
@@ -310,10 +310,12 @@ function createFlowGenerator(llm) {
|
|
|
310
310
|
outputs: context.outputs
|
|
311
311
|
})
|
|
312
312
|
}]
|
|
313
|
-
})
|
|
313
|
+
}, llm))
|
|
314
314
|
});
|
|
315
315
|
if (!response.ok) throw new Error(`讲解模型请求失败(HTTP ${response.status})`);
|
|
316
|
-
const
|
|
316
|
+
const body = await readCompletionResponse(response, signal);
|
|
317
|
+
if (body.choices?.[0]?.message?.tool_calls?.length || body.choices?.[0]?.message?.function_call) throw new Error("讲解模型返回了工具调用");
|
|
318
|
+
const content = body.choices?.[0]?.message?.content;
|
|
317
319
|
if (typeof content !== "string") throw new Error("讲解模型未返回文本");
|
|
318
320
|
return content;
|
|
319
321
|
};
|
|
@@ -1266,7 +1268,7 @@ var PageUseGlowElement = class extends LitElement {
|
|
|
1266
1268
|
|
|
1267
1269
|
//#endregion
|
|
1268
1270
|
//#region package.json
|
|
1269
|
-
var version = "0.0.
|
|
1271
|
+
var version = "0.0.13";
|
|
1270
1272
|
|
|
1271
1273
|
//#endregion
|
|
1272
1274
|
//#region src/ui/drag.ts
|
|
@@ -355,6 +355,8 @@ function normalizeOptions(options) {
|
|
|
355
355
|
model: (llm.model || "").trim() || "deepseek-chat",
|
|
356
356
|
maxSteps: llm.maxSteps && llm.maxSteps > 0 ? llm.maxSteps : 20,
|
|
357
357
|
disableNamedToolChoice: Boolean(llm.disableNamedToolChoice),
|
|
358
|
+
stream: llm.stream === true,
|
|
359
|
+
streamOptions: typeof llm.streamOptions?.includeUsage === "boolean" ? { includeUsage: llm.streamOptions.includeUsage } : {},
|
|
358
360
|
extraBody: llm.extraBody && typeof llm.extraBody === "object" ? llm.extraBody : {},
|
|
359
361
|
sessionHeader: resolveSessionHeader(llm.sessionHeader)
|
|
360
362
|
},
|
|
@@ -1874,6 +1876,281 @@ function buildPageInstruction(options, outlineText = "", openedUrls = []) {
|
|
|
1874
1876
|
return parts.length ? parts.join("\n") : null;
|
|
1875
1877
|
}
|
|
1876
1878
|
|
|
1879
|
+
//#endregion
|
|
1880
|
+
//#region src/core/llmTransport.ts
|
|
1881
|
+
const MAX_STREAM_BYTES = 8388608;
|
|
1882
|
+
const MAX_STREAM_ITEMS = 32;
|
|
1883
|
+
function record(value) {
|
|
1884
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1885
|
+
}
|
|
1886
|
+
function invalid(message) {
|
|
1887
|
+
return /* @__PURE__ */ new Error(`[PageUse SSE] ${message}`);
|
|
1888
|
+
}
|
|
1889
|
+
/** 正式流式配置最后写入,extraBody/宿主变换不能单独开启无解析器的 SSE。 */
|
|
1890
|
+
function completionRequestBody(body, llm) {
|
|
1891
|
+
const { stream: _stream, stream_options: _options, ...rest } = body;
|
|
1892
|
+
return {
|
|
1893
|
+
...rest,
|
|
1894
|
+
stream: llm.stream,
|
|
1895
|
+
...llm.stream && typeof llm.streamOptions.includeUsage === "boolean" ? { stream_options: { include_usage: llm.streamOptions.includeUsage } } : {}
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
function index(value) {
|
|
1899
|
+
if (!Number.isSafeInteger(value) || value < 0 || value >= MAX_STREAM_ITEMS) throw invalid("无效的 choice/tool_calls index");
|
|
1900
|
+
return value;
|
|
1901
|
+
}
|
|
1902
|
+
function appendFunction(target, delta) {
|
|
1903
|
+
if (!record(delta)) throw invalid("无效的工具 function");
|
|
1904
|
+
for (const field of ["name", "arguments"]) {
|
|
1905
|
+
const part = delta[field];
|
|
1906
|
+
if (part !== void 0) {
|
|
1907
|
+
if (typeof part !== "string") throw invalid(`工具 ${field} 不是字符串`);
|
|
1908
|
+
target[field] += part;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
function validateFunction(call) {
|
|
1913
|
+
if (!call.name || !call.arguments) throw invalid("工具名称或参数不完整");
|
|
1914
|
+
try {
|
|
1915
|
+
JSON.parse(call.arguments);
|
|
1916
|
+
} catch {
|
|
1917
|
+
throw invalid("工具参数不是完整 JSON");
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
/** 只有 [DONE] 与各 choice 的正常 finish_reason 均已收到,才交付完整响应。 */
|
|
1921
|
+
async function readEventStream(response, signal) {
|
|
1922
|
+
signal?.throwIfAborted();
|
|
1923
|
+
if (!response.body) throw invalid("响应没有可读流");
|
|
1924
|
+
const reader = response.body.getReader();
|
|
1925
|
+
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
1926
|
+
const choices = /* @__PURE__ */ new Map();
|
|
1927
|
+
const metadata = { object: "chat.completion" };
|
|
1928
|
+
let usage;
|
|
1929
|
+
let buffer = "";
|
|
1930
|
+
let data = [];
|
|
1931
|
+
let eventName = "";
|
|
1932
|
+
let ended = false;
|
|
1933
|
+
let bytes = 0;
|
|
1934
|
+
const cancel = () => {
|
|
1935
|
+
reader.cancel().catch(() => {});
|
|
1936
|
+
};
|
|
1937
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
1938
|
+
function acceptChunk(chunk) {
|
|
1939
|
+
if (!record(chunk)) throw invalid("事件不是 JSON 对象");
|
|
1940
|
+
if (chunk.error) throw invalid(record(chunk.error) && typeof chunk.error.message === "string" ? chunk.error.message.slice(0, 500) : "网关返回错误事件");
|
|
1941
|
+
for (const key of [
|
|
1942
|
+
"id",
|
|
1943
|
+
"model",
|
|
1944
|
+
"created",
|
|
1945
|
+
"system_fingerprint",
|
|
1946
|
+
"service_tier"
|
|
1947
|
+
]) if (chunk[key] !== void 0) metadata[key] = chunk[key];
|
|
1948
|
+
if (chunk.usage != null) {
|
|
1949
|
+
if (!record(chunk.usage)) throw invalid("无效的 usage");
|
|
1950
|
+
usage = chunk.usage;
|
|
1951
|
+
}
|
|
1952
|
+
if (!Array.isArray(chunk.choices)) throw invalid("事件缺少 choices");
|
|
1953
|
+
for (const item of chunk.choices) {
|
|
1954
|
+
if (!record(item)) throw invalid("无效的 choice");
|
|
1955
|
+
const id = index(item.index);
|
|
1956
|
+
let pending = choices.get(id);
|
|
1957
|
+
if (!pending) {
|
|
1958
|
+
pending = {
|
|
1959
|
+
choice: {
|
|
1960
|
+
index: id,
|
|
1961
|
+
message: {
|
|
1962
|
+
role: "assistant",
|
|
1963
|
+
content: null
|
|
1964
|
+
},
|
|
1965
|
+
finish_reason: null
|
|
1966
|
+
},
|
|
1967
|
+
tools: /* @__PURE__ */ new Map()
|
|
1968
|
+
};
|
|
1969
|
+
choices.set(id, pending);
|
|
1970
|
+
}
|
|
1971
|
+
if (pending.choice.finish_reason !== null) throw invalid("choice 结束后仍收到增量");
|
|
1972
|
+
const delta = item.delta;
|
|
1973
|
+
if (!record(delta)) throw invalid("choice 缺少 delta");
|
|
1974
|
+
const message = pending.choice.message;
|
|
1975
|
+
if (delta.role != null && delta.role !== "assistant") throw invalid("无效的响应 role");
|
|
1976
|
+
if (delta.content != null) {
|
|
1977
|
+
if (typeof delta.content !== "string") throw invalid("content 不是字符串");
|
|
1978
|
+
message.content = (message.content ?? "") + delta.content;
|
|
1979
|
+
}
|
|
1980
|
+
if (delta.refusal) throw invalid("模型拒绝了请求");
|
|
1981
|
+
if (delta.function_call != null) {
|
|
1982
|
+
message.function_call ??= {
|
|
1983
|
+
name: "",
|
|
1984
|
+
arguments: ""
|
|
1985
|
+
};
|
|
1986
|
+
appendFunction(message.function_call, delta.function_call);
|
|
1987
|
+
}
|
|
1988
|
+
if (delta.tool_calls != null) {
|
|
1989
|
+
if (!Array.isArray(delta.tool_calls)) throw invalid("无效的 tool_calls");
|
|
1990
|
+
for (const tool of delta.tool_calls) {
|
|
1991
|
+
if (!record(tool)) throw invalid("无效的工具增量");
|
|
1992
|
+
const toolIndex = index(tool.index);
|
|
1993
|
+
let call = pending.tools.get(toolIndex);
|
|
1994
|
+
if (!call) {
|
|
1995
|
+
call = { function: {
|
|
1996
|
+
name: "",
|
|
1997
|
+
arguments: ""
|
|
1998
|
+
} };
|
|
1999
|
+
pending.tools.set(toolIndex, call);
|
|
2000
|
+
}
|
|
2001
|
+
for (const field of ["id", "type"]) if (tool[field] !== void 0) {
|
|
2002
|
+
if (typeof tool[field] !== "string" || call[field] !== void 0 && call[field] !== tool[field]) throw invalid(`工具 ${field} 不一致`);
|
|
2003
|
+
call[field] = tool[field];
|
|
2004
|
+
}
|
|
2005
|
+
if (tool.function !== void 0) appendFunction(call.function, tool.function);
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
if (item.finish_reason != null) {
|
|
2009
|
+
if (![
|
|
2010
|
+
"stop",
|
|
2011
|
+
"tool_calls",
|
|
2012
|
+
"function_call",
|
|
2013
|
+
"length",
|
|
2014
|
+
"content_filter"
|
|
2015
|
+
].includes(String(item.finish_reason))) throw invalid(`异常结束:${item.finish_reason}`);
|
|
2016
|
+
pending.choice.finish_reason = String(item.finish_reason);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
function line(text) {
|
|
2021
|
+
if (text === "") {
|
|
2022
|
+
if (eventName === "error") throw invalid("网关返回 error 事件");
|
|
2023
|
+
if (data.length) {
|
|
2024
|
+
const payload = data.join("\n");
|
|
2025
|
+
if (payload.trim() === "[DONE]") ended = true;
|
|
2026
|
+
else {
|
|
2027
|
+
let chunk;
|
|
2028
|
+
try {
|
|
2029
|
+
chunk = JSON.parse(payload);
|
|
2030
|
+
} catch {
|
|
2031
|
+
throw invalid("事件不是完整 JSON");
|
|
2032
|
+
}
|
|
2033
|
+
acceptChunk(chunk);
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
data = [];
|
|
2037
|
+
eventName = "";
|
|
2038
|
+
return;
|
|
2039
|
+
}
|
|
2040
|
+
if (text.startsWith(":")) return;
|
|
2041
|
+
const colon = text.indexOf(":");
|
|
2042
|
+
const field = colon < 0 ? text : text.slice(0, colon);
|
|
2043
|
+
const value = colon < 0 ? "" : text.slice(colon + 1).replace(/^ /, "");
|
|
2044
|
+
if (field === "data") data.push(value);
|
|
2045
|
+
if (field === "event") eventName = value;
|
|
2046
|
+
}
|
|
2047
|
+
function consume(text, final = false) {
|
|
2048
|
+
buffer += text;
|
|
2049
|
+
while (!ended) {
|
|
2050
|
+
const end = buffer.search(/[\r\n]/);
|
|
2051
|
+
if (end < 0 || !final && buffer[end] === "\r" && end === buffer.length - 1) break;
|
|
2052
|
+
const size = buffer[end] === "\r" && buffer[end + 1] === "\n" ? 2 : 1;
|
|
2053
|
+
const current = buffer.slice(0, end);
|
|
2054
|
+
buffer = buffer.slice(end + size);
|
|
2055
|
+
line(current);
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
try {
|
|
2059
|
+
while (!ended) {
|
|
2060
|
+
signal?.throwIfAborted();
|
|
2061
|
+
const next = await reader.read();
|
|
2062
|
+
signal?.throwIfAborted();
|
|
2063
|
+
if (next.done) {
|
|
2064
|
+
consume(decoder.decode(), true);
|
|
2065
|
+
break;
|
|
2066
|
+
}
|
|
2067
|
+
bytes += next.value.byteLength;
|
|
2068
|
+
if (bytes > MAX_STREAM_BYTES) throw invalid("响应超过 8 MiB 限制");
|
|
2069
|
+
consume(decoder.decode(next.value, { stream: true }));
|
|
2070
|
+
}
|
|
2071
|
+
signal?.throwIfAborted();
|
|
2072
|
+
if (!ended || !choices.size || !choices.has(0)) throw invalid("流在完整结束标记前中断");
|
|
2073
|
+
const result = [];
|
|
2074
|
+
for (const [id, pending] of [...choices].sort(([a], [b]) => a - b)) {
|
|
2075
|
+
if (id !== result.length || !pending.choice.finish_reason) throw invalid("choice 不完整");
|
|
2076
|
+
const failed = ["length", "content_filter"].includes(pending.choice.finish_reason);
|
|
2077
|
+
if (pending.tools.size) pending.choice.message.tool_calls = [...pending.tools].sort(([a], [b]) => a - b).map(([id, call], position) => {
|
|
2078
|
+
if (id !== position || !call.id || call.type !== "function") throw invalid("工具调用不完整");
|
|
2079
|
+
if (!failed) validateFunction(call.function);
|
|
2080
|
+
return call;
|
|
2081
|
+
});
|
|
2082
|
+
if (!failed && pending.choice.message.function_call) validateFunction(pending.choice.message.function_call);
|
|
2083
|
+
result.push(pending.choice);
|
|
2084
|
+
}
|
|
2085
|
+
return {
|
|
2086
|
+
...metadata,
|
|
2087
|
+
choices: result,
|
|
2088
|
+
...usage ? { usage } : {}
|
|
2089
|
+
};
|
|
2090
|
+
} finally {
|
|
2091
|
+
signal?.removeEventListener("abort", cancel);
|
|
2092
|
+
cancel();
|
|
2093
|
+
reader.releaseLock();
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
/** JSON 回退保持兼容;SSE 必须完整读取,取消后绝不返回聚合结果。 */
|
|
2097
|
+
async function readCompletionResponse(response, signal, forAgent = false) {
|
|
2098
|
+
if (signal?.aborted) {
|
|
2099
|
+
response.body?.cancel().catch(() => {});
|
|
2100
|
+
signal.throwIfAborted();
|
|
2101
|
+
}
|
|
2102
|
+
const result = response.headers?.get("content-type")?.split(";")[0].trim().toLowerCase() === "text/event-stream" ? await readEventStream(response, signal) : await response.json();
|
|
2103
|
+
signal?.throwIfAborted();
|
|
2104
|
+
if (record(result) && Array.isArray(result.choices)) {
|
|
2105
|
+
for (const choice of result.choices) if (!forAgent && record(choice) && choice.finish_reason != null && ![
|
|
2106
|
+
"stop",
|
|
2107
|
+
"tool_calls",
|
|
2108
|
+
"function_call"
|
|
2109
|
+
].includes(String(choice.finish_reason))) throw invalid(`异常结束:${choice.finish_reason}`);
|
|
2110
|
+
}
|
|
2111
|
+
return result;
|
|
2112
|
+
}
|
|
2113
|
+
/** 仅包装当前 agent 的 Response;不修改全局 fetch,也不改上游依赖。 */
|
|
2114
|
+
function agentCompletionResponse(response, signal) {
|
|
2115
|
+
if (!response.ok) return response;
|
|
2116
|
+
const headers = new Headers(response.headers);
|
|
2117
|
+
headers.set("content-type", "application/json");
|
|
2118
|
+
headers.delete("content-length");
|
|
2119
|
+
headers.delete("content-encoding");
|
|
2120
|
+
const aggregation = new AbortController();
|
|
2121
|
+
const abort = () => aggregation.abort(signal?.reason);
|
|
2122
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
2123
|
+
if (signal?.aborted) abort();
|
|
2124
|
+
const body = new ReadableStream({
|
|
2125
|
+
async start(controller) {
|
|
2126
|
+
try {
|
|
2127
|
+
const completion = await readCompletionResponse(response, aggregation.signal, true);
|
|
2128
|
+
const message = completion.choices[0]?.message;
|
|
2129
|
+
if (completion.choices.length !== 1 || (message?.tool_calls?.length ?? 0) > 1 || message?.function_call && message.tool_calls?.length) throw invalid("agent 每轮只允许一个 choice 和一个工具调用");
|
|
2130
|
+
if (!["length", "content_filter"].includes(completion.choices[0]?.finish_reason ?? "")) {
|
|
2131
|
+
for (const call of message?.tool_calls ?? []) validateFunction(call.function);
|
|
2132
|
+
if (message?.function_call) validateFunction(message.function_call);
|
|
2133
|
+
}
|
|
2134
|
+
aggregation.signal.throwIfAborted();
|
|
2135
|
+
controller.enqueue(new TextEncoder().encode(JSON.stringify(completion)));
|
|
2136
|
+
controller.close();
|
|
2137
|
+
} catch (error) {
|
|
2138
|
+
controller.error(error);
|
|
2139
|
+
} finally {
|
|
2140
|
+
signal?.removeEventListener("abort", abort);
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
cancel() {
|
|
2144
|
+
aggregation.abort(new DOMException("响应读取已取消", "AbortError"));
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
return new Response(body, {
|
|
2148
|
+
status: response.status,
|
|
2149
|
+
statusText: response.statusText,
|
|
2150
|
+
headers
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
|
|
1877
2154
|
//#endregion
|
|
1878
2155
|
//#region src/core/createPageUseAgent.ts
|
|
1879
2156
|
/**
|
|
@@ -1914,21 +2191,19 @@ function createPageUseAgent({ options, enableMask, narration = false, shouldRunB
|
|
|
1914
2191
|
const { llm } = options;
|
|
1915
2192
|
if (!llm.baseURL) throw new Error("[PageUse] 未配置 llm.baseURL");
|
|
1916
2193
|
let sessionId = newSessionId();
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
*/
|
|
1921
|
-
const customFetch =
|
|
2194
|
+
const extraBody = llm.extraBody;
|
|
2195
|
+
const hostBeforeTask = options.beforeTask;
|
|
2196
|
+
const hostPageAgent = options.pageAgentOptions;
|
|
2197
|
+
/** 注入任务会话头;浏览器禁止修改 User-Agent,需要时仍由代理补充。 */
|
|
2198
|
+
const customFetch = async (input, init) => {
|
|
1922
2199
|
const headers = new Headers(init?.headers);
|
|
1923
|
-
headers.set(llm.sessionHeader, sessionId);
|
|
1924
|
-
|
|
2200
|
+
if (llm.sessionHeader) headers.set(llm.sessionHeader, sessionId);
|
|
2201
|
+
const response = await (hostPageAgent.customFetch ?? fetch)(input, {
|
|
1925
2202
|
...init,
|
|
1926
2203
|
headers
|
|
1927
2204
|
});
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
const hostBeforeTask = options.beforeTask;
|
|
1931
|
-
const hostPageAgent = options.pageAgentOptions;
|
|
2205
|
+
return llm.stream ? agentCompletionResponse(response, init?.signal) : response;
|
|
2206
|
+
};
|
|
1932
2207
|
const tour = options.pageTour.enabled ? createPageTour({
|
|
1933
2208
|
getContentRoot: options.getContentRoot,
|
|
1934
2209
|
maxTabSwitches: options.pageTour.maxTabSwitches,
|
|
@@ -1944,11 +2219,6 @@ function createPageUseAgent({ options, enableMask, narration = false, shouldRunB
|
|
|
1944
2219
|
language: "zh-CN",
|
|
1945
2220
|
maxSteps: llm.maxSteps,
|
|
1946
2221
|
disableNamedToolChoice: llm.disableNamedToolChoice,
|
|
1947
|
-
customFetch,
|
|
1948
|
-
transformRequestBody: Object.keys(extraBody).length ? (body) => ({
|
|
1949
|
-
...body,
|
|
1950
|
-
...extraBody
|
|
1951
|
-
}) : void 0,
|
|
1952
2222
|
stepDelay: STEP_DELAY_SECONDS,
|
|
1953
2223
|
promptForNextTask: false,
|
|
1954
2224
|
enableMask,
|
|
@@ -1962,6 +2232,15 @@ function createPageUseAgent({ options, enableMask, narration = false, shouldRunB
|
|
|
1962
2232
|
return `${content.slice(0, PAGE_CONTENT_MAX_CHARS)}\n...(页面内容过长已截断,可滚动后再观察)`;
|
|
1963
2233
|
},
|
|
1964
2234
|
...hostPageAgent,
|
|
2235
|
+
customFetch,
|
|
2236
|
+
transformRequestBody: (body) => {
|
|
2237
|
+
const merged = {
|
|
2238
|
+
...body,
|
|
2239
|
+
...extraBody
|
|
2240
|
+
};
|
|
2241
|
+
const transformed = hostPageAgent.transformRequestBody?.(merged) ?? merged;
|
|
2242
|
+
return completionRequestBody(transformed, llm);
|
|
2243
|
+
},
|
|
1965
2244
|
customTools: {
|
|
1966
2245
|
[CLICK_TOOL_NAME]: createClickTool(newWindows),
|
|
1967
2246
|
...tour ? { [PRESENT_PAGE_TOOL_NAME]: tour.tool } : {},
|
|
@@ -4933,10 +5212,9 @@ function createRegionSelector(llm) {
|
|
|
4933
5212
|
method: "POST",
|
|
4934
5213
|
headers,
|
|
4935
5214
|
signal,
|
|
4936
|
-
body: JSON.stringify({
|
|
5215
|
+
body: JSON.stringify(completionRequestBody({
|
|
4937
5216
|
...extra,
|
|
4938
5217
|
model: llm.model,
|
|
4939
|
-
stream: false,
|
|
4940
5218
|
temperature: 0,
|
|
4941
5219
|
messages: [{
|
|
4942
5220
|
role: "system",
|
|
@@ -4950,10 +5228,10 @@ function createRegionSelector(llm) {
|
|
|
4950
5228
|
}],
|
|
4951
5229
|
tools: [],
|
|
4952
5230
|
tool_choice: "none"
|
|
4953
|
-
})
|
|
5231
|
+
}, llm))
|
|
4954
5232
|
});
|
|
4955
5233
|
if (!response.ok) throw new FlowError("REGION_SELECTION_INVALID", `区域模型请求失败(HTTP ${response.status})`);
|
|
4956
|
-
const message = (await response
|
|
5234
|
+
const message = (await readCompletionResponse(response, signal)).choices?.[0]?.message;
|
|
4957
5235
|
if (message?.tool_calls?.length || message?.function_call) throw new FlowError("REGION_SELECTION_INVALID", "区域模型返回了工具调用");
|
|
4958
5236
|
try {
|
|
4959
5237
|
const value = JSON.parse(message?.content ?? "");
|
|
@@ -5017,10 +5295,9 @@ function createCompletionEvaluator(llm) {
|
|
|
5017
5295
|
method: "POST",
|
|
5018
5296
|
headers,
|
|
5019
5297
|
signal,
|
|
5020
|
-
body: JSON.stringify({
|
|
5298
|
+
body: JSON.stringify(completionRequestBody({
|
|
5021
5299
|
...extra,
|
|
5022
5300
|
model: llm.model,
|
|
5023
|
-
stream: false,
|
|
5024
5301
|
temperature: 0,
|
|
5025
5302
|
tools: [],
|
|
5026
5303
|
tool_choice: "none",
|
|
@@ -5036,10 +5313,10 @@ function createCompletionEvaluator(llm) {
|
|
|
5036
5313
|
record: request.record
|
|
5037
5314
|
})
|
|
5038
5315
|
}]
|
|
5039
|
-
})
|
|
5316
|
+
}, llm))
|
|
5040
5317
|
});
|
|
5041
5318
|
if (!response.ok) throw new FlowError("CHECK_UNCERTAIN", `完成检查模型请求失败(HTTP ${response.status})`);
|
|
5042
|
-
const message = (await response
|
|
5319
|
+
const message = (await readCompletionResponse(response, signal)).choices?.[0]?.message;
|
|
5043
5320
|
if (message?.tool_calls?.length || message?.function_call) throw new FlowError("CHECK_UNCERTAIN", "完成检查模型返回了工具调用");
|
|
5044
5321
|
try {
|
|
5045
5322
|
const value = JSON.parse(message?.content ?? "");
|
|
@@ -8393,4 +8670,4 @@ async function runPageUseFlowTool(flow, args, options = {}) {
|
|
|
8393
8670
|
}
|
|
8394
8671
|
|
|
8395
8672
|
//#endregion
|
|
8396
|
-
export { showFlowMask as $, parseFlowBundle as A,
|
|
8673
|
+
export { showFlowMask as $, parseFlowBundle as A, SIMULATOR_MASK_ID as At, acquireFlowExecution as B, FLOW_SCHEMA_VERSION as Bt, createIndexedDbFlowRepository as C, DEFAULT_TOUR_MAX_TAB_SWITCHES as Ct, flowSceneDraftSchema as D, listTtsEngines as Dt, flowBundleSchema as E, readLauncherSwitch as Et, sceneKey as F, TOUR_STYLE_TRAINER as Ft, getPageUseSnapshot as G, configurePageUse as H, scopeKey as I, TOUR_STYLE_USER as It, isRunning as J, hideFlowMask as K, validateFlowInputs as L, cancelRegionPicker as Lt, parseFlowRegion as M, browserTtsEngine as Mt, parseFlowScene as N, isSpeechSupported as Nt, flowSceneSchema as O, resolveTtsEngine as Ot, parseFlowSceneDraft as P, DEFAULT_TOUR_STYLES as Pt, runTaskForFlow as Q, validateRegionPreviewInputs as R, hasRegionPicker as Rt, previewFlowImport as S, DEFAULT_STORAGE_KEY_PREFIX as St, cloneJson as T, readLauncherQuery as Tt, getElapsedSeconds as U, clearPageUseLog as V, FlowError as Vt, getPageUseConfig as W, registerQuestionUi as X, pageUseStore as Y, runTask as Z, createFlowApiAdapter as _, pageUseSettings as _t, mountPageUseManager as a, pageUseHistory as at, exportFlowBundle as b, DEFAULT_MODEL as bt, createFlowRegionPicker as c, hideTourHighlight as ct, evaluateFlowCompletion as d, narrationMute as dt, stopTask as et, composedParent as f, registerNarrationPanelName as ft, validateRegionPages as g, DEFAULT_PAGE_USE_SETTINGS as gt, regionAbortable as h, stopPreview as ht, definePageUseManagerElement as i, pageUsePresets as it, parseFlowKnowledge as j, BROWSER_ENGINE_ID as jt, newRevision as k, PAGE_USE_MASK_COLORS as kt, createFlowRunner as l, showTourHighlight as lt, locateFlowRegion as m, startPreview as mt, getPageUseFlowCatalog as n, subscribePageUse as nt, PAGE_USE_MANAGER_TAG as o, completionRequestBody as ot, createRegionSelector as p, previewStore as pt, isPageUseConfigured as q, runPageUseFlowTool as r, updateFlowExecution as rt, PageUseManagerElement as s, readCompletionResponse as st, PAGE_USE_FLOW_TOOL as t, stopTaskForFlow as tt, createCompletionEvaluator as u, narrate as ut, validateFlowApiOptions as v, createStore as vt, FLOW_SEGMENT_MAX_CHARS as w, normalizeOptions as wt, importFlowBundle as x, DEFAULT_SESSION_HEADER as xt, createFlowCloud as y, DEFAULT_MAX_STEPS as yt, validateSceneBindings as z, FLOW_BUNDLE_VERSION as zt };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as PageUseGlobal, B as MountPageUseUIOptions, C as getElapsedSeconds, D as pageUseStore, E as isRunning, F as PAGE_USE_TOOL_NAME, G as PageUseLauncherElement, H as mountPageUseUI, I as PageUseCommand, J as createPageUse, K as PageUseLauncherLayout, L as formatPageUseResultForModel, M as showPageUseLauncher, N as PAGE_USE_COMMAND_TYPE, O as ReadonlyStore, P as PAGE_USE_TOOL, R as isPageUseCommand, S as clearPageUseLog, T as isPageUseConfigured, U as PAGE_USE_LAUNCHER_TAG, V as definePageUseElements, W as PageUseLauncherConfig, X as PageUseCapability, Y as getPageUseFlow, Z as pageUseCapability, _ as pageUseSettings, a as PAGE_USE_ROBOT_ICON_SVG, b as PageUseQuestion, c as PageUseCustomPreset, d as pageUsePresets, f as PageUseHistoryEntry, g as PageUseSettings, h as PageUsePoint, i as PageUseGlowElement, j as hidePageUseLauncher, k as PAGE_USE_GLOBAL_KEY, l as PageUsePresetSaveResult, m as DEFAULT_PAGE_USE_SETTINGS, n as SIMULATOR_MASK_ID, o as PAGE_USE_STATIC_PRESETS, p as pageUseHistory, q as PageUseHandle, r as PAGE_USE_GLOW_TAG, s as buildMenuPresets, t as PAGE_USE_MASK_COLORS, u as PageUsePresetState, v as BROWSER_ENGINE_ID, w as getPageUseConfig, x as PageUseState, y as browserTtsEngine, z as runPageUseTool } from "./index-
|
|
1
|
+
import { $ as FlowCheckBinding, $t as FlowStatus, At as FlowPermissions, Bt as FlowRepository, C as getPageUseFlowCatalog, Ct as FlowKnowledgeRecord, D as mountPageUseManager, Dt as FlowOutputReference, E as definePageUseManagerElement, Et as FlowMode, Ft as FlowRegionContext, G as FlowActionBinding, Gt as FlowRunner, H as FLOW_BUNDLE_VERSION, Ht as FlowResolvedTarget, I as parseFlowScene, It as FlowRegionFailure, J as FlowApiSyncOptions, Jt as FlowScope, K as FlowApiRequest, Kt as FlowScene, L as parseFlowSceneDraft, Lt as FlowRegionHost, M as newRevision, Mt as FlowRegion, Nt as FlowRegionAnchor, Ot as FlowParameter, P as parseFlowKnowledge, Pt as FlowRegionCandidate, Q as FlowCheck, Qt as FlowSnapshot, R as sceneKey, Rt as FlowRegionPage, S as PAGE_USE_FLOW_TOOL, St as FlowKnowledge, T as MountPageUseManagerOptions, Tt as FlowManagerState, U as FLOW_SCHEMA_VERSION, Ut as FlowRunOptions, Vt as FlowRepositorySnapshot, W as FlowAction, Wt as FlowRunResult, X as FlowBoundCheck, Xt as FlowSegmentLog, Y as FlowBindings, Yt as FlowSegment, Z as FlowBundle, Zt as FlowSessionContext, _ as PageUseTtsVoice, _t as FlowGenerator, a as DEFAULT_TOUR_MAX_TAB_SWITCHES, an as PageUseFlowOptions, at as FlowCloudState, b as TOUR_STYLE_TRAINER, bt as FlowImportStrategy, c as PageUseLLMOptions, cn as PageUsePreset, ct as FlowConfigResponse, d as PageUseRouterMode, dn as PageUseSnapshot, dt as FlowDescriptionCheck, en as FlowStep, et as FlowClient, f as PageUseTourOptions, fn as PageUseStepLog, ft as FlowError, g as PageUseTtsSpeakOptions, gt as FlowExportOptions, h as PageUseTtsEngine, hn as PageUseTaskStatus, ht as FlowExecutionPorts, i as DEFAULT_STORAGE_KEY_PREFIX, in as PageUseFlowHandle, it as FlowCloudRelease, jt as FlowPresenter, kt as FlowParameterDefinition, l as PageUseLLMStreamOptions, ln as PageUseProgressEvent, lt as FlowContext, m as readLauncherSwitch, mn as PageUseTaskSource, mt as FlowEvent, n as DEFAULT_MODEL, nn as JsonObject, nt as FlowCloudCache, on as PageUseErrorCode, ot as FlowCompletionDecision, p as normalizeOptions, pn as PageUseTaskResult, pt as FlowErrorCode, q as FlowApiResponse, qt as FlowSceneRecord, r as DEFAULT_SESSION_HEADER, rn as JsonValue, rt as FlowCloudController, s as NormalizedPageUseOptions, sn as PageUseMenuNode, st as FlowCompletionEvaluator, t as DEFAULT_MAX_STEPS, tn as FlowTombstone, tt as FlowCloudAdapter, u as PageUseOptions, un as PageUseRunOptions, ut as FlowContextBinding, v as DEFAULT_TOUR_STYLES, vt as FlowIdentity, w as runPageUseFlowTool, wt as FlowManager, x as TOUR_STYLE_USER, xt as FlowInputDefinition, y as PageUseTourStyle, yt as FlowImportPreview, zt as FlowRegionSelector } from "./options-CS8LsaB8.mjs";
|
|
2
|
+
import { A as PageUseGlobal, B as MountPageUseUIOptions, C as getElapsedSeconds, D as pageUseStore, E as isRunning, F as PAGE_USE_TOOL_NAME, G as PageUseLauncherElement, H as mountPageUseUI, I as PageUseCommand, J as createPageUse, K as PageUseLauncherLayout, L as formatPageUseResultForModel, M as showPageUseLauncher, N as PAGE_USE_COMMAND_TYPE, O as ReadonlyStore, P as PAGE_USE_TOOL, R as isPageUseCommand, S as clearPageUseLog, T as isPageUseConfigured, U as PAGE_USE_LAUNCHER_TAG, V as definePageUseElements, W as PageUseLauncherConfig, X as PageUseCapability, Y as getPageUseFlow, Z as pageUseCapability, _ as pageUseSettings, a as PAGE_USE_ROBOT_ICON_SVG, b as PageUseQuestion, c as PageUseCustomPreset, d as pageUsePresets, f as PageUseHistoryEntry, g as PageUseSettings, h as PageUsePoint, i as PageUseGlowElement, j as hidePageUseLauncher, k as PAGE_USE_GLOBAL_KEY, l as PageUsePresetSaveResult, m as DEFAULT_PAGE_USE_SETTINGS, n as SIMULATOR_MASK_ID, o as PAGE_USE_STATIC_PRESETS, p as pageUseHistory, q as PageUseHandle, r as PAGE_USE_GLOW_TAG, s as buildMenuPresets, t as PAGE_USE_MASK_COLORS, u as PageUsePresetState, v as BROWSER_ENGINE_ID, w as getPageUseConfig, x as PageUseState, y as browserTtsEngine, z as runPageUseTool } from "./index-CzWLOKue.mjs";
|
|
3
3
|
import { PropType, ShallowRef } from "vue";
|
|
4
4
|
import { Router } from "vue-router";
|
|
5
5
|
//#region src/vue.d.ts
|
|
@@ -51,4 +51,4 @@ export declare function usePageUseState(): Readonly<ShallowRef<PageUseState>>;
|
|
|
51
51
|
/** 本地设置的 Vue 响应式引用;修改请调用 pageUseSettings.update */
|
|
52
52
|
export declare function usePageUseSettings(): Readonly<ShallowRef<PageUseSettings>>;
|
|
53
53
|
//#endregion
|
|
54
|
-
export { BROWSER_ENGINE_ID, DEFAULT_MAX_STEPS, DEFAULT_MODEL, DEFAULT_PAGE_USE_SETTINGS, DEFAULT_SESSION_HEADER, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_TOUR_MAX_TAB_SWITCHES, DEFAULT_TOUR_STYLES, FLOW_BUNDLE_VERSION, FLOW_SCHEMA_VERSION, FlowAction, FlowActionBinding, FlowApiRequest, FlowApiResponse, FlowApiSyncOptions, FlowBindings, FlowBoundCheck, FlowBundle, FlowCheck, FlowCheckBinding, FlowClient, FlowCloudAdapter, FlowCloudCache, FlowCloudController, FlowCloudRelease, FlowCloudState, FlowCompletionDecision, FlowCompletionEvaluator, FlowConfigResponse, FlowContext, FlowContextBinding, FlowDescriptionCheck, FlowError, FlowErrorCode, FlowEvent, FlowExecutionPorts, FlowExportOptions, FlowGenerator, FlowIdentity, FlowImportPreview, FlowImportStrategy, FlowInputDefinition, FlowKnowledge, FlowKnowledgeRecord, FlowManager, FlowManagerState, FlowMode, FlowOutputReference, FlowParameter, FlowParameterDefinition, FlowPermissions, FlowPresenter, FlowRegion, FlowRegionAnchor, FlowRegionCandidate, FlowRegionContext, FlowRegionFailure, FlowRegionHost, FlowRegionPage, FlowRegionSelector, FlowRepository, FlowRepositorySnapshot, FlowResolvedTarget, FlowRunOptions, FlowRunResult, FlowRunner, FlowScene, FlowSceneRecord, FlowScope, FlowSegment, FlowSegmentLog, FlowSessionContext, FlowSnapshot, FlowStatus, FlowStep, FlowTombstone, JsonObject, JsonValue, type MountPageUseManagerOptions, type MountPageUseUIOptions, type NormalizedPageUseOptions, PAGE_USE_COMMAND_TYPE, PAGE_USE_FLOW_TOOL, PAGE_USE_GLOBAL_KEY, PAGE_USE_GLOW_TAG, PAGE_USE_LAUNCHER_TAG, PAGE_USE_MASK_COLORS, PAGE_USE_ROBOT_ICON_SVG, PAGE_USE_STATIC_PRESETS, PAGE_USE_TOOL, PAGE_USE_TOOL_NAME, type PageUseCapability, type PageUseCommand, type PageUseCustomPreset, type PageUseErrorCode, PageUseFlowHandle, PageUseFlowOptions, type PageUseGlobal, PageUseGlowElement, type PageUseHandle, type PageUseHistoryEntry, type PageUseLLMOptions, type PageUseLauncherConfig, PageUseLauncherElement, type PageUseLauncherLayout, type PageUseMenuNode, type PageUseOptions, type PageUsePoint, type PageUsePreset, type PageUsePresetSaveResult, type PageUsePresetState, type PageUseProgressEvent, type PageUseQuestion, type PageUseRouterMode, type PageUseRunOptions, type PageUseSettings, type PageUseSnapshot, type PageUseState, type PageUseStepLog, type PageUseTaskResult, type PageUseTaskSource, type PageUseTaskStatus, type PageUseTourOptions, type PageUseTourStyle, type PageUseTtsEngine, type PageUseTtsSpeakOptions, type PageUseTtsVoice, type ReadonlyStore, SIMULATOR_MASK_ID, TOUR_STYLE_TRAINER, TOUR_STYLE_USER, browserTtsEngine, buildMenuPresets, clearPageUseLog, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher };
|
|
54
|
+
export { BROWSER_ENGINE_ID, DEFAULT_MAX_STEPS, DEFAULT_MODEL, DEFAULT_PAGE_USE_SETTINGS, DEFAULT_SESSION_HEADER, DEFAULT_STORAGE_KEY_PREFIX, DEFAULT_TOUR_MAX_TAB_SWITCHES, DEFAULT_TOUR_STYLES, FLOW_BUNDLE_VERSION, FLOW_SCHEMA_VERSION, FlowAction, FlowActionBinding, FlowApiRequest, FlowApiResponse, FlowApiSyncOptions, FlowBindings, FlowBoundCheck, FlowBundle, FlowCheck, FlowCheckBinding, FlowClient, FlowCloudAdapter, FlowCloudCache, FlowCloudController, FlowCloudRelease, FlowCloudState, FlowCompletionDecision, FlowCompletionEvaluator, FlowConfigResponse, FlowContext, FlowContextBinding, FlowDescriptionCheck, FlowError, FlowErrorCode, FlowEvent, FlowExecutionPorts, FlowExportOptions, FlowGenerator, FlowIdentity, FlowImportPreview, FlowImportStrategy, FlowInputDefinition, FlowKnowledge, FlowKnowledgeRecord, FlowManager, FlowManagerState, FlowMode, FlowOutputReference, FlowParameter, FlowParameterDefinition, FlowPermissions, FlowPresenter, FlowRegion, FlowRegionAnchor, FlowRegionCandidate, FlowRegionContext, FlowRegionFailure, FlowRegionHost, FlowRegionPage, FlowRegionSelector, FlowRepository, FlowRepositorySnapshot, FlowResolvedTarget, FlowRunOptions, FlowRunResult, FlowRunner, FlowScene, FlowSceneRecord, FlowScope, FlowSegment, FlowSegmentLog, FlowSessionContext, FlowSnapshot, FlowStatus, FlowStep, FlowTombstone, JsonObject, JsonValue, type MountPageUseManagerOptions, type MountPageUseUIOptions, type NormalizedPageUseOptions, PAGE_USE_COMMAND_TYPE, PAGE_USE_FLOW_TOOL, PAGE_USE_GLOBAL_KEY, PAGE_USE_GLOW_TAG, PAGE_USE_LAUNCHER_TAG, PAGE_USE_MASK_COLORS, PAGE_USE_ROBOT_ICON_SVG, PAGE_USE_STATIC_PRESETS, PAGE_USE_TOOL, PAGE_USE_TOOL_NAME, type PageUseCapability, type PageUseCommand, type PageUseCustomPreset, type PageUseErrorCode, PageUseFlowHandle, PageUseFlowOptions, type PageUseGlobal, PageUseGlowElement, type PageUseHandle, type PageUseHistoryEntry, type PageUseLLMOptions, type PageUseLLMStreamOptions, type PageUseLauncherConfig, PageUseLauncherElement, type PageUseLauncherLayout, type PageUseMenuNode, type PageUseOptions, type PageUsePoint, type PageUsePreset, type PageUsePresetSaveResult, type PageUsePresetState, type PageUseProgressEvent, type PageUseQuestion, type PageUseRouterMode, type PageUseRunOptions, type PageUseSettings, type PageUseSnapshot, type PageUseState, type PageUseStepLog, type PageUseTaskResult, type PageUseTaskSource, type PageUseTaskStatus, type PageUseTourOptions, type PageUseTourStyle, type PageUseTtsEngine, type PageUseTtsSpeakOptions, type PageUseTtsVoice, type ReadonlyStore, SIMULATOR_MASK_ID, TOUR_STYLE_TRAINER, TOUR_STYLE_USER, browserTtsEngine, buildMenuPresets, clearPageUseLog, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher };
|
package/dist/vue.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
import { _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as showPageUseLauncher, c as PAGE_USE_GLOW_TAG, d as getPageUseFlow, f as PAGE_USE_GLOBAL_KEY, g as formatPageUseResultForModel, h as PAGE_USE_TOOL_NAME, i as PageUseLauncherElement, l as PageUseGlowElement, m as PAGE_USE_TOOL, n as mountPageUseUI, o as buildMenuPresets, p as PAGE_USE_COMMAND_TYPE, r as PAGE_USE_LAUNCHER_TAG, s as PAGE_USE_ROBOT_ICON_SVG, t as definePageUseElements, u as createPageUse, v as runPageUseTool, x as pageUseCapability, y as hidePageUseLauncher } from "./src-
|
|
1
|
+
import { At as SIMULATOR_MASK_ID, Bt as FLOW_SCHEMA_VERSION, Ct as DEFAULT_TOUR_MAX_TAB_SWITCHES, Et as readLauncherSwitch, F as sceneKey, Ft as TOUR_STYLE_TRAINER, It as TOUR_STYLE_USER, J as isRunning, Mt as browserTtsEngine, N as parseFlowScene, P as parseFlowSceneDraft, Pt as DEFAULT_TOUR_STYLES, St as DEFAULT_STORAGE_KEY_PREFIX, U as getElapsedSeconds, V as clearPageUseLog, Vt as FlowError, W as getPageUseConfig, Y as pageUseStore, _t as pageUseSettings, a as mountPageUseManager, at as pageUseHistory, bt as DEFAULT_MODEL, gt as DEFAULT_PAGE_USE_SETTINGS, i as definePageUseManagerElement, it as pageUsePresets, j as parseFlowKnowledge, jt as BROWSER_ENGINE_ID, k as newRevision, kt as PAGE_USE_MASK_COLORS, n as getPageUseFlowCatalog, q as isPageUseConfigured, r as runPageUseFlowTool, t as PAGE_USE_FLOW_TOOL, wt as normalizeOptions, xt as DEFAULT_SESSION_HEADER, yt as DEFAULT_MAX_STEPS, zt as FLOW_BUNDLE_VERSION } from "./tool-B-3dgswr.mjs";
|
|
2
|
+
import { _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as showPageUseLauncher, c as PAGE_USE_GLOW_TAG, d as getPageUseFlow, f as PAGE_USE_GLOBAL_KEY, g as formatPageUseResultForModel, h as PAGE_USE_TOOL_NAME, i as PageUseLauncherElement, l as PageUseGlowElement, m as PAGE_USE_TOOL, n as mountPageUseUI, o as buildMenuPresets, p as PAGE_USE_COMMAND_TYPE, r as PAGE_USE_LAUNCHER_TAG, s as PAGE_USE_ROBOT_ICON_SVG, t as definePageUseElements, u as createPageUse, v as runPageUseTool, x as pageUseCapability, y as hidePageUseLauncher } from "./src-BgrtN4uP.mjs";
|
|
3
3
|
import { defineComponent, inject, onBeforeUnmount, onScopeDispose, shallowRef } from "vue";
|
|
4
4
|
import { routerKey } from "vue-router";
|
|
5
5
|
|
package/package.json
CHANGED