scene-capability-engine 3.6.27 → 3.6.29
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/docs/agent-runtime/magicball-status.schema.json +33 -0
- package/docs/agent-runtime/magicball-task-feedback.schema.json +79 -0
- package/docs/agent-runtime/magicball-timeline-view.schema.json +51 -0
- package/docs/command-reference.md +4 -1
- package/docs/magicball-capability-iteration-ui.md +7 -0
- package/docs/magicball-capability-library.md +13 -0
- package/docs/magicball-task-feedback-timeline-guide.md +17 -0
- package/lib/commands/capability.js +19 -1
- package/lib/commands/studio.js +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.29] - 2026-03-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Added shared Magicball schemas for status, task feedback, and timeline view contracts.
|
|
14
|
+
- Command reference and Magicball integration docs now reference the shared schemas explicitly.
|
|
15
|
+
|
|
16
|
+
## [3.6.28] - 2026-03-06
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Added shared `mb_status` language across studio task feedback and capability inventory scene advice for Magicball UI rendering.
|
|
20
|
+
- Magicball docs now define the shared status-language contract for task cards and capability cards.
|
|
21
|
+
|
|
10
22
|
## [3.6.27] - 2026-03-06
|
|
11
23
|
|
|
12
24
|
### Added
|
package/README.md
CHANGED
package/README.zh.md
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://scene-capability-engine.dev/contracts/magicball-status.schema.json",
|
|
4
|
+
"title": "Magicball Shared Status Contract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"attention_level",
|
|
8
|
+
"status_tone",
|
|
9
|
+
"status_label",
|
|
10
|
+
"blocking_summary",
|
|
11
|
+
"recommended_action"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"attention_level": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["critical", "high", "medium", "low"]
|
|
17
|
+
},
|
|
18
|
+
"status_tone": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["danger", "warning", "info", "success"]
|
|
21
|
+
},
|
|
22
|
+
"status_label": {
|
|
23
|
+
"type": ["string", "null"]
|
|
24
|
+
},
|
|
25
|
+
"blocking_summary": {
|
|
26
|
+
"type": ["string", "null"]
|
|
27
|
+
},
|
|
28
|
+
"recommended_action": {
|
|
29
|
+
"type": ["string", "null"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://scene-capability-engine.dev/contracts/magicball-task-feedback.schema.json",
|
|
4
|
+
"title": "Magicball Task Feedback View Contract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"version",
|
|
8
|
+
"problem",
|
|
9
|
+
"execution",
|
|
10
|
+
"diagnosis",
|
|
11
|
+
"evidence",
|
|
12
|
+
"next_step",
|
|
13
|
+
"mb_status"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"version": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"problem": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": ["component", "action", "expected", "actual"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"component": { "type": ["string", "null"] },
|
|
24
|
+
"action": { "type": ["string", "null"] },
|
|
25
|
+
"expected": { "type": ["string", "null"] },
|
|
26
|
+
"actual": { "type": ["string", "null"] }
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
},
|
|
30
|
+
"execution": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["stage", "status", "summary", "blocking_summary"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"stage": { "type": "string" },
|
|
35
|
+
"status": { "type": "string" },
|
|
36
|
+
"summary": { "type": "array", "items": { "type": "string" } },
|
|
37
|
+
"blocking_summary": { "type": ["string", "null"] }
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
},
|
|
41
|
+
"diagnosis": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["hypothesis", "chain_checkpoint", "root_cause_confidence"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"hypothesis": { "type": ["string", "null"] },
|
|
46
|
+
"chain_checkpoint": { "type": "string" },
|
|
47
|
+
"root_cause_confidence": { "type": "string", "enum": ["low", "medium", "high"] }
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"evidence": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["file_count", "file_paths", "command_count", "error_count", "verification_result", "regression_scope"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"file_count": { "type": "integer", "minimum": 0 },
|
|
56
|
+
"file_paths": { "type": "array", "items": { "type": "string" } },
|
|
57
|
+
"command_count": { "type": "integer", "minimum": 0 },
|
|
58
|
+
"error_count": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"verification_result": { "type": "string" },
|
|
60
|
+
"regression_scope": { "type": "array", "items": { "type": "string" } }
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
"next_step": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["recommended_action", "next_action", "next_command"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"recommended_action": { "type": ["string", "null"] },
|
|
69
|
+
"next_action": { "type": ["string", "null"] },
|
|
70
|
+
"next_command": { "type": ["string", "null"] }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"mb_status": {
|
|
75
|
+
"$ref": "./magicball-status.schema.json"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://scene-capability-engine.dev/contracts/magicball-timeline-view.schema.json",
|
|
4
|
+
"title": "Magicball Timeline View Contract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["summary", "entries"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"summary": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": ["total", "latest_snapshot_id", "latest_created_at", "dirty_snapshot_count", "scene_count", "trigger_counts"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"latest_snapshot_id": { "type": ["string", "null"] },
|
|
14
|
+
"latest_created_at": { "type": ["string", "null"] },
|
|
15
|
+
"dirty_snapshot_count": { "type": "integer", "minimum": 0 },
|
|
16
|
+
"scene_count": { "type": "integer", "minimum": 0 },
|
|
17
|
+
"trigger_counts": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": { "type": "integer", "minimum": 0 }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
},
|
|
24
|
+
"entries": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["snapshot_id", "title", "subtitle", "trigger", "event", "created_at", "scene_id", "session_id", "file_count", "branch", "head", "dirty_count", "attention_level", "show_command", "restore_command"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"snapshot_id": { "type": ["string", "null"] },
|
|
31
|
+
"title": { "type": ["string", "null"] },
|
|
32
|
+
"subtitle": { "type": ["string", "null"] },
|
|
33
|
+
"trigger": { "type": ["string", "null"] },
|
|
34
|
+
"event": { "type": ["string", "null"] },
|
|
35
|
+
"created_at": { "type": ["string", "null"] },
|
|
36
|
+
"scene_id": { "type": ["string", "null"] },
|
|
37
|
+
"session_id": { "type": ["string", "null"] },
|
|
38
|
+
"file_count": { "type": "integer", "minimum": 0 },
|
|
39
|
+
"branch": { "type": ["string", "null"] },
|
|
40
|
+
"head": { "type": ["string", "null"] },
|
|
41
|
+
"dirty_count": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"attention_level": { "type": "string", "enum": ["high", "medium", "low"] },
|
|
43
|
+
"show_command": { "type": ["string", "null"] },
|
|
44
|
+
"restore_command": { "type": ["string", "null"] }
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
}
|
|
@@ -627,7 +627,7 @@ Studio JSON output now includes a stable UI-oriented task stream contract (in ad
|
|
|
627
627
|
- `task.commands[]`: `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
628
628
|
- `task.errors[]`: `message`, `error_bundle` (copy-ready diagnostic bundle)
|
|
629
629
|
- `task.evidence[]`: structured evidence references
|
|
630
|
-
- `task.feedback_model`: human-facing task feedback (`problem`, `execution`, `diagnosis`, `evidence`, `next_step`)
|
|
630
|
+
- `task.feedback_model`: human-facing task feedback (`problem`, `execution`, `diagnosis`, `evidence`, `next_step`, `mb_status`)
|
|
631
631
|
- `event[]`: raw audit event stream (`studio events` also keeps legacy `events[]` for compatibility)
|
|
632
632
|
- `studio events --openhands-events <path>` switches `source_stream=openhands` and maps OpenHands raw events to the same task contract fields.
|
|
633
633
|
- hierarchical task reference lookup/rerun:
|
|
@@ -1902,6 +1902,9 @@ sce capability register --input .sce/reports/capability-iteration/scene.customer
|
|
|
1902
1902
|
|
|
1903
1903
|
Schema references:
|
|
1904
1904
|
- UI contract: `docs/agent-runtime/capability-iteration-ui.schema.json`
|
|
1905
|
+
- Magicball shared status: `docs/agent-runtime/magicball-status.schema.json`
|
|
1906
|
+
- Magicball task feedback: `docs/agent-runtime/magicball-task-feedback.schema.json`
|
|
1907
|
+
- Magicball timeline view: `docs/agent-runtime/magicball-timeline-view.schema.json`
|
|
1905
1908
|
- Ontology mapping: `docs/ontology/capability-mapping.schema.json`
|
|
1906
1909
|
|
|
1907
1910
|
### Capability Library Reuse (query -> match -> use)
|
|
@@ -145,6 +145,7 @@ sce capability register --input <template.json> --json
|
|
|
145
145
|
## 5. 数据契约(前端对接)
|
|
146
146
|
|
|
147
147
|
- UI 契约:`docs/agent-runtime/capability-iteration-ui.schema.json`
|
|
148
|
+
- 统一状态语言:`docs/agent-runtime/magicball-status.schema.json`
|
|
148
149
|
- 本体映射 schema:`docs/ontology/capability-mapping.schema.json`
|
|
149
150
|
|
|
150
151
|
---
|
|
@@ -227,3 +228,9 @@ sce capability register --input <template.json> --json
|
|
|
227
228
|
|
|
228
229
|
- `summary_recommendations[]`:顶部全局建议
|
|
229
230
|
- `quick_filters[]`:推荐快捷筛选
|
|
231
|
+
|
|
232
|
+
## 15. Magicball 统一状态语言
|
|
233
|
+
|
|
234
|
+
- Scene 卡片统一消费 `mb_status`
|
|
235
|
+
- 任务卡统一消费 `task.feedback_model.mb_status`
|
|
236
|
+
- 颜色建议:`danger / warning / info / success`
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> 目标:在 Magicball UI 中提供“能力库检索/匹配/使用”闭环,加速场景能力落地。
|
|
4
4
|
|
|
5
|
+
Schema reference: `docs/agent-runtime/magicball-status.schema.json`
|
|
6
|
+
|
|
5
7
|
## 1. 能力库复用流程
|
|
6
8
|
|
|
7
9
|
能力模板进入能力库前,默认要求补齐本体三项核心能力:
|
|
@@ -179,3 +181,14 @@ sce capability use --template <template-id> --spec <spec-id> --apply --json
|
|
|
179
181
|
]
|
|
180
182
|
}
|
|
181
183
|
```
|
|
184
|
+
|
|
185
|
+
### mb_status(统一状态语言)
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"attention_level": "critical",
|
|
189
|
+
"status_tone": "danger",
|
|
190
|
+
"status_label": "blocked",
|
|
191
|
+
"blocking_summary": "缺决策策略,暂不可发布",
|
|
192
|
+
"recommended_action": "补齐决策策略"
|
|
193
|
+
}
|
|
194
|
+
```
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
## 1. 任务反馈模型(来源:`sce studio events --json`)
|
|
6
6
|
|
|
7
|
+
Schema references:
|
|
8
|
+
- `docs/agent-runtime/magicball-status.schema.json`
|
|
9
|
+
- `docs/agent-runtime/magicball-task-feedback.schema.json`
|
|
10
|
+
- `docs/agent-runtime/magicball-timeline-view.schema.json`
|
|
11
|
+
|
|
12
|
+
|
|
7
13
|
SCE 现在在 `task` 下增加:
|
|
8
14
|
- `feedback_model.version`
|
|
9
15
|
- `feedback_model.problem`
|
|
@@ -121,3 +127,14 @@ SCE 现在在时间线命令中增加:
|
|
|
121
127
|
- 时间线优先展示“可恢复、可比较、可追踪”的节点信息
|
|
122
128
|
- 所有字段都以 SCE 输出为准,Magicball 不自行推断
|
|
123
129
|
|
|
130
|
+
|
|
131
|
+
## 6. Magicball 统一状态语言
|
|
132
|
+
|
|
133
|
+
SCE 现在会在任务反馈模型中提供 `mb_status`:
|
|
134
|
+
- `attention_level`
|
|
135
|
+
- `status_tone`
|
|
136
|
+
- `status_label`
|
|
137
|
+
- `blocking_summary`
|
|
138
|
+
- `recommended_action`
|
|
139
|
+
|
|
140
|
+
Magicball 可直接用这组字段控制颜色、图标、提示文案。
|
|
@@ -836,6 +836,17 @@ function resolveCapabilityTriadPriority(entry) {
|
|
|
836
836
|
return 3;
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
+
function buildCapabilityMagicballStatus(input = {}) {
|
|
840
|
+
const attention = normalizeText(input.attention_level) || 'medium';
|
|
841
|
+
return {
|
|
842
|
+
attention_level: attention,
|
|
843
|
+
status_tone: attention === 'critical' ? 'danger' : (attention === 'high' ? 'warning' : (attention === 'low' ? 'success' : 'info')),
|
|
844
|
+
status_label: normalizeText(input.status_label) || null,
|
|
845
|
+
blocking_summary: normalizeText(input.blocking_summary) || null,
|
|
846
|
+
recommended_action: normalizeText(input.recommended_action) || null
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
|
|
839
850
|
function buildCapabilityInventorySceneAdvice(entry) {
|
|
840
851
|
const sceneId = String(entry && entry.scene_id || 'scene.unknown');
|
|
841
852
|
const releaseUi = entry && entry.release_readiness_ui ? entry.release_readiness_ui : { publish_ready: true, blocking_missing: [] };
|
|
@@ -886,7 +897,13 @@ function buildCapabilityInventorySceneAdvice(entry) {
|
|
|
886
897
|
recommended_action: recommendedAction,
|
|
887
898
|
blocking_summary: blockingSummary,
|
|
888
899
|
next_action: nextAction,
|
|
889
|
-
next_command: 'sce capability extract --scene ' + sceneId + ' --json'
|
|
900
|
+
next_command: 'sce capability extract --scene ' + sceneId + ' --json',
|
|
901
|
+
mb_status: buildCapabilityMagicballStatus({
|
|
902
|
+
attention_level: attentionLevel,
|
|
903
|
+
status_label: releaseUi.publish_ready ? 'publish_ready' : 'blocked',
|
|
904
|
+
blocking_summary: blockingSummary,
|
|
905
|
+
recommended_action: recommendedAction
|
|
906
|
+
})
|
|
890
907
|
};
|
|
891
908
|
}
|
|
892
909
|
|
|
@@ -1854,6 +1871,7 @@ module.exports = {
|
|
|
1854
1871
|
filterCapabilityCatalogEntries,
|
|
1855
1872
|
filterCapabilityInventoryEntries,
|
|
1856
1873
|
sortCapabilityInventoryEntries,
|
|
1874
|
+
buildCapabilityMagicballStatus,
|
|
1857
1875
|
buildCapabilityInventorySceneAdvice,
|
|
1858
1876
|
buildCapabilityInventorySummaryStats,
|
|
1859
1877
|
buildCapabilityInventorySummaryRecommendations,
|
package/lib/commands/studio.js
CHANGED
|
@@ -1537,6 +1537,20 @@ function buildTaskFeedbackModel(payload = {}) {
|
|
|
1537
1537
|
};
|
|
1538
1538
|
}
|
|
1539
1539
|
|
|
1540
|
+
function buildMagicballStatusLanguage(input = {}) {
|
|
1541
|
+
const attention = normalizeString(input.attention_level) || 'medium';
|
|
1542
|
+
const status = normalizeString(input.status) || 'unknown';
|
|
1543
|
+
const blockingSummary = normalizeString(input.blocking_summary) || null;
|
|
1544
|
+
const recommendedAction = normalizeString(input.recommended_action) || null;
|
|
1545
|
+
return {
|
|
1546
|
+
attention_level: attention,
|
|
1547
|
+
status_tone: attention === 'critical' ? 'danger' : (attention === 'high' ? 'warning' : (attention === 'low' ? 'success' : 'info')),
|
|
1548
|
+
status_label: status || 'unknown',
|
|
1549
|
+
blocking_summary: blockingSummary,
|
|
1550
|
+
recommended_action: recommendedAction
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1540
1554
|
function attachTaskFeedbackModel(payload = {}) {
|
|
1541
1555
|
if (!payload || typeof payload !== 'object' || !payload.task || typeof payload.task !== 'object') {
|
|
1542
1556
|
return payload;
|
|
@@ -1545,7 +1559,7 @@ function attachTaskFeedbackModel(payload = {}) {
|
|
|
1545
1559
|
...payload,
|
|
1546
1560
|
task: {
|
|
1547
1561
|
...payload.task,
|
|
1548
|
-
feedback_model: buildTaskFeedbackModel(payload)
|
|
1562
|
+
feedback_model: (() => { const model = buildTaskFeedbackModel(payload); return { ...model, mb_status: buildMagicballStatusLanguage({ status: model.execution.status, attention_level: model.diagnosis.root_cause_confidence === 'high' ? 'high' : (model.execution.status === 'completed' ? 'low' : 'medium'), blocking_summary: model.execution.blocking_summary, recommended_action: model.next_step.recommended_action }) }; })()
|
|
1549
1563
|
}
|
|
1550
1564
|
};
|
|
1551
1565
|
}
|
|
@@ -3727,6 +3741,7 @@ module.exports = {
|
|
|
3727
3741
|
runStudioReleaseCommand,
|
|
3728
3742
|
runStudioRollbackCommand,
|
|
3729
3743
|
runStudioEventsCommand,
|
|
3744
|
+
buildMagicballStatusLanguage,
|
|
3730
3745
|
runStudioPortfolioCommand,
|
|
3731
3746
|
runStudioBackfillSpecScenesCommand,
|
|
3732
3747
|
runStudioResumeCommand,
|
package/package.json
CHANGED