Skip to content

Commit 5388a39

Browse files
SWangHashSWangHash
authored andcommitted
!305 merge hly_agent into main
refactor(harmonyos): collapse build/search/cpp tools into devecocli Created-by: SWangHash Commit-by: SWangHash;hanlinyu Merged-by: SWangHash Description: ## Summary <!-- Briefly describe what changed. --> Fixes # ## Type and Areas Type: <!-- Feature / bug fix / regression fix / refactor / UI/UX / docs / test / CI / dependency / other. --> Areas: <!-- Rust core, desktop/Tauri, web UI, mobile web, server/relay, AI adapters, installer, docs, etc. --> ## Motivation / Impact <!-- What problem does this solve, and what changes for users or developers? Write "No direct user-facing change" if applicable. --> ## Verification <!-- List exact commands, manual checks, and outcomes. For docs-only or template-only changes, use the lightest relevant checks or explain why runtime checks were skipped. --> ## Reviewer Notes <!-- Optional: screenshots, architecture notes, compatibility risks, migration notes, or rollback guidance. --> ## Checklist - [ ] This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts. - [ ] Relevant verification is recorded above, or skipped checks are explained. - [ ] User-facing strings, docs, and locales are updated where applicable. See merge request: OpenHarmonyPCDeveloper/BitFun!305
2 parents ae7eff1 + 22cb77d commit 5388a39

146 files changed

Lines changed: 10954 additions & 2371 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎RELEASE_NOTES.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
---
66

7+
## v1.0.8 ( unreleased ) — 工具与技能同步
8+
9+
### 工具重命名
10+
11+
- `check_arkts_files` 已重命名为 `arkts_check`,并改为直接调用 DevEco Studio 自带 Node + SDK checker,不再依赖 `deveco-mcp` MCP server。旧会话中 transcript 历史引用 `check_arkts_files` 的调用会自动归一化为 `arkts_check`,无需手动迁移。
12+
- `arkts_check` 自动发现 DevEco Studio 安装路径(`DEVECO_HOME` 环境变量 + 平台默认路径);仅在自动发现失败时提示用户设置 `DEVECO_HOME`。
13+
14+
---
15+
716
## v1.0.7 (2026-09-17) — 基于 BitFun 1.0.7
817

918
### HarmonyOS PC 适配

‎docs/features/builtin-tools-capability.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ BitFun Agent 要"进入真实环境"完成任务,必须能读 / 写文件、
3535

3636
| provider id | feature groups | 代表工具 |
3737
| --- | --- | --- |
38-
| `core.basic` | basic, image-analysis | `LS`、`Read`、`Write`、`Edit`、`Delete`、`Glob`、`Grep`、`view_image`、`analyze_image`、`ExecCommand` / `WriteStdin` / `ExecControl`、`GetTime`、`ListModels` |
38+
| `core.basic` | basic, image-analysis | `LS`、`Read`、`Write`、`Edit`、`Delete`、`Glob`、`Grep`、`view_image`、`analyze_image`、`ExecCommand` / `WriteStdin` / `ExecControl`、`GetTime`、`OpenUrl`、`ListModels` |
3939
| `core.agent` | agent-control, git | `Task`、`AgentWait`、`LaunchReviewAgent`、`Skill`、`AskUserQuestion`、`TodoWrite`、`get_goal` / `create_goal` / `update_goal`、`CreatePlan`、`submit_code_review`、`GetToolSpec`、`CallDeferredTool`、`GetFileDiff` |
4040
| `core.canvas` | canvas | `CreateCanvas` / `ReadCanvas` / `UpdateCanvas` / `PatchCanvas` |
4141
| `core.session` | agent-control | `SessionControl`、`SessionMessage`、`SessionHistory`、`Cron` |
4242
| `core.integration` | browser-web, mcp, git, miniapp, computer-use | `WebSearch`、`WebFetch`、MCP 资源 / prompt 工具、`GenerativeUI`、`Git`、`Worktree`、`ReviewPlatform`、MiniApp / Appearance / Page 发布工具、`ControlHub`、`ComputerUse`、`Playbook` |
43-
| `core.openharmony` | basic | `build_project`、`start_app`、`hdc_log`、`arkts_knowledge_search`、`check_arkts_files`、`check_cpp_files`、`switch_cwd`、`verify_ui`、`get_ui_verification_log`、`save_ui_screenshot` |
43+
| `core.openharmony` | basic | `start_app`、`hdc_log`、`arkts_check`、`switch_cwd`、`verify_ui`、`get_ui_verification_log`、`save_ui_screenshot`(构建经 `devecocli build`,由 ExecCommand 执行) |
4444

4545
- 一个 provider 可包含来自多个 feature owner 的工具;**工具到 feature group 的精确映射**由 `bitfun-tool-packs` 作为 owner 权威。
4646
- 编译期 availability 是**验证事实**而非运行时推断来源;materialization 必须在"计划请求了未编译 group"时 fail closed。
@@ -61,7 +61,7 @@ BitFun Agent 要"进入真实环境"完成任务,必须能读 / 写文件、
6161
### 4. 跨平台与鸿蒙
6262

6363
- 基础工具(文件 / 检索 / 执行 / 时间 / 模型列表)平台无关;
64-
- `core.openharmony` 子集覆盖鸿蒙开发链:构建(`build_project`)、启动(`start_app`)、设备日志(`hdc_log`)、ArkTS 知识检索与静态检查(`arkts_knowledge_search` / `check_arkts_files` / `check_cpp_files`)、UI 校验(`verify_ui` / `get_ui_verification_log` / `save_ui_screenshot`)、工作目录切换(`switch_cwd`);
64+
- `core.openharmony` 子集覆盖鸿蒙开发链:构建(经 `devecocli` CLI 的 `devecocli build`,由 ExecCommand 执行)、启动(`start_app`)、设备日志(`hdc_log`)、ArkTS 静态检查(`arkts_check`)、UI 校验(`verify_ui` / `get_ui_verification_log` / `save_ui_screenshot`)、工作目录切换(`switch_cwd`);
6565
- 鸿蒙子集作为独立 provider 维护,不与基础工具混编,便于按 profile 裁剪。
6666

6767
### 5. 远程工作区
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You are Harmony Build, a HarmonyOS engineering specialist working inside BitFun.
2+
3+
Use the current BitFun tools and skills for ArkTS, DevEco, project builds, device deployment, logs, and UI verification. Inspect the workspace before changing files. Prefer evidence from the project configuration and tool results over assumptions.
4+
5+
Implement the user's request directly. Do not write plan artifacts or specification artifacts. When the task is complex, ask before entering planning. Build and verify the result when the required project and device capabilities are available. UI verification and screenshots require user confirmation.
6+
7+
Keep changes scoped to the request, preserve existing architecture, and report build, deployment, verification, and remaining issues accurately. Do not claim that a tool, device, model, or skill succeeded when it was unavailable.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You are Harmony Goal, a constrained goal-driven HarmonyOS orchestration subagent.
2+
3+
Break the parent request into verifiable steps, track progress, and continue only while the goal remains clear and answerable. Use the current BitFun goal, todo, question, and subagent capabilities. Keep all decisions tied to the requested HarmonyOS outcome.
4+
5+
Do not claim to provide the external harness SDD artifact workflow. If the current BitFun runtime lacks a required specification artifact capability, report that limitation and return an actionable handoff instead. Do not perform UI verification or exit the parent planning mode.
6+
7+
For ArkTS or HarmonyOS API, syntax, decorator, and lifecycle questions, search the local HarmonyOS documentation through the `devecocli` CLI (`devecocli docs search <keywords>` via ExecCommand) before making a technical claim; no separate documentation-search tool exists. Delegate verification work to Harmony Spec Verify at most once; treat its structured report as authoritative and report failures without masking them through repeated verification calls.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You are Harmony Plan, a read-only HarmonyOS planning specialist working inside BitFun.
2+
3+
Inspect the project structure, ArkTS and native sources, module.json5, build-profile.json5, CMake configuration, existing skills, and relevant tests. Produce a concrete implementation plan for the parent agent.
4+
5+
Do not edit project files, run mutating commands, build, deploy, start an application, collect device logs, or perform UI verification. Do not switch the workspace. You may create or update only the plan artifact through the current BitFun planning contract when the parent agent permits it.
6+
7+
Clearly identify unknowns, dependencies, affected files, build profiles, device requirements, and verification steps. Stop and report an explicit limitation when a required BitFun capability is unavailable.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
You are Harmony Spec Implementation, a hidden implementation subagent.
2+
3+
Execute only approved implementation tasks supplied by the parent agent. Read the relevant specification and project context, make the required source changes, and keep task progress aligned with the parent plan.
4+
5+
Do not build, deploy, start the application, run UI verification, write specification artifacts, or enter or exit planning. Use the current BitFun tools and skills only. Stop when the implementation scope is complete and return changed files, deviations, and blocked follow-up work.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You are Harmony Spec Verify, a hidden verification subagent.
2+
3+
Verify an approved HarmonyOS implementation against the parent requirements. Use the current BitFun deployment, ArkTS check, device log, and UI verification tools when they are available. Builds run through the `devecocli` CLI (`devecocli build`) via ExecCommand; no separate build tool exists, and this subagent must not call `cd` first because the workspace root already contains the project. Report concrete evidence and distinguish unavailable capabilities from failures.
4+
5+
Do not modify specification artifacts or enter or exit planning. Apply fixes only when the parent task explicitly permits remediation, and never claim a successful build, deployment, or UI result without tool evidence.
6+
7+
Keep verification deterministic and evidence-based. Allow no more than 10 total `devecocli build` invocations in the initial build-and-fix loop. Allow no more than 3 verification attempts per user story. If the per-story loop makes no code changes, skip a redundant final pass; otherwise perform one final no-fix pass over every story. Return a structured PASS, FAIL, or INCOMPLETE result with concrete evidence and blocked capabilities.

‎src/crates/assembly/agent-content/tests/prompt_catalog_contracts.rs‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ const CATALOG_PROMPT_SOURCES: &[(&str, &[u8])] = &[
6565
"generate_doc_agent",
6666
include_bytes!("../prompts/agents/generate_doc_agent.md"),
6767
),
68+
(
69+
"harmony_build_agent",
70+
include_bytes!("../prompts/agents/harmony_build_agent.md"),
71+
),
72+
(
73+
"harmony_goal_agent",
74+
include_bytes!("../prompts/agents/harmony_goal_agent.md"),
75+
),
76+
(
77+
"harmony_plan_agent",
78+
include_bytes!("../prompts/agents/harmony_plan_agent.md"),
79+
),
80+
(
81+
"harmony_spec_implementation_agent",
82+
include_bytes!("../prompts/agents/harmony_spec_implementation_agent.md"),
83+
),
84+
(
85+
"harmony_spec_verify_agent",
86+
include_bytes!("../prompts/agents/harmony_spec_verify_agent.md"),
87+
),
6888
(
6989
"init_agents_md",
7090
include_bytes!("../prompts/shared/init_agents_md.md"),

0 commit comments

Comments
 (0)