abelien-harness 0.8.0 → 0.10.0

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.
Files changed (46) hide show
  1. package/.env.example +19 -20
  2. package/README.md +12 -12
  3. package/package.json +1 -1
  4. package/skills/abelien-algorithm/SKILL.md +14 -6
  5. package/skills/abelien-algorithm/domain.json +59 -5
  6. package/skills/abelien-algorithm/references/research-policy.md +11 -3
  7. package/skills/abelien-algorithm/references/selection-service-contract.md +50 -0
  8. package/skills/abelien-algorithm/schemas/algorithm-bindings.v1.json +414 -0
  9. package/skills/abelien-algorithm/schemas/algorithm-candidates.v1.json +192 -0
  10. package/skills/abelien-algorithm/scripts/candidates.mjs +119 -0
  11. package/skills/abelien-algorithm/scripts/evidence.mjs +69 -0
  12. package/skills/abelien-algorithm/scripts/finalize-selection.mjs +64 -7
  13. package/skills/abelien-algorithm/scripts/lane-state.mjs +27 -0
  14. package/skills/abelien-algorithm/scripts/research.mjs +203 -0
  15. package/skills/abelien-hardware/SKILL.md +4 -4
  16. package/skills/abelien-hardware/domain.json +4 -4
  17. package/skills/abelien-hardware/references/knowledge-recall-service-contract.md +4 -4
  18. package/skills/abelien-hardware/references/search-index-format.md +5 -5
  19. package/skills/abelien-hardware/references/search-index-release.md +7 -7
  20. package/skills/abelien-hardware/references/selection-service-contract.md +3 -3
  21. package/skills/abelien-hardware/scripts/build-search-index.mjs +1 -1
  22. package/skills/abelien-hardware/scripts/oss-object-store.mjs +247 -0
  23. package/skills/abelien-hardware/scripts/{tos-wiki-search.mjs → oss-wiki-search.mjs} +19 -19
  24. package/skills/abelien-hardware/scripts/search-index-release.mjs +25 -25
  25. package/skills/abelien-hardware-selection/SKILL.md +2 -2
  26. package/skills/abelien-hardware-selection/domain.json +2 -2
  27. package/skills/abelien-hardware-selection/scripts/load-guide.mjs +1 -1
  28. package/skills/abelien-harness/references/adapter-contract.md +1 -1
  29. package/skills/abelien-harness/references/m1-integration.md +2 -2
  30. package/skills/abelien-harness/scripts/ab.mjs +45 -3
  31. package/skills/abelien-harness/scripts/studio.mjs +15 -14
  32. package/skills/abelien-reference/domain.json +1 -1
  33. package/skills/abelien-reference/references/research-contract.md +1 -0
  34. package/skills/abelien-reference/schemas/reference-evidence.v1.json +1 -1
  35. package/skills/abelien-reference/scripts/finalize.mjs +3 -1
  36. package/skills/abelien-workspace/SKILL.md +1 -1
  37. package/skills/abelien-workspace/assets/journey-stage-plan.json +46 -13
  38. package/skills/abelien-workspace/assets/lane-plan.json +36 -0
  39. package/skills/abelien-workspace/domain.json +24 -2
  40. package/skills/abelien-workspace/references/hardware-journey-orchestration.md +2 -2
  41. package/skills/abelien-workspace/references/harness-binding.md +3 -3
  42. package/skills/abelien-workspace/references/user-journey.md +5 -5
  43. package/skills/abelien-workspace/scripts/journey-next.mjs +10 -2
  44. package/skills/abelien-workspace/scripts/lanes-next.mjs +38 -0
  45. package/skills/abelien-workspace/workflows/user-journey.json +1 -1
  46. package/skills/abelien-hardware/scripts/tos-object-store.mjs +0 -202
@@ -0,0 +1,414 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://git.abelien.cn/abelien/abelienharness/skills/abelien-algorithm/schemas/algorithm-bindings.v1.json",
4
+ "title": "abelien.algorithm-bindings.v1",
5
+ "description": "algorithm.finalize(operation=bind)的 research 部分。宿主可以把本文件原样用作工具参数定义,proposed_id 与硬件选型 id/revision 由宿主填入;字段与 scripts/finalize-selection.mjs 的 BIND_FIELDS 一致,由测试保证。来源只写 research_id 与 page_id,url、访问时间、哈希与 evidence_ref 由 Harness 从存下的正文填写。任何一项不是 pass、证据不足或来源不是一手资料,结果都保持 needs_confirmation。",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "bindings",
10
+ "sources"
11
+ ],
12
+ "properties": {
13
+ "bindings": {
14
+ "type": "array",
15
+ "description": "每个 reaction 恰好一条。",
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": [
20
+ "reaction_id",
21
+ "implementation_ref",
22
+ "implementation_version",
23
+ "implementation_type",
24
+ "execution_target",
25
+ "hardware_component_ids",
26
+ "source_ids",
27
+ "compatibility",
28
+ "constraint_checks"
29
+ ],
30
+ "properties": {
31
+ "reaction_id": {
32
+ "type": "string"
33
+ },
34
+ "implementation_ref": {
35
+ "type": "string",
36
+ "maxLength": 80,
37
+ "description": "该 reaction 已提议候选之一的 implementation_ref,原样照抄。"
38
+ },
39
+ "implementation_version": {
40
+ "type": "string",
41
+ "maxLength": 60,
42
+ "description": "确定版本;候选没写版本时取厂商或实现资料写明的版本,查不到就照实填 unknown(结果会保持待确认)。"
43
+ },
44
+ "implementation_type": {
45
+ "enum": [
46
+ "firmware",
47
+ "library",
48
+ "model",
49
+ "cloud_service"
50
+ ]
51
+ },
52
+ "execution_target": {
53
+ "enum": [
54
+ "edge",
55
+ "cloud",
56
+ "hybrid"
57
+ ]
58
+ },
59
+ "hardware_component_ids": {
60
+ "type": "array",
61
+ "minItems": 1,
62
+ "items": {
63
+ "type": "string"
64
+ },
65
+ "description": "已登记硬件选型里的 component_id。"
66
+ },
67
+ "source_ids": {
68
+ "type": "array",
69
+ "minItems": 1,
70
+ "items": {
71
+ "type": "string"
72
+ },
73
+ "description": "sources[].id:至少一条覆盖所列型号的 hardware_vendor 来源,和一条 implementation_ref 与版本都相同的实现来源。"
74
+ },
75
+ "compatibility": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "io",
80
+ "runtime",
81
+ "dependencies",
82
+ "network",
83
+ "license",
84
+ "resources"
85
+ ],
86
+ "properties": {
87
+ "io": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": [
91
+ "status",
92
+ "summary",
93
+ "source_ids"
94
+ ],
95
+ "properties": {
96
+ "status": {
97
+ "enum": [
98
+ "pass",
99
+ "conflict",
100
+ "unknown"
101
+ ],
102
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
103
+ },
104
+ "summary": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "maxLength": 500
108
+ },
109
+ "source_ids": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string"
113
+ },
114
+ "description": "支撑这条判断的 sources[].id。"
115
+ }
116
+ }
117
+ },
118
+ "runtime": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": [
122
+ "status",
123
+ "summary",
124
+ "source_ids"
125
+ ],
126
+ "properties": {
127
+ "status": {
128
+ "enum": [
129
+ "pass",
130
+ "conflict",
131
+ "unknown"
132
+ ],
133
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
134
+ },
135
+ "summary": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 500
139
+ },
140
+ "source_ids": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ },
145
+ "description": "支撑这条判断的 sources[].id。"
146
+ }
147
+ }
148
+ },
149
+ "dependencies": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": [
153
+ "status",
154
+ "summary",
155
+ "source_ids"
156
+ ],
157
+ "properties": {
158
+ "status": {
159
+ "enum": [
160
+ "pass",
161
+ "conflict",
162
+ "unknown"
163
+ ],
164
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
165
+ },
166
+ "summary": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 500
170
+ },
171
+ "source_ids": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "string"
175
+ },
176
+ "description": "支撑这条判断的 sources[].id。"
177
+ }
178
+ }
179
+ },
180
+ "network": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "status",
185
+ "summary",
186
+ "source_ids"
187
+ ],
188
+ "properties": {
189
+ "status": {
190
+ "enum": [
191
+ "pass",
192
+ "conflict",
193
+ "unknown"
194
+ ],
195
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
196
+ },
197
+ "summary": {
198
+ "type": "string",
199
+ "minLength": 1,
200
+ "maxLength": 500
201
+ },
202
+ "source_ids": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string"
206
+ },
207
+ "description": "支撑这条判断的 sources[].id。"
208
+ }
209
+ }
210
+ },
211
+ "license": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": [
215
+ "status",
216
+ "summary",
217
+ "source_ids"
218
+ ],
219
+ "properties": {
220
+ "status": {
221
+ "enum": [
222
+ "pass",
223
+ "conflict",
224
+ "unknown"
225
+ ],
226
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
227
+ },
228
+ "summary": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "maxLength": 500
232
+ },
233
+ "source_ids": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "string"
237
+ },
238
+ "description": "支撑这条判断的 sources[].id。"
239
+ }
240
+ }
241
+ },
242
+ "resources": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": [
246
+ "status",
247
+ "summary",
248
+ "source_ids"
249
+ ],
250
+ "properties": {
251
+ "status": {
252
+ "enum": [
253
+ "pass",
254
+ "conflict",
255
+ "unknown"
256
+ ],
257
+ "description": "来源能证明成立才写 pass;证据不够写 unknown,冲突写 conflict。"
258
+ },
259
+ "summary": {
260
+ "type": "string",
261
+ "minLength": 1,
262
+ "maxLength": 500
263
+ },
264
+ "source_ids": {
265
+ "type": "array",
266
+ "items": {
267
+ "type": "string"
268
+ },
269
+ "description": "支撑这条判断的 sources[].id。"
270
+ }
271
+ }
272
+ }
273
+ }
274
+ },
275
+ "constraint_checks": {
276
+ "type": "array",
277
+ "description": "需求里每条非 preference 的 limits 各一条。",
278
+ "items": {
279
+ "type": "object",
280
+ "additionalProperties": false,
281
+ "required": [
282
+ "constraint_id",
283
+ "status",
284
+ "summary",
285
+ "source_ids"
286
+ ],
287
+ "properties": {
288
+ "constraint_id": {
289
+ "type": "string",
290
+ "description": "limits[].id。"
291
+ },
292
+ "status": {
293
+ "enum": [
294
+ "pass",
295
+ "conflict",
296
+ "unknown"
297
+ ]
298
+ },
299
+ "summary": {
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "maxLength": 500
303
+ },
304
+ "source_ids": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "string"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "sources": {
317
+ "type": "array",
318
+ "maxItems": 64,
319
+ "items": {
320
+ "type": "object",
321
+ "additionalProperties": false,
322
+ "required": [
323
+ "id",
324
+ "research_id",
325
+ "page_id",
326
+ "source_type",
327
+ "title",
328
+ "publisher",
329
+ "version",
330
+ "excerpt"
331
+ ],
332
+ "properties": {
333
+ "id": {
334
+ "type": "string",
335
+ "description": "本次提交内唯一。"
336
+ },
337
+ "research_id": {
338
+ "type": "string",
339
+ "description": "页面所在的 algorithm-research 资源 id(实现研究或本步厂商检索)。"
340
+ },
341
+ "page_id": {
342
+ "type": "string",
343
+ "description": "该研究里 text_source=page 的页面 id;检索摘要页不算证据。"
344
+ },
345
+ "source_type": {
346
+ "enum": [
347
+ "hardware_vendor",
348
+ "implementation_official",
349
+ "huggingface",
350
+ "cloud_vendor"
351
+ ],
352
+ "description": "按发布方选:所选型号的厂商资料 hardware_vendor;库、固件或模型的官方资料 implementation_official;Hugging Face 模型卡 huggingface;云服务官方文档 cloud_vendor。分销商、博客、论坛不是一手来源,不要列为来源。"
353
+ },
354
+ "title": {
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "maxLength": 300
358
+ },
359
+ "publisher": {
360
+ "type": "string",
361
+ "minLength": 1,
362
+ "maxLength": 200
363
+ },
364
+ "version": {
365
+ "type": "string",
366
+ "maxLength": 60,
367
+ "description": "页面写明的文档版本、修订号或对应的实现版本;没写就填 unknown(结果会保持待确认)。"
368
+ },
369
+ "excerpt": {
370
+ "type": "string",
371
+ "minLength": 1,
372
+ "maxLength": 1200,
373
+ "description": "逐字取自该页正文的一段,支撑本来源被引用的结论。"
374
+ },
375
+ "hardware_component_ids": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "string"
379
+ },
380
+ "description": "hardware_vendor 来源覆盖的 component_id。"
381
+ },
382
+ "implementation_ref": {
383
+ "type": "string",
384
+ "maxLength": 80,
385
+ "description": "实现来源对应的 implementation_ref,与绑定一致。"
386
+ }
387
+ }
388
+ }
389
+ },
390
+ "unknowns": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "string",
394
+ "maxLength": 1000
395
+ }
396
+ },
397
+ "blocking_unknowns": {
398
+ "type": "array",
399
+ "items": {
400
+ "type": "string",
401
+ "maxLength": 1000
402
+ },
403
+ "description": "影响能否按此绑定实现的未知,写明怎么核实。"
404
+ },
405
+ "unavailable_sources": {
406
+ "type": "array",
407
+ "items": {
408
+ "type": "string",
409
+ "maxLength": 500
410
+ },
411
+ "description": "想读但读不到的资料及原因。"
412
+ }
413
+ }
414
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://git.abelien.cn/abelien/abelienharness/skills/abelien-algorithm/schemas/algorithm-candidates.v1.json",
4
+ "title": "abelien.algorithm-candidates.v1",
5
+ "description": "algorithm.candidates 的输入去掉 research_id(由宿主按本步检索结果填入)。宿主可以把本文件原样用作工具参数定义;字段与 scripts/candidates.mjs 的 CANDIDATE_FIELDS/NEEDS_FIELDS 一致,由测试保证。每个 reaction 要么至少一个候选,要么写进 unresolved。",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "candidates"
10
+ ],
11
+ "properties": {
12
+ "candidates": {
13
+ "type": "array",
14
+ "maxItems": 40,
15
+ "description": "每个 reaction 1–3 个候选;违反硬约束的不提交。",
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": [
20
+ "reaction_id",
21
+ "implementation_ref",
22
+ "implementation_type",
23
+ "execution_target",
24
+ "summary"
25
+ ],
26
+ "properties": {
27
+ "reaction_id": {
28
+ "type": "string",
29
+ "description": "需求里的 reaction id。"
30
+ },
31
+ "implementation_ref": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 80,
35
+ "description": "实现的简短名称(如 FastLED、Open-Meteo Forecast API、microWakeWord),不带网址、括号说明或用途;说明写进 summary。绑定时原样引用。"
36
+ },
37
+ "implementation_version": {
38
+ "type": [
39
+ "string",
40
+ "null"
41
+ ],
42
+ "maxLength": 60,
43
+ "description": "来源写明的确定版本(如 3.9.0、v2.1.0、One Call 3.0 的 3.0);来源没写就填 null,不填 latest、main。"
44
+ },
45
+ "implementation_type": {
46
+ "enum": [
47
+ "firmware",
48
+ "library",
49
+ "model",
50
+ "cloud_service"
51
+ ]
52
+ },
53
+ "execution_target": {
54
+ "enum": [
55
+ "edge",
56
+ "cloud",
57
+ "hybrid"
58
+ ]
59
+ },
60
+ "library_entry_id": {
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ],
65
+ "description": "库内已适配算法的 entry_id;库外候选省略或填 null。"
66
+ },
67
+ "summary": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 500,
71
+ "description": "怎么用它实现这个 reaction。"
72
+ },
73
+ "needs": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "description": "对硬件的需求,按来源原文记录;原文没写的填 null 或留空列表,不猜。",
77
+ "properties": {
78
+ "compute": {
79
+ "type": [
80
+ "string",
81
+ "null"
82
+ ],
83
+ "maxLength": 500
84
+ },
85
+ "memory": {
86
+ "type": [
87
+ "string",
88
+ "null"
89
+ ],
90
+ "maxLength": 500
91
+ },
92
+ "storage": {
93
+ "type": [
94
+ "string",
95
+ "null"
96
+ ],
97
+ "maxLength": 500
98
+ },
99
+ "runtime": {
100
+ "type": [
101
+ "string",
102
+ "null"
103
+ ],
104
+ "maxLength": 500
105
+ },
106
+ "network": {
107
+ "type": [
108
+ "string",
109
+ "null"
110
+ ],
111
+ "maxLength": 500
112
+ },
113
+ "interfaces": {
114
+ "type": "array",
115
+ "maxItems": 20,
116
+ "items": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 120
120
+ },
121
+ "description": "每项一个接口的短名,如 I2C、GPIO、I2S microphone。"
122
+ },
123
+ "sensors": {
124
+ "type": "array",
125
+ "maxItems": 20,
126
+ "items": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 120
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "quotes": {
135
+ "type": "array",
136
+ "maxItems": 6,
137
+ "description": "逐字取自本次研究读到的正文(可以是为别的 reaction 读到的页面,同一份资料常常支撑几个 reaction);库外候选至少一条。",
138
+ "items": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": [
142
+ "page_id",
143
+ "text"
144
+ ],
145
+ "properties": {
146
+ "page_id": {
147
+ "type": "string",
148
+ "description": "本次研究的页面 id,如 p3。"
149
+ },
150
+ "text": {
151
+ "type": "string",
152
+ "minLength": 8,
153
+ "maxLength": 400
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "unresolved": {
162
+ "type": "array",
163
+ "description": "确实找不到候选的 reaction,每个只写一次。",
164
+ "items": {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "reaction_id",
169
+ "reason"
170
+ ],
171
+ "properties": {
172
+ "reaction_id": {
173
+ "type": "string"
174
+ },
175
+ "reason": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 500
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "unknowns": {
184
+ "type": "array",
185
+ "items": {
186
+ "type": "string",
187
+ "minLength": 1,
188
+ "maxLength": 500
189
+ }
190
+ }
191
+ }
192
+ }