abelien-harness 0.3.0 → 0.4.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.
- package/README.md +9 -3
- package/package.json +1 -1
- package/skills/abelien-3dgen/SKILL.md +4 -2
- package/skills/abelien-3dgen/providers/tripo.json +64 -1
- package/skills/abelien-3dgen/references/engineering-lowpoly-qualification.md +20 -0
- package/skills/abelien-3dgen/references/host-api.md +128 -0
- package/skills/abelien-3dgen/references/provider-profile.md +4 -0
- package/skills/abelien-appearance/SKILL.md +2 -0
- package/skills/abelien-appearance/references/local-component-edit.md +31 -0
- package/skills/abelien-clarify/SKILL.md +8 -3
- package/skills/abelien-clarify/references/examples.md +9 -0
- package/skills/abelien-clarify/scripts/check_result.py +53 -1
- package/skills/abelien-clarify/scripts/test_check_result.py +40 -0
- package/skills/abelien-guide/SKILL.md +2 -0
- package/skills/abelien-guide/references/shared-response-rules.md +2 -2
- package/skills/abelien-hardware/SKILL.md +5 -0
- package/skills/abelien-hardware/domain.json +2 -2
- package/skills/abelien-hardware/references/search-index-format.md +31 -2
- package/skills/abelien-hardware/references/search-index-release.md +9 -0
- package/skills/abelien-hardware/references/selection-service-contract.md +3 -0
- package/skills/abelien-hardware/scripts/build-search-index.mjs +50 -6
- package/skills/abelien-hardware/scripts/dimensions.mjs +184 -0
- package/skills/abelien-hardware/scripts/finalize-selection.mjs +11 -0
- package/skills/abelien-hardware/scripts/publish-search-index.mjs +2 -1
- package/skills/abelien-hardware/scripts/search-index-release.mjs +15 -2
- package/skills/abelien-hardware/scripts/tos-wiki-search.mjs +38 -20
- package/skills/abelien-hardware-selection/domain.json +2 -2
- package/skills/abelien-hardware-selection/references/selection-service-contract.md +12 -1
- package/skills/abelien-hardware-selection/scripts/select.mjs +9 -0
- package/skills/abelien-harness/references/workflow-spec.md +15 -2
- package/skills/abelien-harness/scripts/generate3d-host.mjs +398 -0
- package/skills/abelien-harness/scripts/generate3d.mjs +54 -15
- package/skills/abelien-harness/scripts/receipt.mjs +8 -2
- package/skills/abelien-harness/scripts/studio.mjs +18 -10
- package/skills/abelien-structure/SKILL.md +3 -1
- package/skills/abelien-structure/references/build123d-execution.md +1 -1
- package/skills/abelien-structure/scripts/run_stage.py +8 -1
- package/skills/abelien-workspace/SKILL.md +2 -0
- package/skills/abelien-workspace/domain.json +1 -1
- package/skills/abelien-workspace/workflows/definitions/a6e8254e1839d94530ae243cba779e423953b7169cbce338f0503d748d44800b.json +175 -0
- package/skills/abelien-workspace/workflows/definitions/b37f3b47e1e8bd1208859de57456152b149416e21949297b22bba937c51a5670.json +149 -0
- package/skills/abelien-workspace/workflows/definitions/b780bf280d61596b43eb6dbc6a417cf8df1ec9a7ae79a6de10f048da9ed58729.json +229 -0
- package/skills/abelien-workspace/workflows/user-journey-hardware-algorithm.json +1 -1
- package/skills/abelien-workspace/workflows/user-journey-hardware-candidates.json +1 -1
- package/skills/abelien-workspace/workflows/user-journey-hardware.json +1 -1
|
@@ -52,7 +52,7 @@ python3 <本skill>/scripts/run_stage.py --project <工程目录> --plan <任务J
|
|
|
52
52
|
|
|
53
53
|
同 task_id 的 lock 防止并发覆盖;相互影响的不同 task_id 仍需宿主串行安排或使用独立候选目录。超时或可捕获的终止信号会终止子进程组并记录失败;强制杀死宿主/断电可能留下 running 与 lock。恢复时先核对 PID 和相关进程,只有证明原任务不再运行才清理该任务自己的锁;不要删除工程或重写产品状态。脚本不自动接管旧进程。
|
|
54
54
|
|
|
55
|
-
POSIX 清理保持 TERM → wait(2s) → KILL → wait,不提高任务预算。Darwin 对只剩 zombie 的进程组可能返回 PermissionError;只有原 leader 的 poll 已证明退出,且固定 `/bin/ps` 的有界完整 pid/pgid/uid/stat 全表成功、非空、逐行合法时,才接受原 PGID 无成员或全为同有效 UID 的 Z
|
|
55
|
+
POSIX 清理保持 TERM → wait(2s) → KILL → wait,不提高任务预算。Darwin 对只剩 zombie 的进程组可能返回 PermissionError;只有原 leader 的 poll 已证明退出,且固定 `/bin/ps` 的有界完整 pid/pgid/uid/stat 全表成功、非空、逐行合法时,才接受原 PGID 无成员或全为同有效 UID 的 Z 状态。`?` 运行态(个别进程状态未定,man page 未列、负载下实测存在)是合法行,不使整表判废;但原 PGID 自身成员为 `?` 时它不是 Z,仍保留原错误。活成员、不同 UID、无法读取/非法/不完整输出、探针失败、原 leader 仍活着或非 Darwin 的 PermissionError 都保留原错误;ProcessLookupError 的已有处理不变。探针不接受调用者路径或 shell。
|
|
56
56
|
|
|
57
57
|
不要覆盖已确认候选,使用新的候选目录并保留旧资产。失败任务的输出可能不完整,不得因文件存在就采用。日志为本地工程诊断,不直接展示给终端用户;任务命令和日志不得输出凭据。
|
|
58
58
|
|
|
@@ -109,10 +109,17 @@ def _signal_group(process: subprocess.Popen, signum: int) -> None:
|
|
|
109
109
|
env={"LC_ALL": "C"}, timeout=2)
|
|
110
110
|
if probe.returncode == 0 and not probe.stderr and probe.stdout.endswith("\n"):
|
|
111
111
|
rows = [line.split() for line in probe.stdout.splitlines()]
|
|
112
|
+
# Darwin reports the run state as "?" when it cannot determine it
|
|
113
|
+
# (undocumented in the man page; observed under load as "?", "?N",
|
|
114
|
+
# "?E", "?NE"...). Such a row is structurally complete and must not
|
|
115
|
+
# invalidate the table: otherwise one unrelated process turns a
|
|
116
|
+
# benign exited-group cleanup into an error. An unknown-state row
|
|
117
|
+
# of the original group is still not a zombie, so the member check
|
|
118
|
+
# below keeps rejecting that case.
|
|
112
119
|
valid = bool(rows) and all(
|
|
113
120
|
len(row) == 4 and re.fullmatch(r"[1-9][0-9]*", row[0])
|
|
114
121
|
and all(re.fullmatch(r"-?[0-9]+", value) for value in row[1:3])
|
|
115
|
-
and re.fullmatch(r"[IRSTUZ][+<>AELNSsVWX]*", row[3])
|
|
122
|
+
and re.fullmatch(r"[IRSTUZ?][+<>AELNSsVWX]*", row[3])
|
|
116
123
|
for row in rows)
|
|
117
124
|
if valid and len({row[0] for row in rows}) == len(rows):
|
|
118
125
|
members = [row for row in rows if int(row[1]) == process.pid]
|
|
@@ -22,6 +22,8 @@ compatibility:
|
|
|
22
22
|
|
|
23
23
|
已读规则在同一会话中沿用;重新取得的是作品事实与事件。不要通过反复加载 guide/workspace 启动递归调度。
|
|
24
24
|
|
|
25
|
+
局部自由造型外观件使用[现有候选与采用交接](../abelien-appearance/references/local-component-edit.md):ready 候选与 adopted current 保持原谱系,网格预览不得借 CAD 接口完成确认/导出。冻结 target occurrence 和 baseline,提交前与采用前均核对同版;unknown fit 保持预览状态。
|
|
26
|
+
|
|
25
27
|
## 产品入口
|
|
26
28
|
|
|
27
29
|
[user-journey.json](workflows/user-journey.json) 中的 `journey` 对应本包完整旅程,供 Agent 阅读。其单个 `drive-product-journey` 步骤由使用 guide 的宿主 Agent 跨轮驱动。
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "user-journey-hardware",
|
|
3
|
+
"domain": "abelien-workspace",
|
|
4
|
+
"executionProtocol": "pinned-result-v1",
|
|
5
|
+
"description": "Library recall, suitability review, fixed Prismer-first/Volc evidence for unresolved slots, source-bound merge, then the same formal hardware.select and gate",
|
|
6
|
+
"input": {
|
|
7
|
+
"required": [
|
|
8
|
+
"requirements"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"steps": [
|
|
12
|
+
{
|
|
13
|
+
"id": "record-requirements",
|
|
14
|
+
"executor": "cli",
|
|
15
|
+
"action": "resource.put",
|
|
16
|
+
"args": {
|
|
17
|
+
"kind": "draft",
|
|
18
|
+
"id": "hardware-d-{{hash}}",
|
|
19
|
+
"body": {
|
|
20
|
+
"requirements": "{{input.requirements}}"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "classify-hardware",
|
|
26
|
+
"executor": "agent",
|
|
27
|
+
"instruction": "需求已澄清;requirements 是 clarify 的 Requirements:context 为落点与场景,reaction[] 为全部触发→反应,limits[] 每项带 strength。按全部 reaction 推导功能槽位与数量,strength=hard 的 limits 进 hard_constraints,preference 只作排序提示;缺 reaction 或只有品类标签时停止并说明。读取同级 abelien-hardware-selection/SKILL.md,并用其 scripts/load-guide.mjs 依次按需加载 entry、命中的 level1、命中的 level2、contract;仅提交功能槽位、数量、受控三级路径和需求硬约束,不提交型号或猜测数据库事实。回复 {\"slots\":[...]};若需求不足或路径不确定,停止并说明,不能伪造槽位。",
|
|
28
|
+
"replySchema": {
|
|
29
|
+
"slots": "array"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "search-hardware-wikis",
|
|
34
|
+
"executor": "cli",
|
|
35
|
+
"action": "capability.run",
|
|
36
|
+
"args": {
|
|
37
|
+
"capability": "hardware.search",
|
|
38
|
+
"input": {
|
|
39
|
+
"operation": "search",
|
|
40
|
+
"query": "{{input.requirements}}",
|
|
41
|
+
"requirements": "{{input.requirements}}",
|
|
42
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
43
|
+
"policy": {
|
|
44
|
+
"prefer_system_candidates": true,
|
|
45
|
+
"top_k_per_slot": 8,
|
|
46
|
+
"include_content": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "hardware-knowledge-recalled",
|
|
53
|
+
"executor": "cli",
|
|
54
|
+
"action": "machine.send",
|
|
55
|
+
"args": {
|
|
56
|
+
"machine": "hardware-recall",
|
|
57
|
+
"event": "confirmRecall",
|
|
58
|
+
"instance": "{{steps.search-hardware-wikis.resource.id}}"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "review-hardware-candidates",
|
|
63
|
+
"executor": "agent",
|
|
64
|
+
"instruction": "Read the complete library candidates and original requirements/slots. Review suitability against function and every hard constraint. Reply {\"unresolved_slots\":[{\"slot_id\":\"original slot\",\"reason\":\"no candidates or specific reasons all candidates are unsuitable\",\"query\":\"official model search targeting function/category/key hard constraints\",\"count\":10}]}. Every zero-candidate slot requires supplemental search. All unsuitable candidates also require search. Preserve rechargeable built-in battery, wireless charging, and all other original requirements; do not ask the user to drop a requirement because the catalog is empty. unresolved_slots contains only slots that need search. Omit suitable library slots entirely; never add placeholder rows with an empty query or count=0. Return [] when all slots are suitable. Before committing this review, the trusted host validates the full original requirements, slots and recall with validate-web-search-plan.mjs; a VALIDATION reply preserves this pause so the same run can be corrected. Count is optional and a positive integer; Prismer search.topK and return.topK are explicit. Do not apply undocumented Prismer query/result limits or truncate requirements. The trusted fixed Prismer-first policy permits Volc only after a saved definitive denial, successful empty query or unsent missing Key; Volc alone checks its official 1-100 character Query and Count 1-50 at dispatch. Unknown dispatched effects never authorize fallback or a new invocation. Do not supply URLs, credentials, commands or providers. System reuse is optional: poor matches must not force complex whole systems. Concept visuals and the original requirements come first.",
|
|
65
|
+
"replySchema": {
|
|
66
|
+
"unresolved_slots": "array"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "search-hardware-web",
|
|
71
|
+
"executor": "cli",
|
|
72
|
+
"action": "capability.run",
|
|
73
|
+
"args": {
|
|
74
|
+
"capability": "hardware.web-search",
|
|
75
|
+
"input": {
|
|
76
|
+
"requirements": "{{input.requirements}}",
|
|
77
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
78
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
79
|
+
"unresolved_slots": "{{steps.review-hardware-candidates.result.unresolved_slots}}"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "extract-web-hardware",
|
|
85
|
+
"executor": "agent",
|
|
86
|
+
"instruction": "When pages contain blob_ref, use resource get <evidenceResourceId> --page <pageId> to read each required full original page; never copy page bodies into replies. Read the persisted hardware-web-evidence pages from search-hardware-web in full. Search Content/snippets/provider official labels are not complete official pages or proof of authority. Extract only manufacturer pages; uncertain source authority remains unknown and third-party mirrors are not official merely because their URL contains a manufacturer domain. Reply {\"candidates\":[{\"slot_id\":\"original slot\",\"page_id\":\"persisted page ID\",\"manufacturer\":\"exact manufacturer\",\"manufacturer_quote\":\"at least 8 source characters\",\"model\":\"exact model\",\"model_quote\":\"at least 8 source characters\",\"parts\":[{\"name\":\"physical part name\",\"name_quote\":\"exact source quote\",\"shape\":\"box|cylinder|sphere|unknown\",\"shape_quote\":\"exact source quote\",\"dimensions_mm\":{\"length\":20,\"width\":12,\"height\":3},\"dimension_quotes\":{\"length\":\"exact quote identifying this part, axis, numeric value and unit\",\"width\":\"exact quote\",\"height\":\"exact quote\"}}]}]}. Quotes must include the exact part/name/shape they support. Each physical part has separate dimensions; cylinders use diameter/height, spheres use diameter. Unknown dimensions are omitted, never invented or defaulted. Conflicting versions and unknown multi-part overall dimensions remain unknown; do not combine contradictory versions. Do not submit page bodies, official/verified/CAD_available/source/geometry claims. Missing reliable pages or no network means candidates empty. This is envelope_only, not true component CAD or engineering verification. For an attributed tuple such as Back Panel: 48mm x 32mm x 0.5mm, add dimensions_quote with the entire exact source string and dimension_axes:[\"length\",\"width\",\"height\"] in original order; dimensions_mm must map each original value/unit to that explicitly declared axis. Preserve alternate imperial tuples in the quote; never use their values as mm or borrow another part's measurements. A 2-value tuple leaves height unknown. A box inferred from dimensions is only an envelope expression: actual part shape and orientation remain unknown. dimension_quotes may be empty for this tuple mode. Never invent coil thickness or total assembly dimensions.",
|
|
87
|
+
"replySchema": {
|
|
88
|
+
"candidates": "array"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "merge-hardware-web",
|
|
93
|
+
"executor": "cli",
|
|
94
|
+
"action": "capability.run",
|
|
95
|
+
"args": {
|
|
96
|
+
"capability": "hardware.web-merge",
|
|
97
|
+
"input": {
|
|
98
|
+
"requirements": "{{input.requirements}}",
|
|
99
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
100
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
101
|
+
"evidence_id": "{{steps.search-hardware-web.resource.id}}",
|
|
102
|
+
"candidates": "{{steps.extract-web-hardware.result.candidates}}"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "select-hardware-from-wikis",
|
|
108
|
+
"executor": "agent",
|
|
109
|
+
"instruction": "先读 abelien-hardware-selection/references/selection-service-contract.md 与真实候选的完整 Wiki。每槽位选择一个真实 component_id,显式 quantity 等于槽位 quantity;manufacturer/model 取候选,selection_reason 非空,wiki_evidence 为至少 8 字符的 Wiki 原文引用数组。selected_models 每项需 constraint_checks,覆盖 function、slot:<hard_constraints 的键>、limit:<每项 hard limit.id>;每项包含 constraint_id、status=verified|unknown|incompatible、reason、evidence:[{component_id,quote}]。多型号另给 compatibility_checks,逐 power/interfaces/mechanical/thermal/software 维度包含 status、reason、每个型号的原文 evidence。证据不足填 unknown,不可编造。status=verified|needs_confirmation,plan_mode=assemble_new|adapt_system,其余数组 selected_models/coverage_ledger/remaining_slots/unknowns/replacement_plan 必填。先比较整机,但整机继承缺 manifest 必须待确认,不凭文案抵扣数量。verified 只表示 Wiki 证据判断通过,不是独立工程兼容求解或实测,不代表采用。 Read only merge-hardware-web candidates for the final choice. Preserve structured limits.envelope and source strength; dimension metadata/name/selection-line identity are supplied by the trusted finalizer, never invented. Incompatible dimension candidates require replacement; unknown/risk stays needs_confirmation when an envelope is active. all_indexed_candidates_rejected is scoped to this indexed category; occupancy is advisory and clear is only coarse single-part screening. Whole-system reuse is optional; a poor match never forces a complex baseline. External IDs are external:<hash>, with source authority and engineering unknowns; envelopes are not component CAD and cannot grant adoption or delivery.",
|
|
110
|
+
"replySchema": {
|
|
111
|
+
"status": "verified|needs_confirmation",
|
|
112
|
+
"plan_mode": "adapt_system|assemble_new",
|
|
113
|
+
"selected_models": "array",
|
|
114
|
+
"coverage_ledger": "array",
|
|
115
|
+
"remaining_slots": "array",
|
|
116
|
+
"unknowns": "array",
|
|
117
|
+
"replacement_plan": "array",
|
|
118
|
+
"compatibility_checks": "array"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "select-hardware",
|
|
123
|
+
"executor": "cli",
|
|
124
|
+
"action": "capability.run",
|
|
125
|
+
"args": {
|
|
126
|
+
"capability": "hardware.select",
|
|
127
|
+
"input": {
|
|
128
|
+
"requirements": "{{input.requirements}}",
|
|
129
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
130
|
+
"recall_id": "{{steps.merge-hardware-web.resource.id}}",
|
|
131
|
+
"selection_proposal": "{{steps.select-hardware-from-wikis.result}}"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "record-hardware-selection",
|
|
137
|
+
"executor": "cli",
|
|
138
|
+
"action": "resource.update",
|
|
139
|
+
"args": {
|
|
140
|
+
"id": "{{steps.record-requirements.resource.id}}",
|
|
141
|
+
"bodyPatch": {
|
|
142
|
+
"hardwareSelectionId": "{{steps.select-hardware.resource.id}}",
|
|
143
|
+
"hardwareSelectionStatus": "{{steps.select-hardware.result.status}}",
|
|
144
|
+
"hardwareSelectionRevision": "{{steps.select-hardware.result.revision}}",
|
|
145
|
+
"hardwarePlanMode": "{{steps.select-hardware.result.plan_mode}}"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "hardware-selected",
|
|
151
|
+
"executor": "cli",
|
|
152
|
+
"action": "machine.send",
|
|
153
|
+
"args": {
|
|
154
|
+
"machine": "hardware-selection",
|
|
155
|
+
"event": "confirmSelection",
|
|
156
|
+
"instance": "{{steps.record-requirements.resource.id}}"
|
|
157
|
+
},
|
|
158
|
+
"completeWhen": {
|
|
159
|
+
"path": "steps.hardware-selected.result.to",
|
|
160
|
+
"equals": "selected_pending_confirmation"
|
|
161
|
+
},
|
|
162
|
+
"completionResult": {
|
|
163
|
+
"selectionId": "{{steps.select-hardware.resource.id}}",
|
|
164
|
+
"selectionStatus": "{{steps.select-hardware.result.status}}",
|
|
165
|
+
"selectionRevision": "{{steps.select-hardware.result.revision}}"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"result": {
|
|
170
|
+
"selectionId": "{{steps.select-hardware.resource.id}}",
|
|
171
|
+
"selectionStatus": "{{steps.select-hardware.result.status}}",
|
|
172
|
+
"selectionRevision": "{{steps.select-hardware.result.revision}}"
|
|
173
|
+
},
|
|
174
|
+
"legacyResume": "read_only"
|
|
175
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "user-journey-hardware-candidates",
|
|
3
|
+
"domain": "abelien-workspace",
|
|
4
|
+
"description": "Library recall, suitability review, fixed Prismer-first/Volc evidence for unresolved slots, source-bound merge, then candidate proposal",
|
|
5
|
+
"input": {
|
|
6
|
+
"required": [
|
|
7
|
+
"requirements"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"steps": [
|
|
11
|
+
{
|
|
12
|
+
"id": "record-requirements",
|
|
13
|
+
"executor": "cli",
|
|
14
|
+
"action": "resource.put",
|
|
15
|
+
"args": {
|
|
16
|
+
"kind": "draft",
|
|
17
|
+
"id": "hardware-candidates-d-{{hash}}",
|
|
18
|
+
"body": {
|
|
19
|
+
"requirements": "{{input.requirements}}"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "classify-hardware",
|
|
25
|
+
"executor": "agent",
|
|
26
|
+
"instruction": "需求已澄清;requirements 是 clarify 交回的 Requirements:context 为落点与场景,reaction[] 为全部触发→反应,limits[] 每项带 strength。按全部 reaction 推导功能槽位与数量,strength=hard 的 limits 进 hard_constraints,preference 只作排序提示;缺 reaction 或只有品类标签时停止并说明。读取同级 abelien-hardware/SKILL.md,并用其 scripts/load-guide.mjs 依次按需加载 entry、命中的 level1、命中的 level2、contract;只提交功能槽位、数量、受控三级路径和本次硬约束。回复 {\"slots\":[...]},不要提交型号。",
|
|
27
|
+
"replySchema": {
|
|
28
|
+
"slots": "array"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "search-hardware-wikis",
|
|
33
|
+
"executor": "cli",
|
|
34
|
+
"action": "capability.run",
|
|
35
|
+
"args": {
|
|
36
|
+
"capability": "hardware.search",
|
|
37
|
+
"input": {
|
|
38
|
+
"operation": "search",
|
|
39
|
+
"query": "{{input.requirements}}",
|
|
40
|
+
"requirements": "{{input.requirements}}",
|
|
41
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
42
|
+
"policy": {
|
|
43
|
+
"prefer_system_candidates": true,
|
|
44
|
+
"top_k_per_slot": 8,
|
|
45
|
+
"include_content": true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "hardware-knowledge-recalled",
|
|
52
|
+
"executor": "cli",
|
|
53
|
+
"action": "machine.send",
|
|
54
|
+
"args": {
|
|
55
|
+
"machine": "hardware-recall",
|
|
56
|
+
"event": "confirmRecall",
|
|
57
|
+
"instance": "{{steps.search-hardware-wikis.resource.id}}"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "review-hardware-candidates",
|
|
62
|
+
"executor": "agent",
|
|
63
|
+
"instruction": "Read the complete library candidates and original requirements/slots. Review suitability against function and every hard constraint. Reply {\"unresolved_slots\":[{\"slot_id\":\"original slot\",\"reason\":\"no candidates or specific reasons all candidates are unsuitable\",\"query\":\"official model search targeting function/category/key hard constraints\",\"count\":10}]}. Every zero-candidate slot requires supplemental search. All unsuitable candidates also require search. Preserve rechargeable built-in battery, wireless charging, and all other original requirements; do not ask the user to drop a requirement because the catalog is empty. unresolved_slots contains only slots that need search. Omit suitable library slots entirely; never add placeholder rows with an empty query or count=0. Return [] when all slots are suitable. Before committing this review, the trusted host validates the full original requirements, slots and recall with validate-web-search-plan.mjs; a VALIDATION reply preserves this pause so the same run can be corrected. Count is optional and a positive integer; Prismer search.topK and return.topK are explicit. Do not apply undocumented Prismer query/result limits or truncate requirements. The trusted fixed Prismer-first policy permits Volc only after a saved definitive denial, successful empty query or unsent missing Key; Volc alone checks its official 1-100 character Query and Count 1-50 at dispatch. Unknown dispatched effects never authorize fallback or a new invocation. Do not supply URLs, credentials, commands or providers. System reuse is optional: poor matches must not force complex whole systems. Concept visuals and the original requirements come first.",
|
|
64
|
+
"replySchema": {
|
|
65
|
+
"unresolved_slots": "array"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "search-hardware-web",
|
|
70
|
+
"executor": "cli",
|
|
71
|
+
"action": "capability.run",
|
|
72
|
+
"args": {
|
|
73
|
+
"capability": "hardware.web-search",
|
|
74
|
+
"input": {
|
|
75
|
+
"requirements": "{{input.requirements}}",
|
|
76
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
77
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
78
|
+
"unresolved_slots": "{{steps.review-hardware-candidates.result.unresolved_slots}}"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "extract-web-hardware",
|
|
84
|
+
"executor": "agent",
|
|
85
|
+
"instruction": "Read the persisted hardware-web-evidence pages from search-hardware-web in full. Search Content/snippets/provider official labels are not complete official pages or proof of authority. Extract only manufacturer pages; uncertain source authority remains unknown and third-party mirrors are not official merely because their URL contains a manufacturer domain. Reply {\"candidates\":[{\"slot_id\":\"original slot\",\"page_id\":\"persisted page ID\",\"manufacturer\":\"exact manufacturer\",\"manufacturer_quote\":\"at least 8 source characters\",\"model\":\"exact model\",\"model_quote\":\"at least 8 source characters\",\"parts\":[{\"name\":\"physical part name\",\"name_quote\":\"exact source quote\",\"shape\":\"box|cylinder|sphere|unknown\",\"shape_quote\":\"exact source quote\",\"dimensions_mm\":{\"length\":20,\"width\":12,\"height\":3},\"dimension_quotes\":{\"length\":\"exact quote identifying this part, axis, numeric value and unit\",\"width\":\"exact quote\",\"height\":\"exact quote\"}}]}]}. Quotes must include the exact part/name/shape they support. Each physical part has separate dimensions; cylinders use diameter/height, spheres use diameter. Unknown dimensions are omitted, never invented or defaulted. Conflicting versions and unknown multi-part overall dimensions remain unknown; do not combine contradictory versions. Do not submit page bodies, official/verified/CAD_available/source/geometry claims. Missing reliable pages or no network means candidates empty. This is envelope_only, not true component CAD or engineering verification. For an attributed tuple such as Back Panel: 48mm x 32mm x 0.5mm, add dimensions_quote with the entire exact source string and dimension_axes:[\"length\",\"width\",\"height\"] in original order; dimensions_mm must map each original value/unit to that explicitly declared axis. Preserve alternate imperial tuples in the quote; never use their values as mm or borrow another part's measurements. A 2-value tuple leaves height unknown. A box inferred from dimensions is only an envelope expression: actual part shape and orientation remain unknown. dimension_quotes may be empty for this tuple mode. Never invent coil thickness or total assembly dimensions.",
|
|
86
|
+
"replySchema": {
|
|
87
|
+
"candidates": "array"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "merge-hardware-web",
|
|
92
|
+
"executor": "cli",
|
|
93
|
+
"action": "capability.run",
|
|
94
|
+
"args": {
|
|
95
|
+
"capability": "hardware.web-merge",
|
|
96
|
+
"input": {
|
|
97
|
+
"requirements": "{{input.requirements}}",
|
|
98
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
99
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
100
|
+
"evidence_id": "{{steps.search-hardware-web.resource.id}}",
|
|
101
|
+
"candidates": "{{steps.extract-web-hardware.result.candidates}}"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "select-hardware-from-wikis",
|
|
107
|
+
"executor": "agent",
|
|
108
|
+
"instruction": "读取 context-json 中 merge-hardware-web 的候选和完整 Wiki;按用户硬约束、功能覆盖与整机覆盖先提出可复用整机候选,再为剩余槽位选择零部件,并检查接口、供电、机械、热和软件依赖。只选择候选中的 component_id,不按 draft、selection_gate 或 CAD 状态过滤。召回结果里 unmatched_slots 列出的槽位一个候选都没有:这些槽位必须逐条写进 remaining_slots,status 只能是 needs_confirmation——finalize 会拒绝把无候选槽位静默丢掉的「完整」提案。回复 {\"status\":\"proposed|needs_confirmation\",\"plan_mode\":\"adapt_system|assemble_new\",\"selected_models\":[...],\"coverage_ledger\":[...],\"remaining_slots\":[...],\"unknowns\":[...],\"replacement_plan\":[...]},每个型号带 slot_id、component_id(候选中的真实值)、manufacturer、model、quantity(1–128 的整数,本槽位实际要用几个,缺失或非整数会被 finalize 拒绝)、selection_reason(字符串)和 wiki_evidence(非空字符串数组,逐条引用该候选完整 Wiki 中支持此选择的原文要点);coverage_ledger、remaining_slots、unknowns、replacement_plan 均为数组,没有内容时给空数组。 提案不具有正式选型权限;不能提交 hardware-selected 或据此开始算法选型,须另走 hardware.select。 Read only merge-hardware-web candidates for the final choice. Preserve structured limits.envelope and source strength; dimension metadata/name/selection-line identity are supplied by the trusted finalizer, never invented. Incompatible dimension candidates require replacement; unknown/risk stays needs_confirmation when an envelope is active. all_indexed_candidates_rejected is scoped to this indexed category; occupancy is advisory and clear is only coarse single-part screening. Whole-system reuse is optional; a poor match never forces a complex baseline. External IDs are external:<hash>, with source authority and engineering unknowns; envelopes are not component CAD and cannot grant adoption or delivery.",
|
|
109
|
+
"replySchema": {
|
|
110
|
+
"status": "proposed|needs_confirmation",
|
|
111
|
+
"plan_mode": "adapt_system|assemble_new",
|
|
112
|
+
"selected_models": "array",
|
|
113
|
+
"coverage_ledger": "array",
|
|
114
|
+
"remaining_slots": "array",
|
|
115
|
+
"unknowns": "array",
|
|
116
|
+
"replacement_plan": "array"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "finalize-hardware-proposal",
|
|
121
|
+
"executor": "cli",
|
|
122
|
+
"action": "capability.run",
|
|
123
|
+
"args": {
|
|
124
|
+
"capability": "hardware.finalize",
|
|
125
|
+
"input": {
|
|
126
|
+
"operation": "create",
|
|
127
|
+
"planning_mode": "auto",
|
|
128
|
+
"requirements": "{{input.requirements}}",
|
|
129
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
130
|
+
"knowledge_recall": "{{steps.merge-hardware-web.resource.body}}",
|
|
131
|
+
"selection_proposal": "{{steps.select-hardware-from-wikis.result}}"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "record-hardware-proposal",
|
|
137
|
+
"executor": "cli",
|
|
138
|
+
"action": "resource.update",
|
|
139
|
+
"args": {
|
|
140
|
+
"id": "{{steps.record-requirements.resource.id}}",
|
|
141
|
+
"bodyPatch": {
|
|
142
|
+
"hardwareProposalId": "{{steps.finalize-hardware-proposal.resource.id}}",
|
|
143
|
+
"hardwareProposalStatus": "{{steps.finalize-hardware-proposal.result.status}}",
|
|
144
|
+
"hardwareProposalRevision": "{{steps.finalize-hardware-proposal.result.revision}}"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "user-journey-hardware-algorithm",
|
|
3
|
+
"domain": "abelien-workspace",
|
|
4
|
+
"executionProtocol": "pinned-result-v1",
|
|
5
|
+
"description": "Library recall, suitability review, fixed Prismer-first/Volc evidence for unresolved slots, source-bound merge, then the same formal hardware.select and gate",
|
|
6
|
+
"input": {
|
|
7
|
+
"required": [
|
|
8
|
+
"requirements",
|
|
9
|
+
"reactions"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"steps": [
|
|
13
|
+
{
|
|
14
|
+
"id": "record-requirements",
|
|
15
|
+
"executor": "cli",
|
|
16
|
+
"action": "resource.put",
|
|
17
|
+
"args": {
|
|
18
|
+
"kind": "draft",
|
|
19
|
+
"id": "hardware-algorithm-d-{{hash}}",
|
|
20
|
+
"body": {
|
|
21
|
+
"requirements": "{{input.requirements}}",
|
|
22
|
+
"reactions": "{{input.reactions}}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "classify-hardware",
|
|
28
|
+
"executor": "agent",
|
|
29
|
+
"instruction": "需求已澄清;requirements 是 clarify 的 Requirements:context 为落点与场景,reaction[] 为全部触发→反应,limits[] 每项带 strength。按全部 reaction 推导功能槽位与数量,strength=hard 的 limits 进 hard_constraints,preference 只作排序提示;缺 reaction 或只有品类标签时停止并说明。读取同级 abelien-hardware-selection/SKILL.md,并用其 scripts/load-guide.mjs 依次按需加载 entry、命中的 level1、命中的 level2、contract;仅提交功能槽位、数量、受控三级路径和需求硬约束,不提交型号或猜测数据库事实。回复 {\"slots\":[...]};若需求不足或路径不确定,停止并说明,不能伪造槽位。",
|
|
30
|
+
"replySchema": {
|
|
31
|
+
"slots": "array"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "search-hardware-wikis",
|
|
36
|
+
"executor": "cli",
|
|
37
|
+
"action": "capability.run",
|
|
38
|
+
"args": {
|
|
39
|
+
"capability": "hardware.search",
|
|
40
|
+
"input": {
|
|
41
|
+
"operation": "search",
|
|
42
|
+
"query": "{{input.requirements}}",
|
|
43
|
+
"requirements": "{{input.requirements}}",
|
|
44
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
45
|
+
"policy": {
|
|
46
|
+
"prefer_system_candidates": true,
|
|
47
|
+
"top_k_per_slot": 8,
|
|
48
|
+
"include_content": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "hardware-knowledge-recalled",
|
|
55
|
+
"executor": "cli",
|
|
56
|
+
"action": "machine.send",
|
|
57
|
+
"args": {
|
|
58
|
+
"machine": "hardware-recall",
|
|
59
|
+
"event": "confirmRecall",
|
|
60
|
+
"instance": "{{steps.search-hardware-wikis.resource.id}}"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "review-hardware-candidates",
|
|
65
|
+
"executor": "agent",
|
|
66
|
+
"instruction": "Read the complete library candidates and original requirements/slots. Review suitability against function and every hard constraint. Reply {\"unresolved_slots\":[{\"slot_id\":\"original slot\",\"reason\":\"no candidates or specific reasons all candidates are unsuitable\",\"query\":\"official model search targeting function/category/key hard constraints\",\"count\":10}]}. Every zero-candidate slot requires supplemental search. All unsuitable candidates also require search. Preserve rechargeable built-in battery, wireless charging, and all other original requirements; do not ask the user to drop a requirement because the catalog is empty. unresolved_slots contains only slots that need search. Omit suitable library slots entirely; never add placeholder rows with an empty query or count=0. Return [] when all slots are suitable. Before committing this review, the trusted host validates the full original requirements, slots and recall with validate-web-search-plan.mjs; a VALIDATION reply preserves this pause so the same run can be corrected. Count is optional and a positive integer; Prismer search.topK and return.topK are explicit. Do not apply undocumented Prismer query/result limits or truncate requirements. The trusted fixed Prismer-first policy permits Volc only after a saved definitive denial, successful empty query or unsent missing Key; Volc alone checks its official 1-100 character Query and Count 1-50 at dispatch. Unknown dispatched effects never authorize fallback or a new invocation. Do not supply URLs, credentials, commands or providers. System reuse is optional: poor matches must not force complex whole systems. Concept visuals and the original requirements come first.",
|
|
67
|
+
"replySchema": {
|
|
68
|
+
"unresolved_slots": "array"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "search-hardware-web",
|
|
73
|
+
"executor": "cli",
|
|
74
|
+
"action": "capability.run",
|
|
75
|
+
"args": {
|
|
76
|
+
"capability": "hardware.web-search",
|
|
77
|
+
"input": {
|
|
78
|
+
"requirements": "{{input.requirements}}",
|
|
79
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
80
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
81
|
+
"unresolved_slots": "{{steps.review-hardware-candidates.result.unresolved_slots}}"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "extract-web-hardware",
|
|
87
|
+
"executor": "agent",
|
|
88
|
+
"instruction": "When pages contain blob_ref, use resource get <evidenceResourceId> --page <pageId> to read each required full original page; never copy page bodies into replies. Read the persisted hardware-web-evidence pages from search-hardware-web in full. Search Content/snippets/provider official labels are not complete official pages or proof of authority. Extract only manufacturer pages; uncertain source authority remains unknown and third-party mirrors are not official merely because their URL contains a manufacturer domain. Reply {\"candidates\":[{\"slot_id\":\"original slot\",\"page_id\":\"persisted page ID\",\"manufacturer\":\"exact manufacturer\",\"manufacturer_quote\":\"at least 8 source characters\",\"model\":\"exact model\",\"model_quote\":\"at least 8 source characters\",\"parts\":[{\"name\":\"physical part name\",\"name_quote\":\"exact source quote\",\"shape\":\"box|cylinder|sphere|unknown\",\"shape_quote\":\"exact source quote\",\"dimensions_mm\":{\"length\":20,\"width\":12,\"height\":3},\"dimension_quotes\":{\"length\":\"exact quote identifying this part, axis, numeric value and unit\",\"width\":\"exact quote\",\"height\":\"exact quote\"}}]}]}. Quotes must include the exact part/name/shape they support. Each physical part has separate dimensions; cylinders use diameter/height, spheres use diameter. Unknown dimensions are omitted, never invented or defaulted. Conflicting versions and unknown multi-part overall dimensions remain unknown; do not combine contradictory versions. Do not submit page bodies, official/verified/CAD_available/source/geometry claims. Missing reliable pages or no network means candidates empty. This is envelope_only, not true component CAD or engineering verification. For an attributed tuple such as Back Panel: 48mm x 32mm x 0.5mm, add dimensions_quote with the entire exact source string and dimension_axes:[\"length\",\"width\",\"height\"] in original order; dimensions_mm must map each original value/unit to that explicitly declared axis. Preserve alternate imperial tuples in the quote; never use their values as mm or borrow another part's measurements. A 2-value tuple leaves height unknown. A box inferred from dimensions is only an envelope expression: actual part shape and orientation remain unknown. dimension_quotes may be empty for this tuple mode. Never invent coil thickness or total assembly dimensions.",
|
|
89
|
+
"replySchema": {
|
|
90
|
+
"candidates": "array"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "merge-hardware-web",
|
|
95
|
+
"executor": "cli",
|
|
96
|
+
"action": "capability.run",
|
|
97
|
+
"args": {
|
|
98
|
+
"capability": "hardware.web-merge",
|
|
99
|
+
"input": {
|
|
100
|
+
"requirements": "{{input.requirements}}",
|
|
101
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
102
|
+
"recall_id": "{{steps.search-hardware-wikis.resource.id}}",
|
|
103
|
+
"evidence_id": "{{steps.search-hardware-web.resource.id}}",
|
|
104
|
+
"candidates": "{{steps.extract-web-hardware.result.candidates}}"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "select-hardware-from-wikis",
|
|
110
|
+
"executor": "agent",
|
|
111
|
+
"instruction": "先读 abelien-hardware-selection/references/selection-service-contract.md 与真实候选的完整 Wiki。每槽位选择一个真实 component_id,显式 quantity 等于槽位 quantity;manufacturer/model 取候选,selection_reason 非空,wiki_evidence 为至少 8 字符的 Wiki 原文引用数组。selected_models 每项需 constraint_checks,覆盖 function、slot:<hard_constraints 的键>、limit:<每项 hard limit.id>;每项包含 constraint_id、status=verified|unknown|incompatible、reason、evidence:[{component_id,quote}]。多型号另给 compatibility_checks,逐 power/interfaces/mechanical/thermal/software 维度包含 status、reason、每个型号的原文 evidence。证据不足填 unknown,不可编造。status=verified|needs_confirmation,plan_mode=assemble_new|adapt_system,其余数组 selected_models/coverage_ledger/remaining_slots/unknowns/replacement_plan 必填。先比较整机,但整机继承缺 manifest 必须待确认,不凭文案抵扣数量。verified 只表示 Wiki 证据判断通过,不是独立工程兼容求解或实测,不代表采用。 Read only merge-hardware-web candidates for the final choice. Preserve structured limits.envelope and source strength; dimension metadata/name/selection-line identity are supplied by the trusted finalizer, never invented. Incompatible dimension candidates require replacement; unknown/risk stays needs_confirmation when an envelope is active. all_indexed_candidates_rejected is scoped to this indexed category; occupancy is advisory and clear is only coarse single-part screening. Whole-system reuse is optional; a poor match never forces a complex baseline. External IDs are external:<hash>, with source authority and engineering unknowns; envelopes are not component CAD and cannot grant adoption or delivery.",
|
|
112
|
+
"replySchema": {
|
|
113
|
+
"status": "verified|needs_confirmation",
|
|
114
|
+
"plan_mode": "adapt_system|assemble_new",
|
|
115
|
+
"selected_models": "array",
|
|
116
|
+
"coverage_ledger": "array",
|
|
117
|
+
"remaining_slots": "array",
|
|
118
|
+
"unknowns": "array",
|
|
119
|
+
"replacement_plan": "array",
|
|
120
|
+
"compatibility_checks": "array"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "select-hardware",
|
|
125
|
+
"executor": "cli",
|
|
126
|
+
"action": "capability.run",
|
|
127
|
+
"args": {
|
|
128
|
+
"capability": "hardware.select",
|
|
129
|
+
"input": {
|
|
130
|
+
"requirements": "{{input.requirements}}",
|
|
131
|
+
"slots": "{{steps.classify-hardware.result.slots}}",
|
|
132
|
+
"recall_id": "{{steps.merge-hardware-web.resource.id}}",
|
|
133
|
+
"selection_proposal": "{{steps.select-hardware-from-wikis.result}}"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "record-hardware-selection",
|
|
139
|
+
"executor": "cli",
|
|
140
|
+
"action": "resource.update",
|
|
141
|
+
"args": {
|
|
142
|
+
"id": "{{steps.record-requirements.resource.id}}",
|
|
143
|
+
"bodyPatch": {
|
|
144
|
+
"hardwareSelectionId": "{{steps.select-hardware.resource.id}}",
|
|
145
|
+
"hardwareSelectionStatus": "{{steps.select-hardware.result.status}}",
|
|
146
|
+
"hardwareSelectionRevision": "{{steps.select-hardware.result.revision}}",
|
|
147
|
+
"hardwarePlanMode": "{{steps.select-hardware.result.plan_mode}}"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "hardware-selected",
|
|
153
|
+
"executor": "cli",
|
|
154
|
+
"action": "machine.send",
|
|
155
|
+
"args": {
|
|
156
|
+
"machine": "hardware-selection",
|
|
157
|
+
"event": "confirmSelection",
|
|
158
|
+
"instance": "{{steps.record-requirements.resource.id}}"
|
|
159
|
+
},
|
|
160
|
+
"completeWhen": {
|
|
161
|
+
"path": "steps.hardware-selected.result.to",
|
|
162
|
+
"equals": "selected_pending_confirmation"
|
|
163
|
+
},
|
|
164
|
+
"completionResult": {
|
|
165
|
+
"selectionId": "{{steps.select-hardware.resource.id}}",
|
|
166
|
+
"selectionStatus": "{{steps.select-hardware.result.status}}",
|
|
167
|
+
"selectionRevision": "{{steps.select-hardware.result.revision}}"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "research-algorithms",
|
|
172
|
+
"executor": "agent",
|
|
173
|
+
"instruction": "硬件选型已完成。读取同级 abelien-algorithm/SKILL.md 和 references/research-policy.md,并从 context-json 的 select-hardware.resource 读取准确厂商、型号、能力和 Wiki 证据。针对 input.reactions 先检索硬件厂商官方资料,再检索算法或模型官方资料与 Hugging Face;端侧不满足且用户允许联网时才比较成熟云服务。选择每个 reaction 的最合适实现并回复 {\"bindings\":[...],\"candidates\":[...],\"sources\":[...],\"unavailable_sources\":[...],\"unknowns\":[...],\"blocking_unknowns\":[...]};来源必须回读,binding 必须明确 edge、cloud 或 hybrid。",
|
|
174
|
+
"replySchema": {
|
|
175
|
+
"bindings": "array",
|
|
176
|
+
"candidates": "array",
|
|
177
|
+
"sources": "array",
|
|
178
|
+
"unavailable_sources": "array",
|
|
179
|
+
"unknowns": "array",
|
|
180
|
+
"blocking_unknowns": "array"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "select-algorithms",
|
|
185
|
+
"executor": "cli",
|
|
186
|
+
"action": "capability.run",
|
|
187
|
+
"args": {
|
|
188
|
+
"capability": "algorithm.finalize",
|
|
189
|
+
"input": {
|
|
190
|
+
"operation": "select",
|
|
191
|
+
"hardware_selection_id": "{{steps.select-hardware.resource.id}}",
|
|
192
|
+
"hardware_selection_revision": "{{steps.select-hardware.result.revision}}",
|
|
193
|
+
"requirements": "{{input.requirements}}",
|
|
194
|
+
"reactions": "{{input.reactions}}",
|
|
195
|
+
"research": "{{steps.research-algorithms.result}}"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "algorithm-selected",
|
|
201
|
+
"executor": "cli",
|
|
202
|
+
"action": "machine.send",
|
|
203
|
+
"args": {
|
|
204
|
+
"machine": "algorithm-selection",
|
|
205
|
+
"event": "confirmSelection",
|
|
206
|
+
"instance": "{{steps.select-algorithms.resource.id}}"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "record-algorithm-selection",
|
|
211
|
+
"executor": "cli",
|
|
212
|
+
"action": "resource.update",
|
|
213
|
+
"args": {
|
|
214
|
+
"id": "{{steps.record-requirements.resource.id}}",
|
|
215
|
+
"bodyPatch": {
|
|
216
|
+
"algorithmSelectionId": "{{steps.select-algorithms.resource.id}}",
|
|
217
|
+
"algorithmSelectionStatus": "{{steps.select-algorithms.result.status}}",
|
|
218
|
+
"algorithmSelectionRevision": "{{steps.select-algorithms.result.revision}}"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"result": {
|
|
224
|
+
"selectionId": "{{steps.select-hardware.resource.id}}",
|
|
225
|
+
"selectionStatus": "{{steps.select-hardware.result.status}}",
|
|
226
|
+
"selectionRevision": "{{steps.select-hardware.result.revision}}"
|
|
227
|
+
},
|
|
228
|
+
"legacyResume": "read_only"
|
|
229
|
+
}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
{
|
|
109
109
|
"id": "select-hardware-from-wikis",
|
|
110
110
|
"executor": "agent",
|
|
111
|
-
"instruction": "先读 abelien-hardware-selection/references/selection-service-contract.md 与真实候选的完整 Wiki。每槽位选择一个真实 component_id,显式 quantity 等于槽位 quantity;manufacturer/model 取候选,selection_reason 非空,wiki_evidence 为至少 8 字符的 Wiki 原文引用数组。selected_models 每项需 constraint_checks,覆盖 function、slot:<hard_constraints 的键>、limit:<每项 hard limit.id>;每项包含 constraint_id、status=verified|unknown|incompatible、reason、evidence:[{component_id,quote}]。多型号另给 compatibility_checks,逐 power/interfaces/mechanical/thermal/software 维度包含 status、reason、每个型号的原文 evidence。证据不足填 unknown,不可编造。status=verified|needs_confirmation,plan_mode=assemble_new|adapt_system,其余数组 selected_models/coverage_ledger/remaining_slots/unknowns/replacement_plan 必填。先比较整机,但整机继承缺 manifest 必须待确认,不凭文案抵扣数量。verified 只表示 Wiki 证据判断通过,不是独立工程兼容求解或实测,不代表采用。 Read only merge-hardware-web candidates for the final choice. Whole-system reuse is optional; a poor match never forces a complex baseline. External IDs are external:<hash>, with source authority and engineering unknowns; envelopes are not component CAD and cannot grant adoption or delivery.",
|
|
111
|
+
"instruction": "先读 abelien-hardware-selection/references/selection-service-contract.md 与真实候选的完整 Wiki。每槽位选择一个真实 component_id,显式 quantity 等于槽位 quantity;manufacturer/model 取候选,selection_reason 非空,wiki_evidence 为至少 8 字符的 Wiki 原文引用数组。selected_models 每项需 constraint_checks,覆盖 function、slot:<hard_constraints 的键>、limit:<每项 hard limit.id>;每项包含 constraint_id、status=verified|unknown|incompatible、reason、evidence:[{component_id,quote}]。多型号另给 compatibility_checks,逐 power/interfaces/mechanical/thermal/software 维度包含 status、reason、每个型号的原文 evidence。证据不足填 unknown,不可编造。status=verified|needs_confirmation,plan_mode=assemble_new|adapt_system,其余数组 selected_models/coverage_ledger/remaining_slots/unknowns/replacement_plan 必填。先比较整机,但整机继承缺 manifest 必须待确认,不凭文案抵扣数量。verified 只表示 Wiki 证据判断通过,不是独立工程兼容求解或实测,不代表采用。 Read only merge-hardware-web candidates for the final choice. Preserve structured limits.envelope and source strength; dimension metadata/name/selection-line identity are supplied by the trusted finalizer, never invented. Incompatible dimension candidates require replacement; unknown/risk stays needs_confirmation when an envelope is active. all_indexed_candidates_rejected is scoped to this indexed category; occupancy is advisory and clear is only coarse single-part screening. Whole-system reuse is optional; a poor match never forces a complex baseline. External IDs are external:<hash>, with source authority and engineering unknowns; envelopes are not component CAD and cannot grant adoption or delivery.",
|
|
112
112
|
"replySchema": {
|
|
113
113
|
"status": "verified|needs_confirmation",
|
|
114
114
|
"plan_mode": "adapt_system|assemble_new",
|