@openclaw/line 2026.8.1-beta.3 → 2026.8.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/dist/account-helpers-BSUyZwLm.js +12 -0
- package/dist/api.js +2 -2
- package/dist/{card-command-CyDSm-OU.js → card-command-BywtX77U.js} +66 -29
- package/dist/{channel-DmoKZXmG.js → channel-DpMgRaxl.js} +52 -349
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel.runtime-Bty5U_1N.js +4 -0
- package/dist/doctor-contract-api.js +141 -0
- package/dist/index.js +1 -1
- package/dist/{markdown-to-line-rEaras_0.js → markdown-to-line-CG9Jy22s.js} +29 -25
- package/dist/{monitor-BYXS_B6r.js → monitor-Ch6TIatG.js} +261 -166
- package/dist/monitor.runtime-Czc3NxNV.js +2 -0
- package/dist/outbound.runtime-CyleVzFR.js +3 -0
- package/dist/probe.runtime-DTxBWvKz.js +2 -0
- package/dist/rich-messages-t_zRL24p.js +760 -0
- package/dist/runtime-api.js +10 -11
- package/dist/{send-BJCeiiOB.js → send-B-K2B6au.js} +138 -104
- package/dist/{send-receipt-DKZzgHMO.js → send-retry-CUvrarfE.js} +137 -413
- package/dist/setup-api.js +1 -1
- package/dist/{setup-surface-W0Dbgu58.js → setup-surface-DSJ92oJ5.js} +24 -17
- package/dist/webhook-spool-contract-CNe2h1I2.js +58 -0
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +26 -2
- package/package.json +6 -6
- package/dist/channel.runtime-qrUV6wPE.js +0 -4
- package/dist/config-schema-Be3azjB_.js +0 -47
- package/dist/monitor.runtime-B2z_5ugU.js +0 -2
- package/dist/outbound.runtime-DDTeqaBW.js +0 -3
- package/dist/probe.runtime-D13ZtXsd.js +0 -2
- package/dist/quick-reply-fallback-D86FwAfr.js +0 -56
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
- package/dist/{probe-CM03wo6r.js → probe-4gc_YQ2L.js} +1 -1
|
@@ -91,7 +91,7 @@ const User = Type.Object({ // const User = {
|
|
|
91
91
|
// type: 'string',
|
|
92
92
|
// format: 'email'
|
|
93
93
|
// }
|
|
94
|
-
// }
|
|
94
|
+
// },
|
|
95
95
|
// required: [
|
|
96
96
|
// 'id',
|
|
97
97
|
// 'name',
|
|
@@ -111,24 +111,28 @@ type User = Type.Static<typeof User> // type User = {
|
|
|
111
111
|
|
|
112
112
|
## Script
|
|
113
113
|
|
|
114
|
-
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/
|
|
114
|
+
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFkBDGAC0YgBMBXAG1WoBjCADsAzvGZs4AXkREAdAGVBUYGBgAKAAaU4cQmjgA1VIJjQALLLgBvOGQBccEdxDFUUADRwkz1+6ePgBe-m4e3nAA7mGBUHAAvnoGRCZmFlAAzDb2Ti7hQb6xESHFnonJhuim5tAATDkOZZF++XEV2gCU1HRwAOJQTGCswIJiHDz8QqIS-YPDo+NyyGjKqupaUqw+uvpVabCoZDnJ+pBiwDDAos41GZZepy7QIEy8t+nQmY-6+twAbh9alA6skkntUn1UDhUDAoEgTr84P9PFdBKgxB9DmQANoAXR+v2AIk4owxzXxYMqqSknmAb0RvyY7mAqBEMCB90J+lJGAw3DEqE5Vm5cDEaEEfCYUGFUEsVIhRgYGPYclsTwA5tCQLD4c4oTC4UhRa8YHS3s5aWo3lSutR9sqxKr5KslDAWKMADxVCAYOZDEZjHF4R2sPB4gB8+l6DpVjKRCcTSeTKZTvX0WsNerscAUecSotTReLJfTcFN5veObzCgqJfrDeTvQSQA) | [Example 2](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFkBDGAC0YgBMBXAG1WoBjCADsAzvABqqQTGgAWOAF5ERAHQB5YgCsZMABQBvOGQBcqtGoBy3EMVRR9ASgA0cJOeSWbdh87cAXp7qPvaOrnAA7sHetmHOcAC+TpTC4lJ60ADMyhaomjp6RiYx+aF+ER551nEVgaU1vuFJKWkScNKy0ABMuV75WrqyxWbV5eFuVf2N8U4t1HRwAOJQTGCswIJiHDz8QqLt0rCoZH3qg0WGlHBwkGLAMMCi5p1yUPIu13Ai0CBMvC9MlAsp8btwAG6ArpQbqUZKpA7wJaoHCoGBQJBnSwXYZXG7ghyPQSoMQNACCUFWSH0RxgJ1cX2AIk4mxJ5MpTGp03GzhS8La8GYdKgwH+WIGhVxXyYdmAqBEMChbw+XxZGAw3DEqCVClBcDEaEEfCYUB170+-MRjBJ7BU0xxBjxcAA5iiQGiMeZkaj0Ug9X9haKAYwWA4g3CUpRCGhrWJbdUAMowFibAA80ZRGFjrAAfDd8wXC4sM9nck7CxXK1XqzX84sbq6fZ64MY1G2knra13u1363AA2H-uZW+3El8exPJ3X6IkgA)
|
|
115
115
|
|
|
116
|
-
TypeBox includes a
|
|
116
|
+
TypeBox includes a micro TypeScript engine that can transform TypeScript definitions to JSON Schema. The engine is fully type-safe and supports many programmable constructs including Conditional, Mapped, Indexed, Generics, Distributive Generics, and more.
|
|
117
117
|
|
|
118
118
|
### Example
|
|
119
119
|
|
|
120
|
-
Syntax highlighting is available via the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sinclairzx81.typebox-script)
|
|
120
|
+
Syntax highlighting is available via the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sinclairzx81.typebox-script).
|
|
121
121
|
|
|
122
122
|
```typescript
|
|
123
|
-
|
|
123
|
+
import Type from 'typebox'
|
|
124
|
+
|
|
125
|
+
// Math Module
|
|
126
|
+
|
|
124
127
|
const Math = Type.Script(`
|
|
125
|
-
type Vector2 = { x: number, y: number }
|
|
126
|
-
type Vector3 = { x: number, y: number, z: number }
|
|
127
128
|
type Vector4 = { x: number, y: number, z: number, w: number }
|
|
129
|
+
type Vector3 = { x: number, y: number, z: number }
|
|
130
|
+
type Vector2 = { x: number, y: number }
|
|
128
131
|
`)
|
|
129
132
|
|
|
130
|
-
//
|
|
131
|
-
|
|
133
|
+
// Graphics Module
|
|
134
|
+
|
|
135
|
+
const Graphics = Type.Script(Math, `
|
|
132
136
|
type Vertex = {
|
|
133
137
|
position: Vector4,
|
|
134
138
|
normal: Vector3,
|
|
@@ -149,23 +153,10 @@ const { Mesh } = Type.Script(Math, `
|
|
|
149
153
|
}
|
|
150
154
|
`)
|
|
151
155
|
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Mesh.properties.material.properties.diffuse.properties.x
|
|
157
|
-
Mesh.properties.material.properties.ambient.properties.x
|
|
158
|
-
Mesh.properties.material.properties.specular.properties.x
|
|
159
|
-
|
|
160
|
-
// Static Inference
|
|
161
|
-
function render(mesh: Type.Static<typeof Mesh>) {
|
|
162
|
-
mesh.geometry.vertices[0].position.x
|
|
163
|
-
mesh.geometry.vertices[0].normal.x
|
|
164
|
-
mesh.geometry.vertices[0].uv.x
|
|
165
|
-
mesh.material.diffuse.x
|
|
166
|
-
mesh.material.ambient.x
|
|
167
|
-
mesh.material.specular.x
|
|
168
|
-
}
|
|
156
|
+
type Mesh = Type.Static<typeof Graphics['Mesh']> // type Mesh = {
|
|
157
|
+
// geometry: { ... },
|
|
158
|
+
// material: { ... }
|
|
159
|
+
// }
|
|
169
160
|
```
|
|
170
161
|
|
|
171
162
|
<a name="Schema"></a>
|
|
@@ -184,18 +175,21 @@ import Schema from 'typebox/schema'
|
|
|
184
175
|
|
|
185
176
|
### Compile
|
|
186
177
|
|
|
187
|
-
The compiler accepts
|
|
178
|
+
The compiler accepts either TypeBox types or native JSON Schema.
|
|
188
179
|
|
|
189
180
|
```typescript
|
|
190
|
-
|
|
181
|
+
|
|
182
|
+
// Type
|
|
183
|
+
|
|
184
|
+
const VectorA = Schema.Compile(Type.Object({ // const VectorA: Validator<TObject<{
|
|
191
185
|
x: Type.Number(), // x: TNumber
|
|
192
186
|
y: Type.Number(), // y: TNumber
|
|
193
187
|
z: Type.Number() // z: TNumber
|
|
194
188
|
})) // }>>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const
|
|
189
|
+
|
|
190
|
+
// Schema
|
|
191
|
+
|
|
192
|
+
const VectorB = Schema.Compile({ // const VectorB: Validator<{
|
|
199
193
|
type: 'object', // type: "object";
|
|
200
194
|
required: ['x', 'y', 'z'], // required: ["x", "y", "z"];
|
|
201
195
|
properties: { // properties: { ... };
|
|
@@ -208,35 +202,36 @@ const Vector = Schema.Compile({ // const Vector: Validator<{
|
|
|
208
202
|
|
|
209
203
|
### Validate
|
|
210
204
|
|
|
211
|
-
|
|
205
|
+
Compiled validator instances provide functions to Check and Parse values.
|
|
212
206
|
|
|
213
207
|
```typescript
|
|
208
|
+
|
|
209
|
+
// Compile
|
|
210
|
+
|
|
214
211
|
const Vector = Schema.Compile(Type.Script(`{
|
|
215
212
|
x: number
|
|
216
213
|
y: number
|
|
217
214
|
z: number
|
|
218
215
|
}`))
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
z: 0
|
|
224
|
-
})
|
|
225
|
-
|
|
226
|
-
const value = Vector.Parse({ // const value: {
|
|
227
|
-
x: 1, // x: number
|
|
228
|
-
y: 0, // y: number
|
|
229
|
-
z: 0 // z: number
|
|
230
|
-
}) // }
|
|
231
|
-
```
|
|
217
|
+
// Check
|
|
218
|
+
|
|
219
|
+
const valid = Vector.Check({ x: 1, y: 0, z: 0 }) // const valid: boolean
|
|
232
220
|
|
|
221
|
+
// Parse
|
|
233
222
|
|
|
223
|
+
const result = Vector.Parse({ x: 1, y: 0, z: 0 }) // const result: {
|
|
224
|
+
// x: number
|
|
225
|
+
// y: number
|
|
226
|
+
// z: number
|
|
227
|
+
// }
|
|
228
|
+
```
|
|
234
229
|
|
|
235
230
|
### Coverage
|
|
236
231
|
|
|
237
|
-
|
|
232
|
+
[JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) | [JSON Schema Compliance Suite](https://github.com/sinclairzx81/json-schema-compliance-suite)
|
|
238
233
|
|
|
239
|
-
|
|
234
|
+
TypeBox supports all major JSON Schema draft versions and tracks compliance against the official JSON Schema Test Suite. It also maintains a separate JavaScript compliance suite to track ecosystem adoption as JSON Schema moves toward the V1 candidate. The following table shows TypeBox specification coverage.
|
|
240
235
|
|
|
241
236
|
| Spec | 3 | 4 | 6 | 7 | 2019-09 | 2020-12 | v1 |
|
|
242
237
|
|:-----|:--|:--|:--|:--|:--|:--|:--|
|
|
@@ -253,7 +248,7 @@ Ref: [JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Tes
|
|
|
253
248
|
| dependencies | 17/18 | ✅ | ✅ | ✅ | - | - | - |
|
|
254
249
|
| dependentRequired | - | - | - | - | ✅ | ✅ | ✅ |
|
|
255
250
|
| dependentSchemas | - | - | - | - | ✅ | ✅ | ✅ |
|
|
256
|
-
| dynamicRef | - | - | - | - | - |
|
|
251
|
+
| dynamicRef | - | - | - | - | - | 40/44 | 21/27 |
|
|
257
252
|
| enum | 14/16 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
258
253
|
| exclusiveMaximum | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
259
254
|
| exclusiveMinimum | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
@@ -279,50 +274,52 @@ Ref: [JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Tes
|
|
|
279
274
|
| properties | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
280
275
|
| propertyNames | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
281
276
|
| recursiveRef | - | - | - | - | ✅ | - | - |
|
|
282
|
-
| ref |
|
|
277
|
+
| ref | 22/27 | 37/45 | 67/70 | 75/78 | 79/81 | 77/79 | 78/79 |
|
|
283
278
|
| required | 3/4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
284
279
|
| type | 73/80 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
285
|
-
| unevaluatedItems | - | - | - | - | ✅ |
|
|
286
|
-
| unevaluatedProperties | - | - | - | - | ✅ | ✅ |
|
|
280
|
+
| unevaluatedItems | - | - | - | - | ✅ | ✅ | 70/71 |
|
|
281
|
+
| unevaluatedProperties | - | - | - | - | ✅ | ✅ | 128/129 |
|
|
287
282
|
| uniqueItems | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
288
283
|
|
|
289
|
-
|
|
290
284
|
### Performance
|
|
291
285
|
|
|
292
|
-
|
|
286
|
+
TypeBox tracks comparative performance against AJV8 as the de facto performance standard. For broader comparative benchmarks, refer to the community maintained projects below.
|
|
287
|
+
|
|
288
|
+
[Runtime Benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/) | [Schema Benchmarks](https://schemabenchmarks.dev/)
|
|
289
|
+
|
|
290
|
+
The following table shows compilation performance for various JSON Schema structures. These benchmarks measure the time required to JIT compile schematics, with faster compilation resulting in faster application startup.
|
|
293
291
|
|
|
294
292
|
```python
|
|
295
|
-
|
|
296
|
-
│ Compile │ TB1X
|
|
297
|
-
|
|
298
|
-
│ Boolean │
|
|
299
|
-
│ Number │
|
|
300
|
-
│ String │
|
|
301
|
-
│ Null │
|
|
302
|
-
│ Literal_String │
|
|
303
|
-
│ Literal_Number │
|
|
304
|
-
│ Literal_Boolean │
|
|
305
|
-
│ Pattern │
|
|
306
|
-
│ Object_Open │
|
|
307
|
-
│ Object_Close │
|
|
308
|
-
│ Object_Vector3 │
|
|
309
|
-
│ Object_Basis3 │
|
|
310
|
-
│ Intersect_And │
|
|
311
|
-
│ Intersect_Structural │
|
|
312
|
-
│ Union_Or │
|
|
313
|
-
│ Union_Structural │
|
|
314
|
-
│ Tuple_Values │
|
|
315
|
-
│ Tuple_Objects │
|
|
316
|
-
│ Array_Numbers_4 │
|
|
317
|
-
│ Array_Numbers_8 │
|
|
318
|
-
│ Array_Numbers_16 │
|
|
319
|
-
│ Array_Objects_Open │
|
|
320
|
-
│ Array_Objects_Close │
|
|
321
|
-
|
|
293
|
+
┌──────────────────────┬──────────────┬──────────────┐
|
|
294
|
+
│ Compile │ TB1X │ AJV8 │
|
|
295
|
+
├──────────────────────┼──────────────┼──────────────┤
|
|
296
|
+
│ Boolean │ 50.4K ops/s │ 7.1K ops/s │
|
|
297
|
+
│ Number │ 129.9K ops/s │ 7.9K ops/s │
|
|
298
|
+
│ String │ 128.9K ops/s │ 9.1K ops/s │
|
|
299
|
+
│ Null │ 91.3K ops/s │ 8.4K ops/s │
|
|
300
|
+
│ Literal_String │ 63.1K ops/s │ 7.4K ops/s │
|
|
301
|
+
│ Literal_Number │ 74.5K ops/s │ 7.6K ops/s │
|
|
302
|
+
│ Literal_Boolean │ 143.3K ops/s │ 7.7K ops/s │
|
|
303
|
+
│ Pattern │ 94.2K ops/s │ 6.4K ops/s │
|
|
304
|
+
│ Object_Open │ 19.4K ops/s │ 1.3K ops/s │
|
|
305
|
+
│ Object_Close │ 17.6K ops/s │ 991 ops/s │
|
|
306
|
+
│ Object_Vector3 │ 46.1K ops/s │ 3.3K ops/s │
|
|
307
|
+
│ Object_Basis3 │ 16K ops/s │ 848 ops/s │
|
|
308
|
+
│ Intersect_And │ 41.3K ops/s │ 4.2K ops/s │
|
|
309
|
+
│ Intersect_Structural │ 25.3K ops/s │ 1.5K ops/s │
|
|
310
|
+
│ Union_Or │ 58.6K ops/s │ 2.4K ops/s │
|
|
311
|
+
│ Union_Structural │ 31.5K ops/s │ 1.8K ops/s │
|
|
312
|
+
│ Tuple_Values │ 18.2K ops/s │ 1.9K ops/s │
|
|
313
|
+
│ Tuple_Objects │ 3.9K ops/s │ 437 ops/s │
|
|
314
|
+
│ Array_Numbers_4 │ 114.5K ops/s │ 4.2K ops/s │
|
|
315
|
+
│ Array_Numbers_8 │ 128.3K ops/s │ 3.9K ops/s │
|
|
316
|
+
│ Array_Numbers_16 │ 128.4K ops/s │ 4K ops/s │
|
|
317
|
+
│ Array_Objects_Open │ 22K ops/s │ 780 ops/s │
|
|
318
|
+
│ Array_Objects_Close │ 22K ops/s │ 1K ops/s │
|
|
319
|
+
└──────────────────────┴──────────────┴──────────────┘
|
|
322
320
|
```
|
|
323
321
|
|
|
324
|
-
|
|
325
|
-
The following tables shows validation performance for various JSON Schema structures using AJV8 as a basis for comparison.
|
|
322
|
+
The following tables shows validation performance for various JSON Schema structures. These benchmarks measure overall validation throughput for JIT compiled schematics.
|
|
326
323
|
|
|
327
324
|
```python
|
|
328
325
|
┌──────────────────────┬──────────────┬──────────────┐
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "line",
|
|
3
|
-
"doctorContract": {
|
|
3
|
+
"doctorContract": {
|
|
4
|
+
"stateMigrations": true
|
|
5
|
+
},
|
|
4
6
|
"name": "LINE",
|
|
5
7
|
"description": "OpenClaw LINE channel plugin for LINE Bot API chats.",
|
|
6
8
|
"icon": "https://cdn.simpleicons.org/line",
|
|
@@ -27,6 +29,14 @@
|
|
|
27
29
|
"configWrites": {
|
|
28
30
|
"type": "boolean"
|
|
29
31
|
},
|
|
32
|
+
"joinIntro": {
|
|
33
|
+
"type": "boolean"
|
|
34
|
+
},
|
|
35
|
+
"historyLimit": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 9007199254740991
|
|
39
|
+
},
|
|
30
40
|
"channelAccessToken": {
|
|
31
41
|
"type": "string"
|
|
32
42
|
},
|
|
@@ -175,6 +185,14 @@
|
|
|
175
185
|
"configWrites": {
|
|
176
186
|
"type": "boolean"
|
|
177
187
|
},
|
|
188
|
+
"joinIntro": {
|
|
189
|
+
"type": "boolean"
|
|
190
|
+
},
|
|
191
|
+
"historyLimit": {
|
|
192
|
+
"type": "integer",
|
|
193
|
+
"minimum": 0,
|
|
194
|
+
"maximum": 9007199254740991
|
|
195
|
+
},
|
|
178
196
|
"channelAccessToken": {
|
|
179
197
|
"type": "string"
|
|
180
198
|
},
|
|
@@ -328,7 +346,13 @@
|
|
|
328
346
|
"additionalProperties": false
|
|
329
347
|
},
|
|
330
348
|
"label": "LINE",
|
|
331
|
-
"description": "LINE Messaging API webhook bot."
|
|
349
|
+
"description": "LINE Messaging API webhook bot.",
|
|
350
|
+
"uiHints": {
|
|
351
|
+
"joinIntro": {
|
|
352
|
+
"label": "LINE Group Join Introduction",
|
|
353
|
+
"help": "Post one brief introduction when the bot joins an allowed LINE group or multi-person room (default: true). Account settings override the channel-wide setting."
|
|
354
|
+
}
|
|
355
|
+
}
|
|
332
356
|
}
|
|
333
357
|
}
|
|
334
358
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/line",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.1",
|
|
4
4
|
"description": "OpenClaw LINE channel plugin for LINE Bot API chats.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@line/bot-sdk": "11.2.0",
|
|
12
|
-
"typebox": "1.3.
|
|
12
|
+
"typebox": "1.3.16",
|
|
13
13
|
"zod": "4.4.3"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.8.1
|
|
16
|
+
"openclaw": ">=2026.8.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"id": "line",
|
|
30
30
|
"configuredState": {
|
|
31
31
|
"env": {
|
|
32
|
-
"
|
|
32
|
+
"allOf": [
|
|
33
33
|
"LINE_CHANNEL_ACCESS_TOKEN",
|
|
34
34
|
"LINE_CHANNEL_SECRET"
|
|
35
35
|
]
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
"minHostVersion": ">=2026.4.10"
|
|
113
113
|
},
|
|
114
114
|
"compat": {
|
|
115
|
-
"pluginApi": ">=2026.8.1
|
|
115
|
+
"pluginApi": ">=2026.8.1"
|
|
116
116
|
},
|
|
117
117
|
"build": {
|
|
118
|
-
"openclawVersion": "2026.8.1
|
|
118
|
+
"openclawVersion": "2026.8.1"
|
|
119
119
|
},
|
|
120
120
|
"release": {
|
|
121
121
|
"publishToClawHub": true,
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { DmPolicySchema, GroupPolicySchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
|
|
2
|
-
import { requireChannelOpenAllowFrom } from "openclaw/plugin-sdk/extension-shared";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region extensions/line/src/config-schema.ts
|
|
5
|
-
const ThreadBindingsSchema = z.object({
|
|
6
|
-
enabled: z.boolean().optional(),
|
|
7
|
-
idleHours: z.number().optional(),
|
|
8
|
-
maxAgeHours: z.number().optional(),
|
|
9
|
-
spawnSessions: z.boolean().optional(),
|
|
10
|
-
defaultSpawnContext: z.enum(["isolated", "fork"]).optional()
|
|
11
|
-
}).strict();
|
|
12
|
-
const LineCommonConfigSchemaBase = z.object({
|
|
13
|
-
enabled: z.boolean().optional(),
|
|
14
|
-
configWrites: z.boolean().optional(),
|
|
15
|
-
channelAccessToken: z.string().optional(),
|
|
16
|
-
channelSecret: z.string().optional(),
|
|
17
|
-
tokenFile: z.string().optional(),
|
|
18
|
-
secretFile: z.string().optional(),
|
|
19
|
-
name: z.string().optional(),
|
|
20
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
21
|
-
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
22
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
23
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
24
|
-
responsePrefix: z.string().optional(),
|
|
25
|
-
mediaMaxMb: z.number().optional(),
|
|
26
|
-
webhookPath: z.string().optional(),
|
|
27
|
-
threadBindings: ThreadBindingsSchema.optional()
|
|
28
|
-
});
|
|
29
|
-
const LineGroupConfigSchema = buildGroupEntrySchema().omit({
|
|
30
|
-
tools: true,
|
|
31
|
-
toolsBySender: true
|
|
32
|
-
});
|
|
33
|
-
const LineConfigSchema = buildMultiAccountChannelSchema(LineCommonConfigSchemaBase.extend({ groups: z.record(z.string(), LineGroupConfigSchema.optional()).optional() }).strict(), {
|
|
34
|
-
optionalAccount: true,
|
|
35
|
-
refine: (value, ctx) => {
|
|
36
|
-
requireChannelOpenAllowFrom({
|
|
37
|
-
channel: "line",
|
|
38
|
-
policy: value.dmPolicy,
|
|
39
|
-
allowFrom: value.allowFrom,
|
|
40
|
-
ctx,
|
|
41
|
-
requireOpenAllowFrom
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const LineChannelConfigSchema = buildChannelConfigSchema(LineConfigSchema);
|
|
46
|
-
//#endregion
|
|
47
|
-
export { LineConfigSchema as n, LineChannelConfigSchema as t };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { i as processLineMessage, o as buildTemplateMessageFromPayload } from "./markdown-to-line-rEaras_0.js";
|
|
2
|
-
import { a as createQuickReplyItems, f as pushLocationMessage, g as pushTextMessageWithQuickReplies, h as pushTemplateMessage, i as createLocationMessage, m as pushMessagesLine, n as createFlexMessage, p as pushMessageLine, u as pushFlexMessage, v as sendMessageLine } from "./send-BJCeiiOB.js";
|
|
3
|
-
export { buildTemplateMessageFromPayload, createFlexMessage, createLocationMessage, createQuickReplyItems, processLineMessage, pushFlexMessage, pushLocationMessage, pushMessageLine, pushMessagesLine, pushTemplateMessage, pushTextMessageWithQuickReplies, sendMessageLine };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
import { resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
|
3
|
-
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
5
|
-
//#region extensions/line/src/group-keys.ts
|
|
6
|
-
function resolveLineGroupLookupIds(groupId) {
|
|
7
|
-
const normalized = groupId?.trim();
|
|
8
|
-
if (!normalized) return [];
|
|
9
|
-
if (normalized.startsWith("group:") || normalized.startsWith("room:")) {
|
|
10
|
-
const rawId = normalized.split(":").slice(1).join(":");
|
|
11
|
-
return rawId ? [rawId, normalized] : [normalized];
|
|
12
|
-
}
|
|
13
|
-
return [
|
|
14
|
-
normalized,
|
|
15
|
-
`group:${normalized}`,
|
|
16
|
-
`room:${normalized}`
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
function resolveLineGroupConfigEntry(groups, params) {
|
|
20
|
-
if (!groups) return;
|
|
21
|
-
for (const candidate of resolveLineGroupLookupIds(params.groupId)) {
|
|
22
|
-
const hit = groups[candidate];
|
|
23
|
-
if (hit) return hit;
|
|
24
|
-
}
|
|
25
|
-
for (const candidate of resolveLineGroupLookupIds(params.roomId)) {
|
|
26
|
-
const hit = groups[candidate];
|
|
27
|
-
if (hit) return hit;
|
|
28
|
-
}
|
|
29
|
-
return groups["*"];
|
|
30
|
-
}
|
|
31
|
-
function resolveLineGroupsConfig(cfg, accountId) {
|
|
32
|
-
const lineConfig = cfg.channels?.line;
|
|
33
|
-
if (!lineConfig) return;
|
|
34
|
-
const normalizedAccountId = normalizeAccountId(accountId);
|
|
35
|
-
return resolveAccountEntry(lineConfig.accounts, normalizedAccountId)?.groups ?? lineConfig.groups;
|
|
36
|
-
}
|
|
37
|
-
function resolveExactLineGroupConfigKey(params) {
|
|
38
|
-
const { groups } = params;
|
|
39
|
-
if (!groups) return;
|
|
40
|
-
return resolveLineGroupLookupIds(params.groupId).find((candidate) => Object.hasOwn(groups, candidate));
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region extensions/line/src/runtime.ts
|
|
44
|
-
const { setRuntime: setLineRuntime, getRuntime: getLineRuntime } = createPluginRuntimeStore({
|
|
45
|
-
pluginId: "line",
|
|
46
|
-
errorMessage: "LINE runtime not initialized - plugin not registered"
|
|
47
|
-
});
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region extensions/line/src/quick-reply-fallback.ts
|
|
50
|
-
function buildLineQuickReplyFallbackText(labels) {
|
|
51
|
-
const normalized = normalizeStringEntries(labels ?? []).slice(0, 13);
|
|
52
|
-
if (normalized.length === 0) return "Choose an option.";
|
|
53
|
-
return `Options:\n${normalized.map((label) => `- ${label}`).join("\n")}`;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
export { resolveLineGroupConfigEntry as a, resolveExactLineGroupConfigKey as i, getLineRuntime as n, resolveLineGroupLookupIds as o, setLineRuntime as r, resolveLineGroupsConfig as s, buildLineQuickReplyFallbackText as t };
|