@arronqzy/blueprint-dsl 1.0.17 → 1.0.19

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/dist/index.d.cts CHANGED
@@ -76,6 +76,7 @@ declare const ZH_CN: {
76
76
  readonly lifecycleSignalMissing: "生命周期信号缺失";
77
77
  readonly blueprintCycle: "蓝图引用存在死循环:{path}";
78
78
  readonly debugMustStartFromLifecycle: "调试会话只能从生命周期节点开始";
79
+ readonly debugLifecycleDisabled: "该生命周期节点已停用;同阶段请改用已启用的生命周期节点";
79
80
  readonly nodeRemoved: "节点已从蓝图中移除";
80
81
  readonly clockNeedsTrue: "时钟节点需要收到真信号后才会启动";
81
82
  readonly blueprintNeedsTrue: "蓝图节点需要收到真信号后才会执行";
@@ -87,6 +88,8 @@ declare const ZH_CN: {
87
88
  readonly jsonNeedsTrue: "JSON 节点需要收到真信号后才会解析";
88
89
  readonly storageNeedsTrue: "存储节点需要收到真信号后才会读写缓存";
89
90
  readonly andNeedsBothTrue: "并运算:两个输入须均为真信号";
91
+ readonly branchNeedsTrue: "分支节点需要收到真信号后才会判断条件";
92
+ readonly branchExpressionError: "分支条件表达式求值失败:{reason}";
90
93
  };
91
94
  type BlueprintDslMessageKey = keyof typeof ZH_CN;
92
95
  /** UI layers call this when the app locale changes; DSL errors are produced in this locale. */
@@ -105,8 +108,36 @@ type LifecycleSignal = {
105
108
  /** ISO 8601 时间字符串,便于下游节点展示或日志 */
106
109
  isoTime: string;
107
110
  };
111
+ /** 图内生命周期节点的最小形状(编辑态 / 运行态共用) */
112
+ type LifecycleNodeLike = {
113
+ id: string;
114
+ nodeType?: string;
115
+ role?: string;
116
+ lifecyclePhase?: string;
117
+ /** false = 停用;缺省 / true = 启用 */
118
+ lifecycleEnabled?: boolean;
119
+ };
108
120
  declare const PAGE_LIFECYCLE_LABELS: Record<PageLifecyclePhase, string>;
109
121
  declare function createLifecycleSignal(phase: PageLifecyclePhase): LifecycleSignal;
122
+ declare function resolveLifecyclePhase(node: Pick<LifecycleNodeLike, "lifecyclePhase">): PageLifecyclePhase;
123
+ declare function isLifecycleGraphNode(node: Pick<LifecycleNodeLike, "nodeType" | "role">, lifecycleNodeType?: string): boolean;
124
+ declare function listLifecyclePeers<T extends LifecycleNodeLike>(nodes: readonly T[], phase: string, lifecycleNodeType?: string): T[];
125
+ declare function hasDuplicateLifecyclePhase(nodes: readonly LifecycleNodeLike[], phase: string, lifecycleNodeType?: string): boolean;
126
+ /**
127
+ * 同图同阶段只有 1 个时始终触发;超过 1 个时仅 `lifecycleEnabled !== false` 的节点触发。
128
+ */
129
+ declare function shouldEmitLifecycleNode(node: LifecycleNodeLike, nodes: readonly LifecycleNodeLike[], lifecycleNodeType?: string): boolean;
130
+ /** 新增同阶段生命周期节点时的默认启用状态:已有同伴则停用 */
131
+ declare function defaultLifecycleEnabledForNewNode(nodes: readonly LifecycleNodeLike[], phase: string, lifecycleNodeType?: string): boolean;
132
+ /**
133
+ * 同阶段互斥整理:
134
+ * - `enabled === true`:启用 focus,停用同阶段其它
135
+ * - `enabled === false`:仅停用 focus
136
+ * - 未指定:每个阶段若多个「开启」,只保留文档顺序中第一个,其余写 false
137
+ */
138
+ /** 调试 / 选择:优先 preferred,否则同阶段可发出信号的节点 */
139
+ declare function findEmittableLifecycleNodeId(nodes: readonly LifecycleNodeLike[], preferredId?: string | null, lifecycleNodeType?: string): string | null;
140
+ declare function reconcileLifecycleEnabled<T extends LifecycleNodeLike>(nodes: readonly T[], focusNodeId?: string, enabled?: boolean, lifecycleNodeType?: string): T[];
110
141
 
111
142
  /** 真信号:节点正常执行完成时的输出 */
112
143
  type TrueSignal<T = Value> = {
@@ -727,7 +758,44 @@ declare const SYSTEM_TIME_METHOD_NAMES: readonly ["add", "subtract", "set", "get
727
758
  declare const SYSTEM_MATH_KEYS: readonly ["E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2", "abs", "acos", "acosh", "asin", "asinh", "atan", "atan2", "atanh", "cbrt", "ceil", "clz32", "cos", "cosh", "exp", "expm1", "floor", "fround", "hypot", "imul", "log", "log10", "log1p", "log2", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc"];
728
759
  /** Location 常用属性 / 方法(联想用) */
729
760
  declare const SYSTEM_LOCATION_KEYS: readonly ["href", "protocol", "host", "hostname", "port", "pathname", "search", "hash", "origin", "ancestorOrigins", "assign", "reload", "replace", "toString"];
761
+ /** system.tools 常用方法(联想用) */
762
+ declare const SYSTEM_TOOLS_KEYS: readonly ["str", "int", "sum", "len", "pick", "replace", "replaceAll", "exclude"];
730
763
  type SystemTime = ReturnType<typeof dayjs>;
764
+ type SystemTools = {
765
+ /** 转为字符串 */
766
+ str: (value?: unknown) => string;
767
+ /** 转为数字(Number) */
768
+ int: (value?: unknown) => number;
769
+ /**
770
+ * 求和 / 拼接。
771
+ * - 参数可展平嵌套数组(如 `sum([...arr])`、`sum([[1,2],[3]])`)
772
+ * - 全是数字(或可转成有效数字)→ 数值求和
773
+ * - 任一项是字符串 → 按 JS `+` 从左到右拼接,结果为字符串
774
+ */
775
+ sum: (...values: unknown[]) => number | string;
776
+ /** 返回字符串长度;数组则返回 length;其余先转字符串再取长度 */
777
+ len: (value?: unknown) => number;
778
+ /**
779
+ * 按 0 基下标取出若干项。
780
+ * - 数组 → 新数组;字符串 → 新字符串
781
+ * - 后续下标支持展开,如 `pick(scope?.arr, ...scope?.idxs)` / `pick(scope?.arr, [...scope?.idxs])`
782
+ */
783
+ pick: (value: unknown, ...indices: unknown[]) => unknown[] | string;
784
+ /**
785
+ * 只替换第一个匹配项。
786
+ * - 数组按元素值相等替换;字符串按子串替换
787
+ */
788
+ replace: (value: unknown, target?: unknown, source?: unknown) => unknown[] | string;
789
+ /**
790
+ * 替换全部匹配项(规则同 replace)。
791
+ */
792
+ replaceAll: (value: unknown, target?: unknown, source?: unknown) => unknown[] | string;
793
+ /**
794
+ * 按 0 基下标删除若干项,返回新数组 / 新字符串。
795
+ * - 后续下标支持展开,如 `exclude(scope?.arr, ...scope?.idxs)`
796
+ */
797
+ exclude: (value: unknown, ...indices: unknown[]) => unknown[] | string;
798
+ };
731
799
  type SystemRoot = {
732
800
  /** 当前时间的 dayjs 对象(每次 createSystemRoot 取「此刻」) */
733
801
  time: SystemTime;
@@ -735,6 +803,8 @@ type SystemRoot = {
735
803
  math: Math;
736
804
  /** 当前页 Location;非浏览器环境为只读占位 */
737
805
  location: Location | SystemLocationStub;
806
+ /** 常用转换 / 聚合工具,可与 scope 嵌套调用 */
807
+ tools: SystemTools;
738
808
  };
739
809
  type SystemLocationStub = {
740
810
  href: string;
@@ -751,6 +821,7 @@ type SystemLocationStub = {
751
821
  replace: (url: string) => void;
752
822
  toString: () => string;
753
823
  };
824
+ declare function createSystemTools(): SystemTools;
754
825
  /** 每次求值新建,保证 `time` 为当前时刻 */
755
826
  declare function createSystemRoot(): SystemRoot;
756
827
  /** 联想用静态树(不依赖运行时实例) */
@@ -774,6 +845,67 @@ declare function looksLikeJsonText(text: string): boolean;
774
845
  /** 编码时保留未解析的 scope/system 模版片段 */
775
846
  declare function preserveTemplateTokensInEncode(value: string): boolean;
776
847
 
848
+ type DocLocale = "zh-CN" | "en-US";
849
+ type DocText = Record<DocLocale, string>;
850
+ type DocMember = {
851
+ name: string;
852
+ summary: DocText;
853
+ usage?: string;
854
+ };
855
+ type DocSection = {
856
+ id: string;
857
+ title: DocText;
858
+ body: DocText;
859
+ examples?: string[];
860
+ members?: DocMember[];
861
+ };
862
+ type TemplateDocRoot = "system" | "scope";
863
+ type DocBook = {
864
+ root: TemplateDocRoot;
865
+ title: DocText;
866
+ intro: DocText;
867
+ sections: DocSection[];
868
+ };
869
+ type TemplateDocPiece = {
870
+ type: "text";
871
+ text: string;
872
+ } | {
873
+ type: "link";
874
+ text: string;
875
+ root: TemplateDocRoot;
876
+ sectionId: string;
877
+ };
878
+ declare function docText(text: DocText, locale: string): string;
879
+ declare function resolveTemplateDocTarget(token: string): {
880
+ root: TemplateDocRoot;
881
+ sectionId: string;
882
+ };
883
+ declare function splitTemplateDocLinks(text: string): TemplateDocPiece[];
884
+ declare const TEMPLATE_DOC_CHROME: {
885
+ searchPlaceholder: DocText;
886
+ empty: DocText;
887
+ examples: DocText;
888
+ members: DocText;
889
+ current: DocText;
890
+ pluginNote: DocText;
891
+ };
892
+ declare const TEMPLATE_DOC_BOOKS: Record<TemplateDocRoot, DocBook>;
893
+ declare function sectionSearchText(section: DocSection): string;
894
+ type TemplateDocRequest = {
895
+ root: TemplateDocRoot;
896
+ sectionId: string;
897
+ token: string;
898
+ nonce: number;
899
+ };
900
+ declare function getTemplateDocRequest(): TemplateDocRequest | null;
901
+ declare function subscribeTemplateDoc(listener: () => void): () => void;
902
+ declare function openTemplateDoc(input: {
903
+ root: TemplateDocRoot;
904
+ sectionId: string;
905
+ token: string;
906
+ }): void;
907
+ declare function closeTemplateDoc(): void;
908
+
777
909
  type ScopeAutocompleteState = {
778
910
  templateStart: number;
779
911
  cursor: number;
@@ -996,6 +1128,20 @@ declare function validateLogicSourceCode(sourceCode: string): {
996
1128
  };
997
1129
  declare function executeLogicConfig(config: LogicNodeConfig, input: unknown): unknown;
998
1130
 
1131
+ type BranchNodeConfig = {
1132
+ /**
1133
+ * 条件表达式。支持:
1134
+ * - `{scope...}` / `{system...}` 整段表达式
1135
+ * - 含 `{scope...}` 的字符串模板
1136
+ * - 以 scope / system 为根的 JS 表达式(如 `scope?.value?.ok`)
1137
+ */
1138
+ expression: string;
1139
+ };
1140
+ declare const DEFAULT_BRANCH_NODE_CONFIG: BranchNodeConfig;
1141
+ declare function normalizeBranchConfig(config?: Partial<BranchNodeConfig> | null): BranchNodeConfig;
1142
+ /** 求值条件:结果按 JS truthy 判定。 */
1143
+ declare function evaluateBranchCondition(expression: string, scope: unknown): boolean;
1144
+
999
1145
  type ClockNodeConfig = {
1000
1146
  /** 两次输出之间的间隔秒数 */
1001
1147
  intervalSeconds: number;
@@ -1121,7 +1267,9 @@ declare function createViewEventSignal(input: {
1121
1267
  declare function collectArmedViewEventNodeIds(nodes: Array<{
1122
1268
  id: string;
1123
1269
  nodeType?: string;
1270
+ role?: string;
1124
1271
  lifecyclePhase?: string;
1272
+ lifecycleEnabled?: boolean;
1125
1273
  }>, edges: Array<{
1126
1274
  source: string;
1127
1275
  target: string;
@@ -1130,7 +1278,9 @@ declare function collectArmedViewEventNodeIds(nodes: Array<{
1130
1278
  declare function collectArmedViewEventBindings(nodes: Array<{
1131
1279
  id: string;
1132
1280
  nodeType?: string;
1281
+ role?: string;
1133
1282
  lifecyclePhase?: string;
1283
+ lifecycleEnabled?: boolean;
1134
1284
  viewElementIds?: string[];
1135
1285
  eventConfig?: Partial<ViewEventNodeConfig> | null;
1136
1286
  }>, edges: Array<{
@@ -1293,6 +1443,7 @@ declare const JSON_NODE_TYPE = "JsonNode";
1293
1443
  declare const STORAGE_NODE_TYPE = "StorageNode";
1294
1444
  declare const CLOCK_NODE_TYPE = "Clock";
1295
1445
  declare const AND_NODE_TYPE = "AndLogic";
1446
+ declare const BRANCH_NODE_TYPE = "Branch";
1296
1447
  declare const VIEW_NODE_TYPE = "ViewBind";
1297
1448
  declare const EVENT_NODE_TYPE = "ViewEvent";
1298
1449
  /** 蓝图引用节点:单入单出,收到真信号后执行嵌套蓝图 */
@@ -1310,6 +1461,8 @@ declare const storageNodeDefinition: NodeDefinition;
1310
1461
  declare const clockNodeDefinition: NodeDefinition;
1311
1462
  /** 并运算:两路输入均为真时输出真信号;单端口多连线按「或」合并 */
1312
1463
  declare const andLogicNodeDefinition: NodeDefinition;
1464
+ /** 分支:单输入;条件满足走 outTrue,否则走 outFalse;两侧均透传输入数据 */
1465
+ declare const branchNodeDefinition: NodeDefinition;
1313
1466
  /** 视图绑定节点:收到信号后为关联视图元素写入 scope,并向下游透传 */
1314
1467
  declare const viewBindNodeDefinition: NodeDefinition;
1315
1468
  /** 视图事件节点:输入必须来自生命周期节点,对应阶段触发后注册事件,视图事件发生时输出真信号 */
@@ -1323,6 +1476,8 @@ type RunnableGraphNode = {
1323
1476
  label?: string;
1324
1477
  role?: string;
1325
1478
  lifecyclePhase?: PageLifecyclePhase;
1479
+ /** 同图同阶段多个生命周期时:false 停用;缺省/true 启用 */
1480
+ lifecycleEnabled?: boolean;
1326
1481
  /** 蓝图库记录 id,Blueprint 节点引用嵌套蓝图时使用 */
1327
1482
  libraryBlueprintId?: string;
1328
1483
  blueprintName?: string;
@@ -1332,6 +1487,7 @@ type RunnableGraphNode = {
1332
1487
  jsonConfig?: JsonNodeConfig;
1333
1488
  storageConfig?: StorageNodeConfig;
1334
1489
  logicConfig?: LogicNodeConfig;
1490
+ branchConfig?: BranchNodeConfig;
1335
1491
  clockConfig?: ClockNodeConfig;
1336
1492
  eventConfig?: ViewEventNodeConfig;
1337
1493
  };
@@ -1447,6 +1603,7 @@ declare class BlueprintGraphRunner {
1447
1603
  private registerStorageBehavior;
1448
1604
  private registerClockBehavior;
1449
1605
  private registerAndBehavior;
1606
+ private registerBranchBehavior;
1450
1607
  private registerViewBindBehavior;
1451
1608
  private runFromNode;
1452
1609
  private createExecutor;
@@ -1507,4 +1664,4 @@ declare function isClockNodeActive(nodeId: string): boolean;
1507
1664
  declare function getActiveClockNodeIds(): string[];
1508
1665
  declare function subscribeActiveClockNodes(listener: () => void): () => boolean;
1509
1666
 
1510
- export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, type ApiCollectionDocument, type ApiCollectionEndpoint, type ApiCollectionFetchNodeLike, type ApiCollectionListItem, type ApiCollectionParseResult, type ApiCollectionRecord, type ApiCollectionSyncChangedField, type ApiCollectionSyncNodePatch, type ApiCollectionSyncNotice, type ApiCollectionSyncResult, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, type Behavior, type BehaviorContext, type BehaviorFn, BehaviorRegistry, type BlueprintCycleCheckOptions, type BlueprintCycleCheckResult, BlueprintCycleError, type BlueprintDslLocale, type BlueprintDslMessageKey, BlueprintGraphRunner, type BlueprintNodeOutputs, type BlueprintRefOutput, CLOCK_NODE_TYPE, type ClockNodeConfig, type ClockSignalOutput, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, EVENT_NODE_TYPE, type ExecuteFetchOptions, type ExecutionRunRecord, type ExecutionToken, type ExecutionTraceEntry, Executor, type ExecutorDeps, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, type FalseSignal, type FetchHttpMethod, type FetchRequestConfig, type FetchResponseType, type FetchResultValue, type FetchUrlInputMode, type IncomingGraphEdge, type IncomingNodeScope, type IncomingNodeScopeEntry, type IncomingNodeSource, JSON_NODE_TYPE, type JsonErrorRange, type JsonNodeConfig, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, type LibraryBlueprintResolver, type LifecycleSignal, type LogicNodeConfig, type NodeDefinition, type NodeSignal, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, type PageLifecyclePhase, type ParsedSwaggerDocument, type PortSpec, type RunnableGraph, type RunnableGraphEdge, type RunnableGraphNode, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, type Scope, type ScopeAutocompleteState, type StorageAccessors, type StorageKind, type StorageNodeConfig, type StorageReadConfig, type StorageSetConfig, type SwaggerApiEndpoint, type SystemLocationStub, type SystemRoot, type SystemTime, TEMPLATE_ROOT_NAMES, type TemplateRootName, type TrueSignal, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, type Value, type ViewEventNodeConfig, type ViewEventNodeSnapshot, type ViewEventSignal, type ViewEventSnapshot, type ViewEventType, type ViewScopeUpdateCallback, type WebStorageLike, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveStorageKey, resolveStorageWriteValue, scheduleClockOutputs, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, snapshotDomEvent, snapshotViewEventNode, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };
1667
+ export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, type ApiCollectionDocument, type ApiCollectionEndpoint, type ApiCollectionFetchNodeLike, type ApiCollectionListItem, type ApiCollectionParseResult, type ApiCollectionRecord, type ApiCollectionSyncChangedField, type ApiCollectionSyncNodePatch, type ApiCollectionSyncNotice, type ApiCollectionSyncResult, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, BRANCH_NODE_TYPE, type Behavior, type BehaviorContext, type BehaviorFn, BehaviorRegistry, type BlueprintCycleCheckOptions, type BlueprintCycleCheckResult, BlueprintCycleError, type BlueprintDslLocale, type BlueprintDslMessageKey, BlueprintGraphRunner, type BlueprintNodeOutputs, type BlueprintRefOutput, type BranchNodeConfig, CLOCK_NODE_TYPE, type ClockNodeConfig, type ClockSignalOutput, DEFAULT_BRANCH_NODE_CONFIG, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, type DocBook, type DocLocale, type DocMember, type DocSection, type DocText, EVENT_NODE_TYPE, type ExecuteFetchOptions, type ExecutionRunRecord, type ExecutionToken, type ExecutionTraceEntry, Executor, type ExecutorDeps, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, type FalseSignal, type FetchHttpMethod, type FetchRequestConfig, type FetchResponseType, type FetchResultValue, type FetchUrlInputMode, type IncomingGraphEdge, type IncomingNodeScope, type IncomingNodeScopeEntry, type IncomingNodeSource, JSON_NODE_TYPE, type JsonErrorRange, type JsonNodeConfig, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, type LibraryBlueprintResolver, type LifecycleNodeLike, type LifecycleSignal, type LogicNodeConfig, type NodeDefinition, type NodeSignal, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, type PageLifecyclePhase, type ParsedSwaggerDocument, type PortSpec, type RunnableGraph, type RunnableGraphEdge, type RunnableGraphNode, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, SYSTEM_TOOLS_KEYS, type Scope, type ScopeAutocompleteState, type StorageAccessors, type StorageKind, type StorageNodeConfig, type StorageReadConfig, type StorageSetConfig, type SwaggerApiEndpoint, type SystemLocationStub, type SystemRoot, type SystemTime, type SystemTools, TEMPLATE_DOC_BOOKS, TEMPLATE_DOC_CHROME, TEMPLATE_ROOT_NAMES, type TemplateDocPiece, type TemplateDocRequest, type TemplateDocRoot, type TemplateRootName, type TrueSignal, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, type Value, type ViewEventNodeConfig, type ViewEventNodeSnapshot, type ViewEventSignal, type ViewEventSnapshot, type ViewEventType, type ViewScopeUpdateCallback, type WebStorageLike, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, branchNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, closeTemplateDoc, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createSystemTools, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLifecycleEnabledForNewNode, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, docText, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateBranchCondition, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findEmittableLifecycleNodeId, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, getTemplateDocRequest, hasDuplicateLifecyclePhase, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isLifecycleGraphNode, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, listLifecyclePeers, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeBranchConfig, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, openTemplateDoc, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, reconcileLifecycleEnabled, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveLifecyclePhase, resolveStorageKey, resolveStorageWriteValue, resolveTemplateDocTarget, scheduleClockOutputs, sectionSearchText, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, shouldEmitLifecycleNode, snapshotDomEvent, snapshotViewEventNode, splitTemplateDocLinks, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, subscribeTemplateDoc, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };
package/dist/index.d.ts CHANGED
@@ -76,6 +76,7 @@ declare const ZH_CN: {
76
76
  readonly lifecycleSignalMissing: "生命周期信号缺失";
77
77
  readonly blueprintCycle: "蓝图引用存在死循环:{path}";
78
78
  readonly debugMustStartFromLifecycle: "调试会话只能从生命周期节点开始";
79
+ readonly debugLifecycleDisabled: "该生命周期节点已停用;同阶段请改用已启用的生命周期节点";
79
80
  readonly nodeRemoved: "节点已从蓝图中移除";
80
81
  readonly clockNeedsTrue: "时钟节点需要收到真信号后才会启动";
81
82
  readonly blueprintNeedsTrue: "蓝图节点需要收到真信号后才会执行";
@@ -87,6 +88,8 @@ declare const ZH_CN: {
87
88
  readonly jsonNeedsTrue: "JSON 节点需要收到真信号后才会解析";
88
89
  readonly storageNeedsTrue: "存储节点需要收到真信号后才会读写缓存";
89
90
  readonly andNeedsBothTrue: "并运算:两个输入须均为真信号";
91
+ readonly branchNeedsTrue: "分支节点需要收到真信号后才会判断条件";
92
+ readonly branchExpressionError: "分支条件表达式求值失败:{reason}";
90
93
  };
91
94
  type BlueprintDslMessageKey = keyof typeof ZH_CN;
92
95
  /** UI layers call this when the app locale changes; DSL errors are produced in this locale. */
@@ -105,8 +108,36 @@ type LifecycleSignal = {
105
108
  /** ISO 8601 时间字符串,便于下游节点展示或日志 */
106
109
  isoTime: string;
107
110
  };
111
+ /** 图内生命周期节点的最小形状(编辑态 / 运行态共用) */
112
+ type LifecycleNodeLike = {
113
+ id: string;
114
+ nodeType?: string;
115
+ role?: string;
116
+ lifecyclePhase?: string;
117
+ /** false = 停用;缺省 / true = 启用 */
118
+ lifecycleEnabled?: boolean;
119
+ };
108
120
  declare const PAGE_LIFECYCLE_LABELS: Record<PageLifecyclePhase, string>;
109
121
  declare function createLifecycleSignal(phase: PageLifecyclePhase): LifecycleSignal;
122
+ declare function resolveLifecyclePhase(node: Pick<LifecycleNodeLike, "lifecyclePhase">): PageLifecyclePhase;
123
+ declare function isLifecycleGraphNode(node: Pick<LifecycleNodeLike, "nodeType" | "role">, lifecycleNodeType?: string): boolean;
124
+ declare function listLifecyclePeers<T extends LifecycleNodeLike>(nodes: readonly T[], phase: string, lifecycleNodeType?: string): T[];
125
+ declare function hasDuplicateLifecyclePhase(nodes: readonly LifecycleNodeLike[], phase: string, lifecycleNodeType?: string): boolean;
126
+ /**
127
+ * 同图同阶段只有 1 个时始终触发;超过 1 个时仅 `lifecycleEnabled !== false` 的节点触发。
128
+ */
129
+ declare function shouldEmitLifecycleNode(node: LifecycleNodeLike, nodes: readonly LifecycleNodeLike[], lifecycleNodeType?: string): boolean;
130
+ /** 新增同阶段生命周期节点时的默认启用状态:已有同伴则停用 */
131
+ declare function defaultLifecycleEnabledForNewNode(nodes: readonly LifecycleNodeLike[], phase: string, lifecycleNodeType?: string): boolean;
132
+ /**
133
+ * 同阶段互斥整理:
134
+ * - `enabled === true`:启用 focus,停用同阶段其它
135
+ * - `enabled === false`:仅停用 focus
136
+ * - 未指定:每个阶段若多个「开启」,只保留文档顺序中第一个,其余写 false
137
+ */
138
+ /** 调试 / 选择:优先 preferred,否则同阶段可发出信号的节点 */
139
+ declare function findEmittableLifecycleNodeId(nodes: readonly LifecycleNodeLike[], preferredId?: string | null, lifecycleNodeType?: string): string | null;
140
+ declare function reconcileLifecycleEnabled<T extends LifecycleNodeLike>(nodes: readonly T[], focusNodeId?: string, enabled?: boolean, lifecycleNodeType?: string): T[];
110
141
 
111
142
  /** 真信号:节点正常执行完成时的输出 */
112
143
  type TrueSignal<T = Value> = {
@@ -727,7 +758,44 @@ declare const SYSTEM_TIME_METHOD_NAMES: readonly ["add", "subtract", "set", "get
727
758
  declare const SYSTEM_MATH_KEYS: readonly ["E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2", "abs", "acos", "acosh", "asin", "asinh", "atan", "atan2", "atanh", "cbrt", "ceil", "clz32", "cos", "cosh", "exp", "expm1", "floor", "fround", "hypot", "imul", "log", "log10", "log1p", "log2", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc"];
728
759
  /** Location 常用属性 / 方法(联想用) */
729
760
  declare const SYSTEM_LOCATION_KEYS: readonly ["href", "protocol", "host", "hostname", "port", "pathname", "search", "hash", "origin", "ancestorOrigins", "assign", "reload", "replace", "toString"];
761
+ /** system.tools 常用方法(联想用) */
762
+ declare const SYSTEM_TOOLS_KEYS: readonly ["str", "int", "sum", "len", "pick", "replace", "replaceAll", "exclude"];
730
763
  type SystemTime = ReturnType<typeof dayjs>;
764
+ type SystemTools = {
765
+ /** 转为字符串 */
766
+ str: (value?: unknown) => string;
767
+ /** 转为数字(Number) */
768
+ int: (value?: unknown) => number;
769
+ /**
770
+ * 求和 / 拼接。
771
+ * - 参数可展平嵌套数组(如 `sum([...arr])`、`sum([[1,2],[3]])`)
772
+ * - 全是数字(或可转成有效数字)→ 数值求和
773
+ * - 任一项是字符串 → 按 JS `+` 从左到右拼接,结果为字符串
774
+ */
775
+ sum: (...values: unknown[]) => number | string;
776
+ /** 返回字符串长度;数组则返回 length;其余先转字符串再取长度 */
777
+ len: (value?: unknown) => number;
778
+ /**
779
+ * 按 0 基下标取出若干项。
780
+ * - 数组 → 新数组;字符串 → 新字符串
781
+ * - 后续下标支持展开,如 `pick(scope?.arr, ...scope?.idxs)` / `pick(scope?.arr, [...scope?.idxs])`
782
+ */
783
+ pick: (value: unknown, ...indices: unknown[]) => unknown[] | string;
784
+ /**
785
+ * 只替换第一个匹配项。
786
+ * - 数组按元素值相等替换;字符串按子串替换
787
+ */
788
+ replace: (value: unknown, target?: unknown, source?: unknown) => unknown[] | string;
789
+ /**
790
+ * 替换全部匹配项(规则同 replace)。
791
+ */
792
+ replaceAll: (value: unknown, target?: unknown, source?: unknown) => unknown[] | string;
793
+ /**
794
+ * 按 0 基下标删除若干项,返回新数组 / 新字符串。
795
+ * - 后续下标支持展开,如 `exclude(scope?.arr, ...scope?.idxs)`
796
+ */
797
+ exclude: (value: unknown, ...indices: unknown[]) => unknown[] | string;
798
+ };
731
799
  type SystemRoot = {
732
800
  /** 当前时间的 dayjs 对象(每次 createSystemRoot 取「此刻」) */
733
801
  time: SystemTime;
@@ -735,6 +803,8 @@ type SystemRoot = {
735
803
  math: Math;
736
804
  /** 当前页 Location;非浏览器环境为只读占位 */
737
805
  location: Location | SystemLocationStub;
806
+ /** 常用转换 / 聚合工具,可与 scope 嵌套调用 */
807
+ tools: SystemTools;
738
808
  };
739
809
  type SystemLocationStub = {
740
810
  href: string;
@@ -751,6 +821,7 @@ type SystemLocationStub = {
751
821
  replace: (url: string) => void;
752
822
  toString: () => string;
753
823
  };
824
+ declare function createSystemTools(): SystemTools;
754
825
  /** 每次求值新建,保证 `time` 为当前时刻 */
755
826
  declare function createSystemRoot(): SystemRoot;
756
827
  /** 联想用静态树(不依赖运行时实例) */
@@ -774,6 +845,67 @@ declare function looksLikeJsonText(text: string): boolean;
774
845
  /** 编码时保留未解析的 scope/system 模版片段 */
775
846
  declare function preserveTemplateTokensInEncode(value: string): boolean;
776
847
 
848
+ type DocLocale = "zh-CN" | "en-US";
849
+ type DocText = Record<DocLocale, string>;
850
+ type DocMember = {
851
+ name: string;
852
+ summary: DocText;
853
+ usage?: string;
854
+ };
855
+ type DocSection = {
856
+ id: string;
857
+ title: DocText;
858
+ body: DocText;
859
+ examples?: string[];
860
+ members?: DocMember[];
861
+ };
862
+ type TemplateDocRoot = "system" | "scope";
863
+ type DocBook = {
864
+ root: TemplateDocRoot;
865
+ title: DocText;
866
+ intro: DocText;
867
+ sections: DocSection[];
868
+ };
869
+ type TemplateDocPiece = {
870
+ type: "text";
871
+ text: string;
872
+ } | {
873
+ type: "link";
874
+ text: string;
875
+ root: TemplateDocRoot;
876
+ sectionId: string;
877
+ };
878
+ declare function docText(text: DocText, locale: string): string;
879
+ declare function resolveTemplateDocTarget(token: string): {
880
+ root: TemplateDocRoot;
881
+ sectionId: string;
882
+ };
883
+ declare function splitTemplateDocLinks(text: string): TemplateDocPiece[];
884
+ declare const TEMPLATE_DOC_CHROME: {
885
+ searchPlaceholder: DocText;
886
+ empty: DocText;
887
+ examples: DocText;
888
+ members: DocText;
889
+ current: DocText;
890
+ pluginNote: DocText;
891
+ };
892
+ declare const TEMPLATE_DOC_BOOKS: Record<TemplateDocRoot, DocBook>;
893
+ declare function sectionSearchText(section: DocSection): string;
894
+ type TemplateDocRequest = {
895
+ root: TemplateDocRoot;
896
+ sectionId: string;
897
+ token: string;
898
+ nonce: number;
899
+ };
900
+ declare function getTemplateDocRequest(): TemplateDocRequest | null;
901
+ declare function subscribeTemplateDoc(listener: () => void): () => void;
902
+ declare function openTemplateDoc(input: {
903
+ root: TemplateDocRoot;
904
+ sectionId: string;
905
+ token: string;
906
+ }): void;
907
+ declare function closeTemplateDoc(): void;
908
+
777
909
  type ScopeAutocompleteState = {
778
910
  templateStart: number;
779
911
  cursor: number;
@@ -996,6 +1128,20 @@ declare function validateLogicSourceCode(sourceCode: string): {
996
1128
  };
997
1129
  declare function executeLogicConfig(config: LogicNodeConfig, input: unknown): unknown;
998
1130
 
1131
+ type BranchNodeConfig = {
1132
+ /**
1133
+ * 条件表达式。支持:
1134
+ * - `{scope...}` / `{system...}` 整段表达式
1135
+ * - 含 `{scope...}` 的字符串模板
1136
+ * - 以 scope / system 为根的 JS 表达式(如 `scope?.value?.ok`)
1137
+ */
1138
+ expression: string;
1139
+ };
1140
+ declare const DEFAULT_BRANCH_NODE_CONFIG: BranchNodeConfig;
1141
+ declare function normalizeBranchConfig(config?: Partial<BranchNodeConfig> | null): BranchNodeConfig;
1142
+ /** 求值条件:结果按 JS truthy 判定。 */
1143
+ declare function evaluateBranchCondition(expression: string, scope: unknown): boolean;
1144
+
999
1145
  type ClockNodeConfig = {
1000
1146
  /** 两次输出之间的间隔秒数 */
1001
1147
  intervalSeconds: number;
@@ -1121,7 +1267,9 @@ declare function createViewEventSignal(input: {
1121
1267
  declare function collectArmedViewEventNodeIds(nodes: Array<{
1122
1268
  id: string;
1123
1269
  nodeType?: string;
1270
+ role?: string;
1124
1271
  lifecyclePhase?: string;
1272
+ lifecycleEnabled?: boolean;
1125
1273
  }>, edges: Array<{
1126
1274
  source: string;
1127
1275
  target: string;
@@ -1130,7 +1278,9 @@ declare function collectArmedViewEventNodeIds(nodes: Array<{
1130
1278
  declare function collectArmedViewEventBindings(nodes: Array<{
1131
1279
  id: string;
1132
1280
  nodeType?: string;
1281
+ role?: string;
1133
1282
  lifecyclePhase?: string;
1283
+ lifecycleEnabled?: boolean;
1134
1284
  viewElementIds?: string[];
1135
1285
  eventConfig?: Partial<ViewEventNodeConfig> | null;
1136
1286
  }>, edges: Array<{
@@ -1293,6 +1443,7 @@ declare const JSON_NODE_TYPE = "JsonNode";
1293
1443
  declare const STORAGE_NODE_TYPE = "StorageNode";
1294
1444
  declare const CLOCK_NODE_TYPE = "Clock";
1295
1445
  declare const AND_NODE_TYPE = "AndLogic";
1446
+ declare const BRANCH_NODE_TYPE = "Branch";
1296
1447
  declare const VIEW_NODE_TYPE = "ViewBind";
1297
1448
  declare const EVENT_NODE_TYPE = "ViewEvent";
1298
1449
  /** 蓝图引用节点:单入单出,收到真信号后执行嵌套蓝图 */
@@ -1310,6 +1461,8 @@ declare const storageNodeDefinition: NodeDefinition;
1310
1461
  declare const clockNodeDefinition: NodeDefinition;
1311
1462
  /** 并运算:两路输入均为真时输出真信号;单端口多连线按「或」合并 */
1312
1463
  declare const andLogicNodeDefinition: NodeDefinition;
1464
+ /** 分支:单输入;条件满足走 outTrue,否则走 outFalse;两侧均透传输入数据 */
1465
+ declare const branchNodeDefinition: NodeDefinition;
1313
1466
  /** 视图绑定节点:收到信号后为关联视图元素写入 scope,并向下游透传 */
1314
1467
  declare const viewBindNodeDefinition: NodeDefinition;
1315
1468
  /** 视图事件节点:输入必须来自生命周期节点,对应阶段触发后注册事件,视图事件发生时输出真信号 */
@@ -1323,6 +1476,8 @@ type RunnableGraphNode = {
1323
1476
  label?: string;
1324
1477
  role?: string;
1325
1478
  lifecyclePhase?: PageLifecyclePhase;
1479
+ /** 同图同阶段多个生命周期时:false 停用;缺省/true 启用 */
1480
+ lifecycleEnabled?: boolean;
1326
1481
  /** 蓝图库记录 id,Blueprint 节点引用嵌套蓝图时使用 */
1327
1482
  libraryBlueprintId?: string;
1328
1483
  blueprintName?: string;
@@ -1332,6 +1487,7 @@ type RunnableGraphNode = {
1332
1487
  jsonConfig?: JsonNodeConfig;
1333
1488
  storageConfig?: StorageNodeConfig;
1334
1489
  logicConfig?: LogicNodeConfig;
1490
+ branchConfig?: BranchNodeConfig;
1335
1491
  clockConfig?: ClockNodeConfig;
1336
1492
  eventConfig?: ViewEventNodeConfig;
1337
1493
  };
@@ -1447,6 +1603,7 @@ declare class BlueprintGraphRunner {
1447
1603
  private registerStorageBehavior;
1448
1604
  private registerClockBehavior;
1449
1605
  private registerAndBehavior;
1606
+ private registerBranchBehavior;
1450
1607
  private registerViewBindBehavior;
1451
1608
  private runFromNode;
1452
1609
  private createExecutor;
@@ -1507,4 +1664,4 @@ declare function isClockNodeActive(nodeId: string): boolean;
1507
1664
  declare function getActiveClockNodeIds(): string[];
1508
1665
  declare function subscribeActiveClockNodes(listener: () => void): () => boolean;
1509
1666
 
1510
- export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, type ApiCollectionDocument, type ApiCollectionEndpoint, type ApiCollectionFetchNodeLike, type ApiCollectionListItem, type ApiCollectionParseResult, type ApiCollectionRecord, type ApiCollectionSyncChangedField, type ApiCollectionSyncNodePatch, type ApiCollectionSyncNotice, type ApiCollectionSyncResult, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, type Behavior, type BehaviorContext, type BehaviorFn, BehaviorRegistry, type BlueprintCycleCheckOptions, type BlueprintCycleCheckResult, BlueprintCycleError, type BlueprintDslLocale, type BlueprintDslMessageKey, BlueprintGraphRunner, type BlueprintNodeOutputs, type BlueprintRefOutput, CLOCK_NODE_TYPE, type ClockNodeConfig, type ClockSignalOutput, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, EVENT_NODE_TYPE, type ExecuteFetchOptions, type ExecutionRunRecord, type ExecutionToken, type ExecutionTraceEntry, Executor, type ExecutorDeps, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, type FalseSignal, type FetchHttpMethod, type FetchRequestConfig, type FetchResponseType, type FetchResultValue, type FetchUrlInputMode, type IncomingGraphEdge, type IncomingNodeScope, type IncomingNodeScopeEntry, type IncomingNodeSource, JSON_NODE_TYPE, type JsonErrorRange, type JsonNodeConfig, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, type LibraryBlueprintResolver, type LifecycleSignal, type LogicNodeConfig, type NodeDefinition, type NodeSignal, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, type PageLifecyclePhase, type ParsedSwaggerDocument, type PortSpec, type RunnableGraph, type RunnableGraphEdge, type RunnableGraphNode, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, type Scope, type ScopeAutocompleteState, type StorageAccessors, type StorageKind, type StorageNodeConfig, type StorageReadConfig, type StorageSetConfig, type SwaggerApiEndpoint, type SystemLocationStub, type SystemRoot, type SystemTime, TEMPLATE_ROOT_NAMES, type TemplateRootName, type TrueSignal, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, type Value, type ViewEventNodeConfig, type ViewEventNodeSnapshot, type ViewEventSignal, type ViewEventSnapshot, type ViewEventType, type ViewScopeUpdateCallback, type WebStorageLike, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveStorageKey, resolveStorageWriteValue, scheduleClockOutputs, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, snapshotDomEvent, snapshotViewEventNode, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };
1667
+ export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, type ApiCollectionDocument, type ApiCollectionEndpoint, type ApiCollectionFetchNodeLike, type ApiCollectionListItem, type ApiCollectionParseResult, type ApiCollectionRecord, type ApiCollectionSyncChangedField, type ApiCollectionSyncNodePatch, type ApiCollectionSyncNotice, type ApiCollectionSyncResult, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, BRANCH_NODE_TYPE, type Behavior, type BehaviorContext, type BehaviorFn, BehaviorRegistry, type BlueprintCycleCheckOptions, type BlueprintCycleCheckResult, BlueprintCycleError, type BlueprintDslLocale, type BlueprintDslMessageKey, BlueprintGraphRunner, type BlueprintNodeOutputs, type BlueprintRefOutput, type BranchNodeConfig, CLOCK_NODE_TYPE, type ClockNodeConfig, type ClockSignalOutput, DEFAULT_BRANCH_NODE_CONFIG, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, type DocBook, type DocLocale, type DocMember, type DocSection, type DocText, EVENT_NODE_TYPE, type ExecuteFetchOptions, type ExecutionRunRecord, type ExecutionToken, type ExecutionTraceEntry, Executor, type ExecutorDeps, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, type FalseSignal, type FetchHttpMethod, type FetchRequestConfig, type FetchResponseType, type FetchResultValue, type FetchUrlInputMode, type IncomingGraphEdge, type IncomingNodeScope, type IncomingNodeScopeEntry, type IncomingNodeSource, JSON_NODE_TYPE, type JsonErrorRange, type JsonNodeConfig, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, type LibraryBlueprintResolver, type LifecycleNodeLike, type LifecycleSignal, type LogicNodeConfig, type NodeDefinition, type NodeSignal, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, type PageLifecyclePhase, type ParsedSwaggerDocument, type PortSpec, type RunnableGraph, type RunnableGraphEdge, type RunnableGraphNode, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, SYSTEM_TOOLS_KEYS, type Scope, type ScopeAutocompleteState, type StorageAccessors, type StorageKind, type StorageNodeConfig, type StorageReadConfig, type StorageSetConfig, type SwaggerApiEndpoint, type SystemLocationStub, type SystemRoot, type SystemTime, type SystemTools, TEMPLATE_DOC_BOOKS, TEMPLATE_DOC_CHROME, TEMPLATE_ROOT_NAMES, type TemplateDocPiece, type TemplateDocRequest, type TemplateDocRoot, type TemplateRootName, type TrueSignal, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, type Value, type ViewEventNodeConfig, type ViewEventNodeSnapshot, type ViewEventSignal, type ViewEventSnapshot, type ViewEventType, type ViewScopeUpdateCallback, type WebStorageLike, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, branchNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, closeTemplateDoc, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createSystemTools, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLifecycleEnabledForNewNode, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, docText, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateBranchCondition, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findEmittableLifecycleNodeId, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, getTemplateDocRequest, hasDuplicateLifecyclePhase, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isLifecycleGraphNode, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, listLifecyclePeers, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeBranchConfig, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, openTemplateDoc, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, reconcileLifecycleEnabled, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveLifecyclePhase, resolveStorageKey, resolveStorageWriteValue, resolveTemplateDocTarget, scheduleClockOutputs, sectionSearchText, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, shouldEmitLifecycleNode, snapshotDomEvent, snapshotViewEventNode, splitTemplateDocLinks, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, subscribeTemplateDoc, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };