@zhin.js/runtime 1.1.10 → 1.1.12
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/lib/config-composer.d.ts +79 -0
- package/lib/host-config-schema.json +113 -1
- package/package.json +15 -15
package/lib/config-composer.d.ts
CHANGED
|
@@ -1841,6 +1841,22 @@ export declare const HOST_CONFIG_SCHEMA: {
|
|
|
1841
1841
|
type: string[];
|
|
1842
1842
|
description: string;
|
|
1843
1843
|
};
|
|
1844
|
+
fallbacks: {
|
|
1845
|
+
type: string;
|
|
1846
|
+
description: string;
|
|
1847
|
+
items: {
|
|
1848
|
+
type: string;
|
|
1849
|
+
required: string[];
|
|
1850
|
+
properties: {
|
|
1851
|
+
provider: {
|
|
1852
|
+
type: string;
|
|
1853
|
+
};
|
|
1854
|
+
model: {
|
|
1855
|
+
type: string;
|
|
1856
|
+
};
|
|
1857
|
+
};
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1844
1860
|
};
|
|
1845
1861
|
description: string;
|
|
1846
1862
|
};
|
|
@@ -2071,9 +2087,72 @@ export declare const HOST_CONFIG_SCHEMA: {
|
|
|
2071
2087
|
type: string;
|
|
2072
2088
|
description: string;
|
|
2073
2089
|
};
|
|
2090
|
+
ambient: {
|
|
2091
|
+
type: string;
|
|
2092
|
+
additionalProperties: boolean;
|
|
2093
|
+
description: string;
|
|
2094
|
+
properties: {
|
|
2095
|
+
conversations: {
|
|
2096
|
+
type: string;
|
|
2097
|
+
items: {
|
|
2098
|
+
type: string;
|
|
2099
|
+
};
|
|
2100
|
+
description: string;
|
|
2101
|
+
};
|
|
2102
|
+
judge: {
|
|
2103
|
+
type: string[];
|
|
2104
|
+
items: {
|
|
2105
|
+
type: string;
|
|
2106
|
+
};
|
|
2107
|
+
description: string;
|
|
2108
|
+
};
|
|
2109
|
+
quietMs: {
|
|
2110
|
+
type: string[];
|
|
2111
|
+
description: string;
|
|
2112
|
+
};
|
|
2113
|
+
cooldownMs: {
|
|
2114
|
+
type: string[];
|
|
2115
|
+
description: string;
|
|
2116
|
+
};
|
|
2117
|
+
maxPerHour: {
|
|
2118
|
+
type: string[];
|
|
2119
|
+
description: string;
|
|
2120
|
+
};
|
|
2121
|
+
conversationWindowMs: {
|
|
2122
|
+
type: string[];
|
|
2123
|
+
description: string;
|
|
2124
|
+
};
|
|
2125
|
+
judgeIntervalMs: {
|
|
2126
|
+
type: string[];
|
|
2127
|
+
description: string;
|
|
2128
|
+
};
|
|
2129
|
+
minConfidence: {
|
|
2130
|
+
type: string[];
|
|
2131
|
+
description: string;
|
|
2132
|
+
};
|
|
2133
|
+
mode: {
|
|
2134
|
+
type: string;
|
|
2135
|
+
enum: string[];
|
|
2136
|
+
description: string;
|
|
2137
|
+
};
|
|
2138
|
+
};
|
|
2139
|
+
};
|
|
2074
2140
|
};
|
|
2075
2141
|
description: string;
|
|
2076
2142
|
};
|
|
2143
|
+
usage: {
|
|
2144
|
+
type: string[];
|
|
2145
|
+
additionalProperties: boolean;
|
|
2146
|
+
description: string;
|
|
2147
|
+
properties: {
|
|
2148
|
+
retentionDays: {
|
|
2149
|
+
type: string[];
|
|
2150
|
+
minimum: number;
|
|
2151
|
+
default: number;
|
|
2152
|
+
description: string;
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2077
2156
|
};
|
|
2078
2157
|
};
|
|
2079
2158
|
menuKeyword: {
|
|
@@ -2540,6 +2540,25 @@
|
|
|
2540
2540
|
"string"
|
|
2541
2541
|
],
|
|
2542
2542
|
"description": "Media described per turn; the rest keep the placeholder. Default 4."
|
|
2543
|
+
},
|
|
2544
|
+
"fallbacks": {
|
|
2545
|
+
"type": "array",
|
|
2546
|
+
"description": "主识图模型失败、空回答或不支持该媒体时,按顺序尝试;不改变主对话模型。",
|
|
2547
|
+
"items": {
|
|
2548
|
+
"type": "object",
|
|
2549
|
+
"required": [
|
|
2550
|
+
"provider",
|
|
2551
|
+
"model"
|
|
2552
|
+
],
|
|
2553
|
+
"properties": {
|
|
2554
|
+
"provider": {
|
|
2555
|
+
"type": "string"
|
|
2556
|
+
},
|
|
2557
|
+
"model": {
|
|
2558
|
+
"type": "string"
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2543
2562
|
}
|
|
2544
2563
|
},
|
|
2545
2564
|
"description": "Perception pre-pass: when the turn's model cannot take an image / video / PDF,\nthis media-capable model describes it and the description is injected as\nuntrusted text (`[图片描述] …`). Unset = off (placeholders as before)."
|
|
@@ -2854,10 +2873,103 @@
|
|
|
2854
2873
|
},
|
|
2855
2874
|
"errorTemplate": {
|
|
2856
2875
|
"type": "string",
|
|
2857
|
-
"description": "
|
|
2876
|
+
"description": "入口层错误提示模板,{error} 为错误信息(可选;不配置时用聊天口吻说\"刚卡了一下\",主人额外看到原因)"
|
|
2877
|
+
},
|
|
2878
|
+
"ambient": {
|
|
2879
|
+
"type": "object",
|
|
2880
|
+
"additionalProperties": true,
|
|
2881
|
+
"description": "群聊旁听:群里没人叫机器人时,由判断模型决定是否接话。被 @、引用和私聊不经过这里,总会交给 Agent(Agent 也可以选择不回复)。",
|
|
2882
|
+
"properties": {
|
|
2883
|
+
"conversations": {
|
|
2884
|
+
"type": "array",
|
|
2885
|
+
"items": {
|
|
2886
|
+
"type": "string"
|
|
2887
|
+
},
|
|
2888
|
+
"description": "开启旁听的群,格式 platform:groupId;* 表示所有群。默认为空(关闭)"
|
|
2889
|
+
},
|
|
2890
|
+
"judge": {
|
|
2891
|
+
"type": [
|
|
2892
|
+
"string",
|
|
2893
|
+
"array"
|
|
2894
|
+
],
|
|
2895
|
+
"items": {
|
|
2896
|
+
"type": "string"
|
|
2897
|
+
},
|
|
2898
|
+
"description": "判断模型 providerAlias/model;也可以写成列表,前一个失败或限流时按顺序换下一个(免费额度通常按模型分别计算)。默认用主 Agent 的模型"
|
|
2899
|
+
},
|
|
2900
|
+
"quietMs": {
|
|
2901
|
+
"type": [
|
|
2902
|
+
"number",
|
|
2903
|
+
"string"
|
|
2904
|
+
],
|
|
2905
|
+
"description": "群安静多久后才判断一次(毫秒,默认 4000)"
|
|
2906
|
+
},
|
|
2907
|
+
"cooldownMs": {
|
|
2908
|
+
"type": [
|
|
2909
|
+
"number",
|
|
2910
|
+
"string"
|
|
2911
|
+
],
|
|
2912
|
+
"description": "两次主动插话之间的最短间隔(毫秒,默认 120000);对话进行中不受限制"
|
|
2913
|
+
},
|
|
2914
|
+
"maxPerHour": {
|
|
2915
|
+
"type": [
|
|
2916
|
+
"number",
|
|
2917
|
+
"string"
|
|
2918
|
+
],
|
|
2919
|
+
"description": "每个群每小时最多主动插话次数(默认 3);对话进行中不计入"
|
|
2920
|
+
},
|
|
2921
|
+
"conversationWindowMs": {
|
|
2922
|
+
"type": [
|
|
2923
|
+
"number",
|
|
2924
|
+
"string"
|
|
2925
|
+
],
|
|
2926
|
+
"description": "机器人说话后,这段时间内算作对话进行中:群友接它的话只由判断模型决定,不受冷却和每小时次数限制(毫秒,默认 180000)"
|
|
2927
|
+
},
|
|
2928
|
+
"judgeIntervalMs": {
|
|
2929
|
+
"type": [
|
|
2930
|
+
"number",
|
|
2931
|
+
"string"
|
|
2932
|
+
],
|
|
2933
|
+
"description": "没在对话时,同一个群至少隔这么久才判断一次(毫秒,默认 30000),节省判断模型的额度"
|
|
2934
|
+
},
|
|
2935
|
+
"minConfidence": {
|
|
2936
|
+
"type": [
|
|
2937
|
+
"number",
|
|
2938
|
+
"string"
|
|
2939
|
+
],
|
|
2940
|
+
"description": "判断模型置信度门槛 0..1(默认 0.7)"
|
|
2941
|
+
},
|
|
2942
|
+
"mode": {
|
|
2943
|
+
"type": "string",
|
|
2944
|
+
"enum": [
|
|
2945
|
+
"active",
|
|
2946
|
+
"shadow"
|
|
2947
|
+
],
|
|
2948
|
+
"description": "shadow 只记录判断结果、不回复(默认 active)"
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2858
2951
|
}
|
|
2859
2952
|
},
|
|
2860
2953
|
"description": "AI 触发配置"
|
|
2954
|
+
},
|
|
2955
|
+
"usage": {
|
|
2956
|
+
"type": [
|
|
2957
|
+
"object",
|
|
2958
|
+
"null"
|
|
2959
|
+
],
|
|
2960
|
+
"additionalProperties": false,
|
|
2961
|
+
"description": "结构化用量存储(SQLite、MySQL、PostgreSQL);独立于日志级别,不保存正文或工具参数。",
|
|
2962
|
+
"properties": {
|
|
2963
|
+
"retentionDays": {
|
|
2964
|
+
"type": [
|
|
2965
|
+
"integer",
|
|
2966
|
+
"string"
|
|
2967
|
+
],
|
|
2968
|
+
"minimum": 1,
|
|
2969
|
+
"default": 30,
|
|
2970
|
+
"description": "用量明细保留天数,正整数,默认 30 天;按回合结束时间清理,子调用与所属回合一起删除。"
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2861
2973
|
}
|
|
2862
2974
|
}
|
|
2863
2975
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "Static Plugin graph, generation transaction and HMR Root runtime for Zhin.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -19,25 +19,25 @@
|
|
|
19
19
|
"es-module-lexer": "2.3.1",
|
|
20
20
|
"import-meta-resolve": "4.2.0",
|
|
21
21
|
"semver": "7.8.5",
|
|
22
|
-
"@zhin.js/
|
|
23
|
-
"@zhin.js/
|
|
22
|
+
"@zhin.js/plugin-runtime": "1.1.16",
|
|
23
|
+
"@zhin.js/feature-kit": "1.1.8"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^26.1.2",
|
|
27
27
|
"tsx": "^4.23.1",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
|
-
"@zhin.js/adapter": "1.1.
|
|
30
|
-
"@zhin.js/agent-feature": "1.1.
|
|
31
|
-
"@zhin.js/
|
|
32
|
-
"@zhin.js/component": "1.1.
|
|
33
|
-
"@zhin.js/
|
|
34
|
-
"@zhin.js/
|
|
35
|
-
"@zhin.js/
|
|
36
|
-
"@zhin.js/middleware": "1.1.
|
|
37
|
-
"@zhin.js/
|
|
38
|
-
"@zhin.js/
|
|
39
|
-
"@zhin.js/skill": "1.1.
|
|
40
|
-
"@zhin.js/tool": "1.1.
|
|
29
|
+
"@zhin.js/adapter": "1.1.22",
|
|
30
|
+
"@zhin.js/agent-feature": "1.1.9",
|
|
31
|
+
"@zhin.js/handler": "1.1.8",
|
|
32
|
+
"@zhin.js/component": "1.1.9",
|
|
33
|
+
"@zhin.js/command": "1.1.10",
|
|
34
|
+
"@zhin.js/layout": "1.1.9",
|
|
35
|
+
"@zhin.js/mcp-feature": "1.1.9",
|
|
36
|
+
"@zhin.js/middleware": "1.1.9",
|
|
37
|
+
"@zhin.js/page": "1.1.9",
|
|
38
|
+
"@zhin.js/prompt-section": "1.1.8",
|
|
39
|
+
"@zhin.js/skill": "1.1.9",
|
|
40
|
+
"@zhin.js/tool": "1.1.9"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|