@tanzerfe/page-use 0.0.12 → 0.0.14
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-DUS8tBFn.d.mts} +25 -7
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/{options-BhKU0oJ5.d.mts → options-BIwnIeed.d.mts} +45 -2
- package/dist/{src-DAbH8ij6.mjs → src-D27GErmQ.mjs} +134 -38
- package/dist/{tool-CvEvIsN9.mjs → tool-DBeaEt3g.mjs} +439 -62
- package/dist/vue.d.mts +3 -3
- package/dist/vue.mjs +3 -3
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/flow.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as FlowApiSyncOptions, $t as FlowScope, A as MountPageUseManagerOptions, At as FlowManagerState, B as parseFlowRegion, Bt as FlowRegionContext, Ct as FlowIdentity, D as PAGE_USE_FLOW_TOOL, Dt as FlowKnowledge, Et as FlowInputDefinition, F as PageUseManagerPresentation, Ft as FlowPermissions, G as validateFlowInputs, Gt as FlowRepository, H as parseFlowSceneDraft, Ht as FlowRegionHost, I as FLOW_SEGMENT_MAX_CHARS, It as FlowPresenter, J as FLOW_SCHEMA_VERSION, Jt as FlowRunOptions, K as validateSceneBindings, Kt as FlowRepositorySnapshot, L as newRevision, Lt as FlowRegion, M as mountPageUseManager, Mt as FlowOutputReference, N as PAGE_USE_MANAGER_TAG, Nt as FlowParameter, O as getPageUseFlowCatalog, Ot as FlowKnowledgeRecord, P as PageUseManagerElement, Pt as FlowParameterDefinition, Q as FlowApiResponse, Qt as FlowSceneRecord, R as parseFlowBundle, Rt as FlowRegionAnchor, St as FlowGenerator, Tt as FlowImportStrategy, U as sceneKey, Ut as FlowRegionPage, V as parseFlowScene, Vt as FlowRegionFailure, W as scopeKey, Wt as FlowRegionSelector, X as FlowActionBinding, Xt as FlowRunner, Y as FlowAction, Yt as FlowRunResult, Z as FlowApiRequest, Zt as FlowScene, _t as FlowError, an as FlowStep, at as FlowClient, bt as FlowExecutionPorts, cn as JsonValue, ct as FlowCloudController, dt as FlowCompletionDecision, en as FlowSegment, et as FlowBindings, ft as FlowCompletionEvaluator, gt as FlowDescriptionCheck, ht as FlowContextBinding, in as FlowStatus, it as FlowCheckBinding, j as definePageUseManagerElement, jt as FlowMode, k as runPageUseFlowTool, kt as FlowManager, ln as PageUseFlowHandle, lt as FlowCloudRelease, mt as FlowContext, nn as FlowSessionContext, nt as FlowBundle, o as NormalizedLLMOptions, on as FlowTombstone, ot as FlowCloudAdapter, pt as FlowConfigResponse, q as FLOW_BUNDLE_VERSION, qt as FlowResolvedTarget, rn as FlowSnapshot, rt as FlowCheck, sn as JsonObject, st as FlowCloudCache, tn as FlowSegmentLog, tt as FlowBoundCheck, un as PageUseFlowOptions, ut as FlowCloudState, vt as FlowErrorCode, wt as FlowImportPreview, xt as FlowExportOptions, yt as FlowEvent, z as parseFlowKnowledge, zt as FlowRegionCandidate } from "./options-BIwnIeed.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,
|
|
1
|
+
import { A as parseFlowBundle, C as createIndexedDbFlowRepository, D as flowSceneDraftSchema, E as flowBundleSchema, F as sceneKey, Ht as FLOW_BUNDLE_VERSION, I as scopeKey, L as validateFlowInputs, M as parseFlowRegion, N as parseFlowScene, O as flowSceneSchema, P as parseFlowSceneDraft, S as previewFlowImport, Ut as FLOW_SCHEMA_VERSION, Wt 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 } from "./tool-DBeaEt3g.mjs";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
|
|
4
4
|
//#region src/flow/schema.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _n as PageUseSnapshot, b as PageUseTtsEngine, bn as PageUseTaskSource, gn as PageUseRunOptions, hn as PageUseProgressEvent, ln as PageUseFlowHandle, mn as PageUsePreset, pn as PageUseMenuNode, s as NormalizedPageUseOptions, u as PageUseOptions, vn as PageUseStepLog, yn as PageUseTaskResult } from "./options-BIwnIeed.mjs";
|
|
2
2
|
import { AgentStatus } from "page-agent";
|
|
3
3
|
import { LitElement, PropertyValues, nothing } from "lit";
|
|
4
4
|
//#region src/capability/api.d.ts
|
|
@@ -161,6 +161,10 @@ declare class PageUseLauncherElement extends LitElement {
|
|
|
161
161
|
private fabDrag;
|
|
162
162
|
/** 拖动面板时反推入口位置:面板锚定角即入口所在角,收起后入口停在面板原位置 */
|
|
163
163
|
private panelDrag;
|
|
164
|
+
private unsubscribeSubmit?;
|
|
165
|
+
private submitError;
|
|
166
|
+
private temporaryPanel;
|
|
167
|
+
private panelCommand;
|
|
164
168
|
connectedCallback(): void;
|
|
165
169
|
disconnectedCallback(): void;
|
|
166
170
|
private bindFlow;
|
|
@@ -213,6 +217,7 @@ declare class PageUseLauncherElement extends LitElement {
|
|
|
213
217
|
private onFabClick;
|
|
214
218
|
/** 展开面板(showPageUseLauncher 调用):等入口按新的显示状态渲染后再测量定位 */
|
|
215
219
|
private expand;
|
|
220
|
+
private closeTemporaryPanel;
|
|
216
221
|
/** 关闭调试入口:收起面板并持久化隐藏状态,之后需调用显示方法或 URL 参数调出 */
|
|
217
222
|
private close;
|
|
218
223
|
/** 标题点击计数:滑动窗口内达到次数时打开元信息面板并重新计数 */
|
|
@@ -377,12 +382,21 @@ interface PageUseCommand {
|
|
|
377
382
|
declare function isPageUseCommand(value: unknown): value is PageUseCommand;
|
|
378
383
|
//#endregion
|
|
379
384
|
//#region src/ui/launcherControl.d.ts
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
385
|
+
interface PageUsePanelSnapshot {
|
|
386
|
+
mounted: boolean;
|
|
387
|
+
entryVisible: boolean;
|
|
388
|
+
panelOpen: boolean;
|
|
389
|
+
}
|
|
390
|
+
/** 多面板时取任意可见;通常每个宿主只挂载一个面板。 */
|
|
391
|
+
declare function getPageUsePanelSnapshot(): PageUsePanelSnapshot;
|
|
392
|
+
declare function subscribePageUsePanel(listener: (snapshot: PageUsePanelSnapshot) => void): () => void;
|
|
393
|
+
/** 临时打开面板,不写入设置;未挂载时返回 false,不排队等待挂载。 */
|
|
394
|
+
declare function openPageUsePanel(): Promise<boolean>;
|
|
395
|
+
/** 临时收起面板,保留原有入口设置、输入和任务;可在 onUserSubmit 内调用。 */
|
|
396
|
+
declare function closePageUsePanel(): Promise<void>;
|
|
397
|
+
/** 旧接口:显示入口并展开,持久化设置。 */
|
|
384
398
|
declare function showPageUseLauncher(): void;
|
|
385
|
-
/**
|
|
399
|
+
/** 旧接口:隐藏面板和入口并持久化;不停止页面任务。 */
|
|
386
400
|
declare function hidePageUseLauncher(): void;
|
|
387
401
|
//#endregion
|
|
388
402
|
//#region src/capability/bridge.d.ts
|
|
@@ -395,6 +409,10 @@ interface PageUseGlobal extends PageUseCapability {
|
|
|
395
409
|
showLauncher: typeof showPageUseLauncher;
|
|
396
410
|
/** 隐藏调试入口,状态持久化 */
|
|
397
411
|
hideLauncher: typeof hidePageUseLauncher;
|
|
412
|
+
openPanel: typeof openPageUsePanel;
|
|
413
|
+
closePanel: typeof closePageUsePanel;
|
|
414
|
+
getPanelSnapshot: typeof getPageUsePanelSnapshot;
|
|
415
|
+
subscribePanel: typeof subscribePageUsePanel;
|
|
398
416
|
}
|
|
399
417
|
declare global {
|
|
400
418
|
interface Window {
|
|
@@ -639,4 +657,4 @@ declare const PAGE_USE_MASK_COLORS: {
|
|
|
639
657
|
readonly warning: "#fa8c16";
|
|
640
658
|
};
|
|
641
659
|
//#endregion
|
|
642
|
-
export { PageUseGlobal as A,
|
|
660
|
+
export { createPageUse as $, PageUseGlobal as A, PAGE_USE_TOOL_NAME as B, getElapsedSeconds as C, pageUseStore as D, isRunning as E, openPageUsePanel as F, MountPageUseUIOptions as G, formatPageUseResultForModel as H, showPageUseLauncher as I, PAGE_USE_LAUNCHER_TAG as J, definePageUseElements as K, subscribePageUsePanel as L, closePageUsePanel as M, getPageUsePanelSnapshot as N, ReadonlyStore as O, hidePageUseLauncher as P, PageUseHandle as Q, PAGE_USE_COMMAND_TYPE as R, clearPageUseLog as S, isPageUseConfigured as T, isPageUseCommand as U, PageUseCommand as V, runPageUseTool as W, PageUseLauncherElement as X, PageUseLauncherConfig as Y, PageUseLauncherLayout as Z, pageUseSettings as _, PAGE_USE_ROBOT_ICON_SVG as a, PageUseQuestion as b, PageUseCustomPreset as c, pageUsePresets as d, getPageUseFlow as et, PageUseHistoryEntry as f, PageUseSettings as g, PageUsePoint as h, PageUseGlowElement as i, PageUsePanelSnapshot as j, PAGE_USE_GLOBAL_KEY as k, PageUsePresetSaveResult as l, DEFAULT_PAGE_USE_SETTINGS as m, SIMULATOR_MASK_ID as n, pageUseCapability as nt, PAGE_USE_STATIC_PRESETS as o, pageUseHistory as p, mountPageUseUI as q, PAGE_USE_GLOW_TAG as r, buildMenuPresets as s, PAGE_USE_MASK_COLORS as t, PageUseCapability as tt, PageUsePresetState as u, BROWSER_ENGINE_ID as v, getPageUseConfig as w, PageUseState as x, browserTtsEngine as y, PAGE_USE_TOOL as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as PageUseGlobal, B as
|
|
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 FlowApiSyncOptions, $t as FlowScope, A as MountPageUseManagerOptions, At as FlowManagerState, Bt as FlowRegionContext, C as DEFAULT_TOUR_STYLES, Ct as FlowIdentity, D as PAGE_USE_FLOW_TOOL, Dt as FlowKnowledge, E as TOUR_STYLE_USER, Et as FlowInputDefinition, Ft as FlowPermissions, Gt as FlowRepository, H as parseFlowSceneDraft, Ht as FlowRegionHost, It as FlowPresenter, J as FLOW_SCHEMA_VERSION, Jt as FlowRunOptions, Kt as FlowRepositorySnapshot, L as newRevision, Lt as FlowRegion, M as mountPageUseManager, Mt as FlowOutputReference, Nt as FlowParameter, O as getPageUseFlowCatalog, Ot as FlowKnowledgeRecord, Pt as FlowParameterDefinition, Q as FlowApiResponse, Qt as FlowSceneRecord, Rt as FlowRegionAnchor, S as PageUseTtsVoice, St as FlowGenerator, T as TOUR_STYLE_TRAINER, Tt as FlowImportStrategy, U as sceneKey, Ut as FlowRegionPage, V as parseFlowScene, Vt as FlowRegionFailure, Wt as FlowRegionSelector, X as FlowActionBinding, Xt as FlowRunner, Y as FlowAction, Yt as FlowRunResult, Z as FlowApiRequest, Zt as FlowScene, _ as PageUseSubmitRequest, _n as PageUseSnapshot, _t as FlowError, a as DEFAULT_TOUR_MAX_TAB_SWITCHES, an as FlowStep, at as FlowClient, b as PageUseTtsEngine, bn as PageUseTaskSource, bt as FlowExecutionPorts, c as PageUseLLMOptions, cn as JsonValue, ct as FlowCloudController, d as PageUseRouterMode, dn as PageUseAskUserContext, dt as FlowCompletionDecision, en as FlowSegment, et as FlowBindings, f as PageUseTourOptions, fn as PageUseErrorCode, ft as FlowCompletionEvaluator, g as PageUseSubmitHandler, gn as PageUseRunOptions, gt as FlowDescriptionCheck, h as PageUseSubmitDecision, hn as PageUseProgressEvent, ht as FlowContextBinding, i as DEFAULT_STORAGE_KEY_PREFIX, in as FlowStatus, it as FlowCheckBinding, j as definePageUseManagerElement, jt as FlowMode, k as runPageUseFlowTool, kt as FlowManager, l as PageUseLLMStreamOptions, ln as PageUseFlowHandle, lt as FlowCloudRelease, m as readLauncherSwitch, mn as PageUsePreset, mt as FlowContext, n as DEFAULT_MODEL, nn as FlowSessionContext, nt as FlowBundle, on as FlowTombstone, ot as FlowCloudAdapter, p as normalizeOptions, pn as PageUseMenuNode, pt as FlowConfigResponse, q as FLOW_BUNDLE_VERSION, qt as FlowResolvedTarget, r as DEFAULT_SESSION_HEADER, rn as FlowSnapshot, rt as FlowCheck, s as NormalizedPageUseOptions, sn as JsonObject, st as FlowCloudCache, t as DEFAULT_MAX_STEPS, tn as FlowSegmentLog, tt as FlowBoundCheck, u as PageUseOptions, un as PageUseFlowOptions, ut as FlowCloudState, v as cancelPageUseSubmit, vn as PageUseStepLog, vt as FlowErrorCode, w as PageUseTourStyle, wt as FlowImportPreview, x as PageUseTtsSpeakOptions, xn as PageUseTaskStatus, xt as FlowExportOptions, y as pageUseSubmitStore, yn as PageUseTaskResult, yt as FlowEvent, z as parseFlowKnowledge, zt as FlowRegionCandidate } from "./options-BIwnIeed.mjs";
|
|
2
|
+
import { $ as createPageUse, A as PageUseGlobal, B as PAGE_USE_TOOL_NAME, C as getElapsedSeconds, D as pageUseStore, E as isRunning, F as openPageUsePanel, G as MountPageUseUIOptions, H as formatPageUseResultForModel, I as showPageUseLauncher, J as PAGE_USE_LAUNCHER_TAG, K as definePageUseElements, L as subscribePageUsePanel, M as closePageUsePanel, N as getPageUsePanelSnapshot, O as ReadonlyStore, P as hidePageUseLauncher, Q as PageUseHandle, R as PAGE_USE_COMMAND_TYPE, S as clearPageUseLog, T as isPageUseConfigured, U as isPageUseCommand, V as PageUseCommand, W as runPageUseTool, X as PageUseLauncherElement, Y as PageUseLauncherConfig, Z as PageUseLauncherLayout, _ as pageUseSettings, a as PAGE_USE_ROBOT_ICON_SVG, b as PageUseQuestion, c as PageUseCustomPreset, d as pageUsePresets, et as getPageUseFlow, f as PageUseHistoryEntry, g as PageUseSettings, h as PageUsePoint, i as PageUseGlowElement, j as PageUsePanelSnapshot, k as PAGE_USE_GLOBAL_KEY, l as PageUsePresetSaveResult, m as DEFAULT_PAGE_USE_SETTINGS, n as SIMULATOR_MASK_ID, nt as pageUseCapability, o as PAGE_USE_STATIC_PRESETS, p as pageUseHistory, q as mountPageUseUI, r as PAGE_USE_GLOW_TAG, s as buildMenuPresets, t as PAGE_USE_MASK_COLORS, tt as PageUseCapability, u as PageUsePresetState, v as BROWSER_ENGINE_ID, w as getPageUseConfig, x as PageUseState, y as browserTtsEngine, z as PAGE_USE_TOOL } from "./index-DUS8tBFn.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 PageUseAskUserContext, 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 PageUsePanelSnapshot, 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 PageUseSubmitDecision, type PageUseSubmitHandler, type PageUseSubmitRequest, 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, cancelPageUseSubmit, clearPageUseLog, closePageUsePanel, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, getPageUsePanelSnapshot, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, openPageUsePanel, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, pageUseSubmitStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher, subscribePageUsePanel };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as
|
|
1
|
+
import { Ct as DEFAULT_MODEL, Dt as normalizeOptions, Et as DEFAULT_TOUR_MAX_TAB_SWITCHES, F as sceneKey, Ft as browserTtsEngine, Ht as FLOW_BUNDLE_VERSION, J as isRunning, Lt as DEFAULT_TOUR_STYLES, Mt as PAGE_USE_MASK_COLORS, N as parseFlowScene, Nt as SIMULATOR_MASK_ID, P as parseFlowSceneDraft, Pt as BROWSER_ENGINE_ID, Rt as TOUR_STYLE_TRAINER, St as DEFAULT_MAX_STEPS, Tt as DEFAULT_STORAGE_KEY_PREFIX, U as getElapsedSeconds, Ut as FLOW_SCHEMA_VERSION, V as clearPageUseLog, W as getPageUseConfig, Wt as FlowError, Y as pageUseStore, a as mountPageUseManager, bt as pageUseSettings, ct as pageUseHistory, i as definePageUseManagerElement, it as cancelPageUseSubmit, j as parseFlowKnowledge, k as newRevision, kt as readLauncherSwitch, n as getPageUseFlowCatalog, ot as pageUseSubmitStore, q as isPageUseConfigured, r as runPageUseFlowTool, st as pageUsePresets, t as PAGE_USE_FLOW_TOOL, wt as DEFAULT_SESSION_HEADER, yt as DEFAULT_PAGE_USE_SETTINGS, zt as TOUR_STYLE_USER } from "./tool-DBeaEt3g.mjs";
|
|
2
|
+
import { C as showPageUseLauncher, S as openPageUsePanel, T as pageUseCapability, _ as isPageUseCommand, a as PAGE_USE_STATIC_PRESETS, b as getPageUsePanelSnapshot, 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, w as subscribePageUsePanel, x as hidePageUseLauncher, y as closePageUsePanel } from "./src-D27GErmQ.mjs";
|
|
3
3
|
|
|
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 };
|
|
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, cancelPageUseSubmit, clearPageUseLog, closePageUsePanel, createPageUse, definePageUseElements, definePageUseManagerElement, formatPageUseResultForModel, getElapsedSeconds, getPageUseConfig, getPageUseFlow, getPageUseFlowCatalog, getPageUsePanelSnapshot, hidePageUseLauncher, isPageUseCommand, isPageUseConfigured, isRunning, mountPageUseManager, mountPageUseUI, newRevision, normalizeOptions, openPageUsePanel, pageUseCapability, pageUseHistory, pageUsePresets, pageUseSettings, pageUseStore, pageUseSubmitStore, parseFlowKnowledge, parseFlowScene, parseFlowSceneDraft, readLauncherSwitch, runPageUseFlowTool, runPageUseTool, sceneKey, showPageUseLauncher, subscribePageUsePanel };
|
|
@@ -97,6 +97,10 @@ type PageUseProgressEvent = ({
|
|
|
97
97
|
}) & {
|
|
98
98
|
silent?: boolean;
|
|
99
99
|
};
|
|
100
|
+
interface PageUseAskUserContext {
|
|
101
|
+
taskId: string;
|
|
102
|
+
signal: AbortSignal;
|
|
103
|
+
}
|
|
100
104
|
interface PageUseRunOptions {
|
|
101
105
|
/** 任务来源,默认 'unknown' */
|
|
102
106
|
source?: PageUseTaskSource;
|
|
@@ -107,7 +111,7 @@ interface PageUseRunOptions {
|
|
|
107
111
|
* 模型向用户提问(ask_user 工具)时的回答方式。
|
|
108
112
|
* 不传时:调试面板已挂载则由面板作答;否则自动回复「无法补充信息」让模型自行决策或结束。
|
|
109
113
|
*/
|
|
110
|
-
onAskUser?: (question: string) => Promise<string>;
|
|
114
|
+
onAskUser?: (question: string, context: PageUseAskUserContext) => Promise<string>;
|
|
111
115
|
/**
|
|
112
116
|
* 页面讲解风格 key(如 'user'、'trainer'),仅影响「介绍当前页面」类任务的讲解方式。
|
|
113
117
|
* 优先级:本参数 > 面板设置 > pageTour.defaultStyle;不存在的 key 忽略。
|
|
@@ -1066,6 +1070,31 @@ interface PageUseTtsEngine {
|
|
|
1066
1070
|
speak(text: string, options: PageUseTtsSpeakOptions): Promise<void>;
|
|
1067
1071
|
}
|
|
1068
1072
|
//#endregion
|
|
1073
|
+
//#region src/core/userSubmit.d.ts
|
|
1074
|
+
type PageUseSubmitDecision = {
|
|
1075
|
+
action: 'continue';
|
|
1076
|
+
} | {
|
|
1077
|
+
action: 'handled';
|
|
1078
|
+
} | {
|
|
1079
|
+
action: 'reject';
|
|
1080
|
+
message: string;
|
|
1081
|
+
};
|
|
1082
|
+
interface PageUseSubmitRequest {
|
|
1083
|
+
text: string;
|
|
1084
|
+
requestId: string;
|
|
1085
|
+
signal: AbortSignal;
|
|
1086
|
+
}
|
|
1087
|
+
type PageUseSubmitHandler = (request: PageUseSubmitRequest) => Promise<PageUseSubmitDecision>;
|
|
1088
|
+
declare const pageUseSubmitStore: {
|
|
1089
|
+
get: () => {
|
|
1090
|
+
pending: boolean;
|
|
1091
|
+
};
|
|
1092
|
+
subscribe: (listener: (state: {
|
|
1093
|
+
pending: boolean;
|
|
1094
|
+
}) => void) => () => void;
|
|
1095
|
+
};
|
|
1096
|
+
declare function cancelPageUseSubmit(): void;
|
|
1097
|
+
//#endregion
|
|
1069
1098
|
//#region src/core/options.d.ts
|
|
1070
1099
|
/** 默认模型,仅为示例取值;接入其它端点时应通过 llm.model 显式指定支持 function calling 的模型 */
|
|
1071
1100
|
declare const DEFAULT_MODEL = "deepseek-chat";
|
|
@@ -1091,6 +1120,10 @@ interface PageUseLLMOptions {
|
|
|
1091
1120
|
maxSteps?: number;
|
|
1092
1121
|
/** 部分模型拒绝对象形式 tool_choice("Invalid tool_choice type")时打开 */
|
|
1093
1122
|
disableNamedToolChoice?: boolean;
|
|
1123
|
+
/** 使用 SSE 传输,完整聚合并校验后才执行工具;默认 false,不改变面板或语音时序。 */
|
|
1124
|
+
stream?: boolean;
|
|
1125
|
+
/** 仅 stream=true 时生效;由网关决定是否返回 usage。 */
|
|
1126
|
+
streamOptions?: PageUseLLMStreamOptions;
|
|
1094
1127
|
/** 额外合并进请求体的字段,例:DeepSeek 关闭思考模式 { thinking: { type: 'disabled' } } */
|
|
1095
1128
|
extraBody?: Record<string, unknown>;
|
|
1096
1129
|
/**
|
|
@@ -1099,6 +1132,10 @@ interface PageUseLLMOptions {
|
|
|
1099
1132
|
*/
|
|
1100
1133
|
sessionHeader?: string | false;
|
|
1101
1134
|
}
|
|
1135
|
+
interface PageUseLLMStreamOptions {
|
|
1136
|
+
/** 请求末尾的 usage 统计;默认不发送 stream_options,兼容未支持此参数的网关。 */
|
|
1137
|
+
includeUsage?: boolean;
|
|
1138
|
+
}
|
|
1102
1139
|
/**
|
|
1103
1140
|
* 路由模式,决定站点地图中路径的写法与默认的当前路径读取方式:
|
|
1104
1141
|
* - hash:页面 URL 形如 `/#/a/b`
|
|
@@ -1133,6 +1170,8 @@ interface PageUseOptions {
|
|
|
1133
1170
|
routeHints?: Record<string, string>;
|
|
1134
1171
|
/** 页面布局描述,替换系统提示中的「页面结构」段落;不传时使用通用描述 */
|
|
1135
1172
|
layoutHint?: string;
|
|
1173
|
+
/** 用户输入提交前由宿主判断;不影响程序化 run 或追问回答。 */
|
|
1174
|
+
onUserSubmit?: PageUseSubmitHandler;
|
|
1136
1175
|
/** 任务开始前的宿主预处理,例如展开折叠的侧栏,使菜单文字对模型可见 */
|
|
1137
1176
|
beforeTask?: () => void | Promise<void>;
|
|
1138
1177
|
/** 调试面板设置中 beforeTask 开关的显示名,默认「任务开始前执行宿主预处理」 */
|
|
@@ -1176,6 +1215,8 @@ interface NormalizedLLMOptions {
|
|
|
1176
1215
|
model: string;
|
|
1177
1216
|
maxSteps: number;
|
|
1178
1217
|
disableNamedToolChoice: boolean;
|
|
1218
|
+
stream: boolean;
|
|
1219
|
+
streamOptions: PageUseLLMStreamOptions;
|
|
1179
1220
|
extraBody: Record<string, unknown>;
|
|
1180
1221
|
/** 空串表示不发送会话头 */
|
|
1181
1222
|
sessionHeader: string;
|
|
@@ -1189,6 +1230,8 @@ interface NormalizedPageUseOptions {
|
|
|
1189
1230
|
resolveRouteName?: (path: string) => string | undefined;
|
|
1190
1231
|
routeHints: Record<string, string>;
|
|
1191
1232
|
layoutHint?: string;
|
|
1233
|
+
/** 用户输入提交前由宿主判断;不影响程序化 run 或追问回答。 */
|
|
1234
|
+
onUserSubmit?: PageUseSubmitHandler;
|
|
1192
1235
|
beforeTask?: () => void | Promise<void>;
|
|
1193
1236
|
beforeTaskLabel: string;
|
|
1194
1237
|
storageKeyPrefix: string;
|
|
@@ -1208,4 +1251,4 @@ declare function normalizeOptions(options: PageUseOptions): NormalizedPageUseOpt
|
|
|
1208
1251
|
*/
|
|
1209
1252
|
declare function readLauncherSwitch(fallback: boolean, storageKeyPrefix?: string): boolean;
|
|
1210
1253
|
//#endregion
|
|
1211
|
-
export {
|
|
1254
|
+
export { FlowApiSyncOptions as $, FlowScope as $t, MountPageUseManagerOptions as A, FlowManagerState as At, parseFlowRegion as B, FlowRegionContext as Bt, DEFAULT_TOUR_STYLES as C, FlowIdentity as Ct, PAGE_USE_FLOW_TOOL as D, FlowKnowledge as Dt, TOUR_STYLE_USER as E, FlowInputDefinition as Et, PageUseManagerPresentation as F, FlowPermissions as Ft, validateFlowInputs as G, FlowRepository as Gt, parseFlowSceneDraft as H, FlowRegionHost as Ht, FLOW_SEGMENT_MAX_CHARS as I, FlowPresenter as It, FLOW_SCHEMA_VERSION as J, FlowRunOptions as Jt, validateSceneBindings as K, FlowRepositorySnapshot as Kt, newRevision as L, FlowRegion as Lt, mountPageUseManager as M, FlowOutputReference as Mt, PAGE_USE_MANAGER_TAG as N, FlowParameter as Nt, getPageUseFlowCatalog as O, FlowKnowledgeRecord as Ot, PageUseManagerElement as P, FlowParameterDefinition as Pt, FlowApiResponse as Q, FlowSceneRecord as Qt, parseFlowBundle as R, FlowRegionAnchor as Rt, PageUseTtsVoice as S, FlowGenerator as St, TOUR_STYLE_TRAINER as T, FlowImportStrategy as Tt, sceneKey as U, FlowRegionPage as Ut, parseFlowScene as V, FlowRegionFailure as Vt, scopeKey as W, FlowRegionSelector as Wt, FlowActionBinding as X, FlowRunner as Xt, FlowAction as Y, FlowRunResult as Yt, FlowApiRequest as Z, FlowScene as Zt, PageUseSubmitRequest as _, PageUseSnapshot as _n, FlowError as _t, DEFAULT_TOUR_MAX_TAB_SWITCHES as a, FlowStep as an, FlowClient as at, PageUseTtsEngine as b, PageUseTaskSource as bn, FlowExecutionPorts as bt, PageUseLLMOptions as c, JsonValue as cn, FlowCloudController as ct, PageUseRouterMode as d, PageUseAskUserContext as dn, FlowCompletionDecision as dt, FlowSegment as en, FlowBindings as et, PageUseTourOptions as f, PageUseErrorCode as fn, FlowCompletionEvaluator as ft, PageUseSubmitHandler as g, PageUseRunOptions as gn, FlowDescriptionCheck as gt, PageUseSubmitDecision as h, PageUseProgressEvent as hn, FlowContextBinding as ht, DEFAULT_STORAGE_KEY_PREFIX as i, FlowStatus as in, FlowCheckBinding as it, definePageUseManagerElement as j, FlowMode as jt, runPageUseFlowTool as k, FlowManager as kt, PageUseLLMStreamOptions as l, PageUseFlowHandle as ln, FlowCloudRelease as lt, readLauncherSwitch as m, PageUsePreset as mn, FlowContext as mt, DEFAULT_MODEL as n, FlowSessionContext as nn, FlowBundle as nt, NormalizedLLMOptions as o, FlowTombstone as on, FlowCloudAdapter as ot, normalizeOptions as p, PageUseMenuNode as pn, FlowConfigResponse as pt, FLOW_BUNDLE_VERSION as q, FlowResolvedTarget as qt, DEFAULT_SESSION_HEADER as r, FlowSnapshot as rn, FlowCheck as rt, NormalizedPageUseOptions as s, JsonObject as sn, FlowCloudCache as st, DEFAULT_MAX_STEPS as t, FlowSegmentLog as tn, FlowBoundCheck as tt, PageUseOptions as u, PageUseFlowOptions as un, FlowCloudState as ut, cancelPageUseSubmit as v, PageUseStepLog as vn, FlowErrorCode as vt, PageUseTourStyle as w, FlowImportPreview as wt, PageUseTtsSpeakOptions as x, PageUseTaskStatus as xn, FlowExportOptions as xt, pageUseSubmitStore as y, PageUseTaskResult as yn, FlowEvent as yt, parseFlowKnowledge as z, FlowRegionCandidate as zt };
|