@huanban/rulego-editor-core 1.3.6 → 1.3.8
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.cjs.js +905 -743
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +21191 -20578
- package/dist/index.umd.js +896 -734
- package/dist/standalone/ai-model-policy.d.ts +60 -0
- package/dist/standalone/models-dev-catalog.d.ts +1 -0
- package/dist/standalone/node-copy.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ModelsDevCatalogModel } from './models-dev-catalog';
|
|
2
|
+
export type AiModelSource = 'models.dev' | 'live' | 'history' | 'host' | 'manual';
|
|
3
|
+
export type AiParamKey = 'temperature' | 'topP' | 'presencePenalty' | 'frequencyPenalty' | 'maxTokens' | 'n';
|
|
4
|
+
export type AiParamMode = 'editable' | 'fixed' | 'unsupported' | 'hidden';
|
|
5
|
+
export interface AiModelProfile {
|
|
6
|
+
providerId?: string;
|
|
7
|
+
providerName?: string;
|
|
8
|
+
apiUrl?: string;
|
|
9
|
+
model: string;
|
|
10
|
+
source: AiModelSource;
|
|
11
|
+
capabilities: {
|
|
12
|
+
reasoning?: boolean;
|
|
13
|
+
toolCall?: boolean;
|
|
14
|
+
temperature?: boolean;
|
|
15
|
+
vision?: boolean;
|
|
16
|
+
attachment?: boolean;
|
|
17
|
+
multimodal?: boolean;
|
|
18
|
+
streaming?: boolean;
|
|
19
|
+
};
|
|
20
|
+
limits?: {
|
|
21
|
+
context?: number;
|
|
22
|
+
output?: number;
|
|
23
|
+
};
|
|
24
|
+
cost?: {
|
|
25
|
+
input?: number;
|
|
26
|
+
output?: number;
|
|
27
|
+
cacheRead?: number;
|
|
28
|
+
cacheWrite?: number;
|
|
29
|
+
};
|
|
30
|
+
raw?: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface AiParamSpec {
|
|
33
|
+
key: AiParamKey;
|
|
34
|
+
labelKey: string;
|
|
35
|
+
fallbackLabel: string;
|
|
36
|
+
mode: AiParamMode;
|
|
37
|
+
input: 'slider' | 'number';
|
|
38
|
+
fixedValue?: number;
|
|
39
|
+
min?: number;
|
|
40
|
+
max?: number;
|
|
41
|
+
step?: number;
|
|
42
|
+
save: boolean;
|
|
43
|
+
reasonKey?: string;
|
|
44
|
+
fallbackReason?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface AiParamPolicy {
|
|
47
|
+
kind: 'reasoning' | 'standard';
|
|
48
|
+
warnings: Array<{
|
|
49
|
+
key: string;
|
|
50
|
+
fallback: string;
|
|
51
|
+
}>;
|
|
52
|
+
params: AiParamSpec[];
|
|
53
|
+
transformSaveParams(input: Record<string, number | undefined>): Record<string, number>;
|
|
54
|
+
}
|
|
55
|
+
export declare function inferReasoningModel(model: string): boolean;
|
|
56
|
+
export declare function formatAiCompactNumber(value: unknown): string;
|
|
57
|
+
export declare function modelProfileFromModelsDev(model: string, meta: ModelsDevCatalogModel, context?: Partial<AiModelProfile>): AiModelProfile;
|
|
58
|
+
export declare function fallbackAiModelProfile(model: string, context?: Partial<AiModelProfile>): AiModelProfile;
|
|
59
|
+
export declare function buildAiParamPolicy(profile: AiModelProfile): AiParamPolicy;
|
|
60
|
+
//# sourceMappingURL=ai-model-policy.d.ts.map
|
|
@@ -5,6 +5,10 @@ export interface CloneNodePropertiesOptions {
|
|
|
5
5
|
nodeId?: string;
|
|
6
6
|
nodeType?: string;
|
|
7
7
|
nodeName?: string;
|
|
8
|
+
layoutX?: number;
|
|
9
|
+
layoutY?: number;
|
|
10
|
+
parentGroupId?: string | null;
|
|
11
|
+
preserveParentGroupId?: boolean;
|
|
8
12
|
}
|
|
9
13
|
export declare function cloneNodePropertiesForCopy(sourceProperties: Record<string, any> | undefined, options?: CloneNodePropertiesOptions): Record<string, any>;
|
|
10
14
|
export declare function applyNewNodeModelIdentity(lf: any, newNode: any, options?: CloneNodePropertiesOptions): void;
|