@zhin.js/core 1.3.5 → 1.4.1
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 +29 -43
- package/lib/adapter.js +17 -2
- package/lib/built/command.d.ts +5 -2
- package/lib/built/command.js +4 -1
- package/lib/built/interactive-segments/fallback-store.d.ts +29 -0
- package/lib/built/interactive-segments/fallback-store.js +63 -0
- package/lib/built/interactive-segments/handlers.d.ts +7 -0
- package/lib/built/interactive-segments/handlers.js +20 -4
- package/lib/built/interactive-segments/index.d.ts +1 -0
- package/lib/built/interactive-segments/index.js +1 -0
- package/lib/built/interactive-segments/resolve.d.ts +10 -1
- package/lib/built/interactive-segments/resolve.js +30 -1
- package/lib/built/login-assist.d.ts +19 -2
- package/lib/built/login-assist.js +43 -4
- package/lib/built/segment-contract/index.d.ts +3 -1
- package/lib/built/segment-contract/index.js +3 -1
- package/lib/built/segment-contract/json-schema.d.ts +28 -0
- package/lib/built/segment-contract/json-schema.js +128 -0
- package/lib/built/segment-contract/media.d.ts +11 -1
- package/lib/built/segment-contract/media.js +30 -0
- package/lib/built/segment-contract/text.d.ts +7 -0
- package/lib/built/segment-contract/text.js +34 -0
- package/lib/built/segment-contract/types.d.ts +6 -2
- package/lib/built/segment-contract/validate.js +1 -0
- package/lib/command.d.ts +5 -2
- package/lib/command.js +5 -2
- package/lib/endpoint.d.ts +4 -1
- package/lib/endpoint.js +1 -0
- package/lib/feature/adapter.d.ts +2 -0
- package/lib/feature/adapter.js +2 -0
- package/lib/feature/command.d.ts +2 -0
- package/lib/feature/command.js +2 -0
- package/lib/feature/component.d.ts +2 -0
- package/lib/feature/component.js +2 -0
- package/lib/feature/middleware.d.ts +2 -0
- package/lib/feature/middleware.js +2 -0
- package/lib/plugin-runtime/im/contracts.d.ts +37 -3
- package/lib/plugin-runtime/im/contracts.js +8 -1
- package/lib/plugin-runtime/im/im-runtime.d.ts +47 -2
- package/lib/plugin-runtime/im/im-runtime.js +176 -11
- package/lib/plugin-runtime/im/index.d.ts +1 -0
- package/lib/plugin-runtime/im/index.js +1 -0
- package/lib/plugin-runtime/im/interactive.d.ts +25 -0
- package/lib/plugin-runtime/im/interactive.js +41 -0
- package/lib/plugin-runtime/im/message-dispatcher.d.ts +12 -2
- package/lib/plugin-runtime/im/message-dispatcher.js +153 -12
- package/lib/plugin-runtime/im/outbound-segments.d.ts +53 -6
- package/lib/plugin-runtime/im/outbound-segments.js +173 -10
- package/lib/plugin.d.ts +6 -3
- package/lib/plugin.js +38 -24
- package/lib/tool-zod.d.ts +16 -1
- package/lib/tool-zod.js +138 -51
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +6 -3
- package/package.json +57 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Zhin机器人核心框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -40,6 +40,26 @@
|
|
|
40
40
|
"types": "./lib/jsx-dev-runtime.d.ts",
|
|
41
41
|
"development": "./src/jsx-dev-runtime.ts",
|
|
42
42
|
"import": "./lib/jsx-dev-runtime.js"
|
|
43
|
+
},
|
|
44
|
+
"./feature/adapter": {
|
|
45
|
+
"types": "./lib/feature/adapter.d.ts",
|
|
46
|
+
"development": "./src/feature/adapter.ts",
|
|
47
|
+
"import": "./lib/feature/adapter.js"
|
|
48
|
+
},
|
|
49
|
+
"./feature/command": {
|
|
50
|
+
"types": "./lib/feature/command.d.ts",
|
|
51
|
+
"development": "./src/feature/command.ts",
|
|
52
|
+
"import": "./lib/feature/command.js"
|
|
53
|
+
},
|
|
54
|
+
"./feature/component": {
|
|
55
|
+
"types": "./lib/feature/component.d.ts",
|
|
56
|
+
"development": "./src/feature/component.ts",
|
|
57
|
+
"import": "./lib/feature/component.js"
|
|
58
|
+
},
|
|
59
|
+
"./feature/middleware": {
|
|
60
|
+
"types": "./lib/feature/middleware.d.ts",
|
|
61
|
+
"development": "./src/feature/middleware.ts",
|
|
62
|
+
"import": "./lib/feature/middleware.js"
|
|
43
63
|
}
|
|
44
64
|
},
|
|
45
65
|
"files": [
|
|
@@ -50,15 +70,15 @@
|
|
|
50
70
|
"segment-matcher": "^1.0.5",
|
|
51
71
|
"smol-toml": "^1.7.0",
|
|
52
72
|
"yaml": "^2.9.0",
|
|
53
|
-
"@zhin.js/adapter": "1.
|
|
54
|
-
"@zhin.js/command": "1.0.
|
|
55
|
-
"@zhin.js/component": "1.0.
|
|
56
|
-
"@zhin.js/
|
|
73
|
+
"@zhin.js/adapter": "1.1.1",
|
|
74
|
+
"@zhin.js/command": "1.0.3",
|
|
75
|
+
"@zhin.js/component": "1.0.3",
|
|
76
|
+
"@zhin.js/database": "1.0.78",
|
|
77
|
+
"@zhin.js/kernel": "1.0.5",
|
|
57
78
|
"@zhin.js/logger": "1.0.75",
|
|
58
|
-
"@zhin.js/middleware": "1.0.
|
|
59
|
-
"@zhin.js/plugin-runtime": "1.
|
|
60
|
-
"@zhin.js/
|
|
61
|
-
"@zhin.js/schema": "1.0.71"
|
|
79
|
+
"@zhin.js/middleware": "1.0.3",
|
|
80
|
+
"@zhin.js/plugin-runtime": "1.1.1",
|
|
81
|
+
"@zhin.js/schema": "1.0.72"
|
|
62
82
|
},
|
|
63
83
|
"peerDependencies": {
|
|
64
84
|
"zod": "^4.0.0"
|
|
@@ -71,8 +91,9 @@
|
|
|
71
91
|
"devDependencies": {
|
|
72
92
|
"@types/node": "^26.1.0",
|
|
73
93
|
"@types/qrcode": "^1.5.5",
|
|
94
|
+
"ajv": "8.18.0",
|
|
74
95
|
"typescript": "^6.0.3",
|
|
75
|
-
"@zhin.js/ai": "1.4.
|
|
96
|
+
"@zhin.js/ai": "1.4.6"
|
|
76
97
|
},
|
|
77
98
|
"repository": {
|
|
78
99
|
"type": "git",
|
|
@@ -92,6 +113,32 @@
|
|
|
92
113
|
"engines": {
|
|
93
114
|
"node": "^20.19.0 || >=22.12.0"
|
|
94
115
|
},
|
|
116
|
+
"zhin": {
|
|
117
|
+
"protocol": 1,
|
|
118
|
+
"type": "plugin",
|
|
119
|
+
"entry": "./lib/index.js",
|
|
120
|
+
"engine": "^1.0.0",
|
|
121
|
+
"runtime": "trusted",
|
|
122
|
+
"features": [
|
|
123
|
+
{
|
|
124
|
+
"package": "@zhin.js/adapter",
|
|
125
|
+
"api": "^1.0.0"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"package": "@zhin.js/command",
|
|
129
|
+
"api": "^1.0.0"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"package": "@zhin.js/component",
|
|
133
|
+
"api": "^1.0.0"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"package": "@zhin.js/middleware",
|
|
137
|
+
"api": "^1.0.0"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"plugins": []
|
|
141
|
+
},
|
|
95
142
|
"scripts": {
|
|
96
143
|
"build": "tsc",
|
|
97
144
|
"clean": "rimraf lib"
|