huawei-cloud-activity-submit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

华为云开放能力闯关 · 作品提交 Skill(生产环境)

Huawei Cloud Open Capabilities Challenge · Work Submission Skill (Production Environment)

让 Agent 直接调用活动 Agent 提交接口(AK/SK 鉴权)完成成果提交(不做任何页面/浏览器操作),提交成功后向用户提示已获得的对应步骤积分。
Allows the Agent to directly call the activity’s Agent Submission API (AK/SK authentication) to complete work submission (without any page/browser operations) and, after a successful submission, notify the user of the points earned for the corresponding step.

Overview

Overview

本 Skill 让 Agent 直接调用华为云"开放能力闯关挑战"(
activity_code = open-capability-2026-1024
)的 Agent 提交接口(AK/SK 鉴权),将活动生成的作品链接自动提交到对应步骤,并在成功后回报已获得的积分。
核心特点:
  • 纯 API 调用:不涉及任何页面/浏览器操作,直接 POST 提交接口。
  • 固定生产环境:本 skill 固定使用生产环境接口,不切换环境。
  • 两步顺序提交:
    beginner
    (沙箱部署,1000 分)→
    intermediate
    (ECS 持久化部署,2000 分)。
  • AK/SK 鉴权:通过请求头
    X-HW-AK
    /
    X-HW-SK
    /
    X-HW-Security-Token
    认证,不依赖 hcloud CLI。
  • ECS 步骤附加请求头:
    intermediate
    提交时携带
    X-HW-PROJECT-ID
    /
    X-HW-REGION
    。
  • 纯 Node.js 脚本:
    submit.mjs
    (Node ≥ 18,无外部依赖),不使用 KooCLI。
  • 可选展览馆发布:沙箱部署后始终询问;若未发布则 ECS 后再问一次;已发布则不再询问。
  • 资源清理提醒:ECS 提交成功后提醒用户清理按量付费资源。
This Skill enables the Agent to directly call the Agent Submission API (AK/SK authentication) of Huawei Cloud’s “Open Capabilities Challenge” (
activity_code = open-capability-2026-1024
), automatically submit the generated work link to the corresponding milestone, and report the points earned after a successful submission.
Core features:
  • Pure API calls: No page/browser operations are involved; the submission API is called directly using POST.
  • Fixed production environment: This skill always uses the production API and never switches environments.
  • Sequential two-step submission:
    beginner
    (Sandbox Deployment, 1,000 points) →
    intermediate
    (Persistent ECS Deployment, 2,000 points).
  • AK/SK authentication: Authentication uses the
    X-HW-AK
    /
    X-HW-SK
    /
    X-HW-Security-Token
    request headers and does not depend on the hcloud CLI.
  • Additional headers for the ECS step: The
    intermediate
    submission includes
    X-HW-PROJECT-ID
    /
    X-HW-REGION
    .
  • Pure Node.js script:
    submit.mjs
    (Node ≥ 18, no external dependencies), with no dependency on KooCLI.
  • Optional Gallery publication: Always ask after Sandbox Deployment; if the work was not published, ask again after ECS; do not ask again if it was already published.
  • Resource cleanup reminder: Remind the user to clean up pay-as-you-go resources after the ECS submission succeeds.

何时使用

When to Use

  • 用户说“把作品/成果/沙箱链接提交到活动” “帮我提交闯关成果” “提交沙箱域名/公网地址” 等。
  • 活动已生成沙箱作品链接(前端站点)和/或 ECS 公网地址,需要提交到对应步骤。
  • 仅针对活动
    activity_code = open-capability-2026-1024
    。
  • The user says things such as “submit the work/results/sandbox link to the activity,” “help me submit my challenge results,” or “submit the sandbox domain/public address.”
  • The activity has generated a sandbox work link (a frontend site) and/or an ECS public address that must be submitted to the corresponding milestone.
  • Applies only to the activity
    activity_code = open-capability-2026-1024
    .

提交接口

Submission API

项值
基地址(生产,固定)
https://open-dataset.huaweicloud.com/api/v1/hdopenservice/agent
提交
POST {base}/submit-activity-work
前端页面走
/user/...
(SSO 登录会话);Agent 走
/agent/...
(AK/SK 请求头),两者请求体与响应一致。本 skill 固定使用生产环境基地址,不切换环境。
鉴权(AK/SK 请求头):
  • X-HW-AK
    (必填):华为云 Access Key
  • X-HW-SK
    (必填):华为云 Secret Key
  • X-HW-Security-Token
    (可选):使用 STS 临时凭证时必填
ECS 步骤附加请求头(仅
intermediate
(ECS 持久化部署)提交时携带):
  • X-HW-PROJECT-ID
    :ECS 的 Project ID
  • X-HW-REGION
    :ECS 的 region(如
    cn-north-4
    )
凭证优先级:命令行参数 > 环境变量(
HW_ACCESS_KEY
/
HW_SECRET_KEY
/
HW_SECURITY_TOKEN
,兼容
HUAWEICLOUD_SDK_AK
/
HUAWEICLOUD_SDK_SK
/
HUAWEICLOUD_SDK_SECURITY_TOKEN
、
HW_AK
/
HW_SK
)。切勿把凭证写入仓库。
提交请求体(
Content-Type: application/json
,与
/user/submit-activity-work
一致):
json
{
  "activity_code": "open-capability-2026-1024",
  "milestone": "beginner | intermediate",
  "work_link": "https://xxx.devbridge-s2.hwtunnel.com",
  "api_link": "http://<ECS_EIP>/hc-activity/index.html",
  "summary": "作品说明(可选,≤500 字)"
}
按步骤取字段:
  • beginner
    (沙箱部署):只传
    work_link
    (沙箱站点链接)
  • intermediate
    (ECS 持久化部署):只传
    api_link
    (ECS 公网访问地址,需含
    index.html
    ,如
    http://<EIP>/hc-activity/index.html
    )
响应:
{ "code": "success", "message": "..." }
;
code === "success"
即提交成功。
ItemValue
Base URL (production, fixed)
https://open-dataset.huaweicloud.com/api/v1/hdopenservice/agent
Submission
POST {base}/submit-activity-work
The frontend page uses
/user/...
(SSO login session), while the Agent uses
/agent/...
(AK/SK headers). Both use the same request body and response. This skill always uses the production environment base URL and never switches environments.
Authentication (AK/SK request headers):
  • X-HW-AK
    (required): Huawei Cloud Access Key
  • X-HW-SK
    (required): Huawei Cloud Secret Key
  • X-HW-Security-Token
    (optional): Required when using STS temporary credentials
Additional headers for the ECS step (included only when submitting
intermediate
for Persistent ECS Deployment):
  • X-HW-PROJECT-ID
    : ECS Project ID
  • X-HW-REGION
    : ECS region, such as
    cn-north-4
Credential priority: command-line arguments > environment variables (
HW_ACCESS_KEY
/
HW_SECRET_KEY
/
HW_SECURITY_TOKEN
, compatible with
HUAWEICLOUD_SDK_AK
/
HUAWEICLOUD_SDK_SK
/
HUAWEICLOUD_SDK_SECURITY_TOKEN
and
HW_AK
/
HW_SK
). Never write credentials into a repository.
Submission request body (
Content-Type: application/json
, identical to
/user/submit-activity-work
):
json
{
  "activity_code": "open-capability-2026-1024",
  "milestone": "beginner | intermediate",
  "work_link": "https://xxx.devbridge-s2.hwtunnel.com",
  "api_link": "http://<ECS_EIP>/hc-activity/index.html",
  "summary": "作品说明(可选,≤500 字)"
}
Select fields by milestone:
  • beginner
    (Sandbox Deployment): Submit only
    work_link
    (the sandbox site link).
  • intermediate
    (Persistent ECS Deployment): Submit only
    api_link
    (the ECS public access URL, which must include
    index.html
    , such as
    http://<EIP>/hc-activity/index.html
    ).
Response:
{ "code": "success", "message": "..." }
; a submission is successful when
code === "success"
.

步骤、字段对应、校验与积分

Milestones, Field Mapping, Validation, and Points

两步,必须按顺序提交:
beginner
(沙箱部署)→
intermediate
(ECS 持久化部署);前一步通过后才能提交下一步。
字段/取值对应(重要):后端
milestone
取值沿用旧版
beginner
/
intermediate
(页面文案已改名为“沙箱部署 / ECS 持久化部署”);旧
advanced
步骤已取消,不存在。
页面步骤
milestone
取值
提交字段
沙箱部署
beginner
work_link
ECS 持久化部署
intermediate
api_link
--milestone
同时接受别名:
sandbox
→
beginner
、
ecs
→
intermediate
(脚本自动归一化)。
沙箱域名正则(同前端
SANDBOX_RE
):
^https:\/\/[^/]*devbridge-s2\.hwtunnel\.com(\/|$)
步骤milestone需提交校验成功后积分
沙箱部署
beginner
沙箱站点链接(
work_link
)
沙箱域名1000 分(¥100)
ECS 持久化部署
intermediate
公网访问地址(
api_link
)
http(s)://
开头且含
index.html
(如
http://<EIP>/hc-activity/index.html
)
2000 分(¥200)
There are two steps, and they must be submitted in order:
beginner
(Sandbox Deployment) →
intermediate
(Persistent ECS Deployment). The next step can be submitted only after the previous step succeeds.
Field/value mapping (important): The backend
milestone
values retain the legacy values
beginner
/
intermediate
, even though the page labels have changed to “Sandbox Deployment / Persistent ECS Deployment.” The old
advanced
step has been removed and no longer exists.
Page step
milestone
value
Submission field
Sandbox Deployment
beginner
work_link
Persistent ECS Deployment
intermediate
api_link
--milestone
also accepts aliases:
sandbox
→
beginner
and
ecs
→
intermediate
; the script normalizes them automatically.
Sandbox domain regular expression (the same as the frontend
SANDBOX_RE
):
^https:\/\/[^/]*devbridge-s2\.hwtunnel\.com(\/|$)
StepmilestoneRequired submissionValidationPoints earned on success
Sandbox Deployment
beginner
Sandbox site link (
work_link
)
Sandbox domain1,000 points (¥100)
Persistent ECS Deployment
intermediate
Public access URL (
api_link
)
Must start with
http(s)://
and include
index.html
, such as
http://<EIP>/hc-activity/index.html
2,000 points (¥200)

操作步骤(Agent 执行)

Operation Steps (Agent Execution)

  1. 收集链接:沙箱步骤用公开沙箱域名(
    https://xxx.devbridge-s2.hwtunnel.com
    ,部署后先
    curl -sI <URL>
    验证 200);ECS 步骤用 ECS 公网 HTML 地址(
    http://<EIP>/
    )。
  2. 确定当前步骤:按流程判断——先提交沙箱(
    beginner
    ),沙箱通过后再提交 ECS(
    intermediate
    );只提交当前已完成的步骤。
  3. 校验链接格式:脚本会在提交前自动校验(沙箱域名、
    http(s)://
    前缀与
    index.html
    、说明 ≤500 字);不通过时会打印原因,修正后再提交。
  4. 执行提交:运行
    submit.mjs
    (见下)。参数与步骤字段对应(本 skill 固定使用生产环境接口)。
  5. 回报用户:
    • 成功:提示“提交成功,已获得{沙箱部署 / ECS 持久化部署}对应积分 {1000 / 2000} 分”,并说明该步骤已完成、可继续下一步。
    • 失败:原样反馈接口返回的
      message
      (如
      里程碑参数不合法
      、
      当前里程碑需提交接口地址
      、
      作品链接无效
      、
      缺少请求头 X-HW-AK
      )。
  6. 发布到作品展览馆(用户可选,见下节):
    beginner
    (沙箱部署)提交成功后始终询问用户是否将作品发布到开发者作品展览馆的闯关活动(脚本在此时把发布状态重置为 false);若用户未发布,则在
    intermediate
    (ECS 持久化部署)提交成功后再询问一次;若沙箱阶段已发布(
    galleryPublished=true
    )则 ECS 阶段不再询问。发布成功后运行
    node submit.mjs --gallery-published
    记录状态
    。
  7. 资源清理(全部完成后):
    intermediate
    (ECS 持久化部署)提交成功即
    allCompleted=true
    ,必须用
    question
    工具询问用户是否清理本次活动创建的按量付费资源(选项:全部清理 / 仅删 ECS / 暂不清理),按用户选择执行或跳过;脚本也会在成功输出中打印清理提醒。
  1. Collect links: For the sandbox step, use a public sandbox domain (
    https://xxx.devbridge-s2.hwtunnel.com
    ; after deployment, first run
    curl -sI <URL>
    to verify a 200 response). For the ECS step, use the ECS public HTML address (
    http://<EIP>/
    ).
  2. Determine the current step: Follow the workflow—submit Sandbox (
    beginner
    ) first, then submit ECS (
    intermediate
    ) after Sandbox succeeds; submit only the step that has been completed.
  3. Validate link formats: The script automatically validates before submission (sandbox domain,
    http(s)://
    prefix and
    index.html
    , summary ≤500 characters). If validation fails, it prints the reason; correct the value and submit again.
  4. Submit: Run
    submit.mjs
    (see below). Parameters correspond to the fields for each step; this skill always uses the production submission API.
  5. Report to the user:
    • Success: Notify the user, “Submission successful. {Sandbox Deployment / Persistent ECS Deployment} corresponding points earned: {1000 / 2000},” and explain that the step is complete and the next step can be continued.
    • Failure: Relay the API’s
      message
      verbatim, such as
      Invalid milestone parameter
      ,
      The current milestone requires an API address
      ,
      Invalid work link
      , or
      Missing request header X-HW-AK
      .
  6. Publish to the Works Gallery (optional for the user; see below): After the
    beginner
    (Sandbox Deployment) submission succeeds, always ask the user whether to publish the work to the Challenge Activity in the Developer Works Gallery (the script resets the publication state to
    false
    at this point). If the user has not published the work, ask again after the
    intermediate
    (Persistent ECS Deployment) submission succeeds. If the work was already published during the sandbox stage (
    galleryPublished=true
    ), do not ask again during the ECS stage. After a successful publication, run
    node submit.mjs --gallery-published
    to record the state.
  7. Resource cleanup (after everything is complete): A successful
    intermediate
    (Persistent ECS Deployment) submission sets
    allCompleted=true
    . You must use the
    question
    tool to ask whether the user wants to clean up the pay-as-you-go resources created for this activity (options: clean up all / delete only ECS / do not clean up for now), then execute or skip cleanup according to the user’s choice. The script also prints a cleanup reminder in its successful output.

脚本用法

Script Usage

脚本位于本 skill 目录:
submit.mjs
(纯 Node,Node ≥ 18,无需额外依赖)。
bash
undefined
The script is located in this skill’s directory:
submit.mjs
(pure Node.js, Node ≥ 18, no additional dependencies).
bash
undefined

1) 沙箱部署:提交沙箱域名 URL(milestone=beginner)

1) 沙箱部署:提交沙箱域名 URL(milestone=beginner)

node submit.mjs --milestone beginner
--work-link https://abcd1234-3000.devbridge-s2.hwtunnel.com
--summary "2048 单文件小游戏"
node submit.mjs --milestone beginner
--work-link https://abcd1234-3000.devbridge-s2.hwtunnel.com
--summary "2048 单文件小游戏"

2) ECS 持久化部署:提交公网访问地址(milestone=intermediate;链接需含 index.html;带 ECS 的 Project ID / region)

2) ECS 持久化部署:提交公网访问地址(milestone=intermediate;链接需含 index.html;带 ECS 的 Project ID / region)

node submit.mjs --milestone intermediate
--api-link http://<ECS_EIP>/hc-activity/index.html
--project-id <PROJECT_ID> --region cn-north-4

凭证可通过命令行参数或环境变量提供:

```bash
node submit.mjs --milestone intermediate
--api-link http://<ECS_EIP>/hc-activity/index.html
--project-id <PROJECT_ID> --region cn-north-4

Credentials can be supplied through command-line arguments or environment variables:

```bash

PowerShell

PowerShell

$env:HW_ACCESS_KEY = "<AK>" $env:HW_SECRET_KEY = "<SK>" $env:HW_SECURITY_TOKEN = "<使用 STS 临时凭证时填写>" # 可选
$env:HW_ACCESS_KEY = "<AK>" $env:HW_SECRET_KEY = "<SK>" $env:HW_SECURITY_TOKEN = "<使用 STS 临时凭证时填写>" # 可选

或直接:node submit.mjs --ak <AK> --sk <SK> [--security-token <token>]

或直接:node submit.mjs --ak <AK> --sk <SK> [--security-token <token>]


成功输出示例(实际为多行 JSON):
{ "ok": true, "milestone": "intermediate", "label": "ECS 持久化部署", "points": 2000, "message": "...", "allCompleted": true }
提交成功,已获得ECS 持久化部署对应积分 2000 分。
undefined

Example successful output (the actual output is multiline JSON):
{ "ok": true, "milestone": "intermediate", "label": "ECS 持久化部署", "points": 2000, "message": "...", "allCompleted": true }
提交成功,已获得ECS 持久化部署对应积分 2000 分。
undefined

发布到开发者作品展览馆的闯关活动展示(用户可选)

Publishing to the Challenge Activity in the Developer Works Gallery (Optional for the User)

询问时机:
  • beginner
    (沙箱部署)提交成功后始终询问用户是否发布到作品展览馆(脚本在此时把
    galleryPublished
    重置为 false);
  • 沙箱阶段已发布(运行过
    node submit.mjs --gallery-published
    ,即
    galleryPublished=true
    )→
    intermediate
    (ECS 持久化部署)阶段不再询问;
  • 沙箱阶段未发布(仍为 false)→
    intermediate
    (ECS)提交成功后再询问一次。
是否发布由用户决定——同意才发布,拒绝则跳过、不勉强。发布成功后运行
node submit.mjs --gallery-published
记录状态
。
默认直接提交到此活动:作品默认提交到作品展览馆的「闯关活动」,跳过训练营选择,不再让用户挑营地。
  • 活动名:
    闯关活动
  • trainingCampId
    :
    47d6ba99-fca0-4797-947d-a8776f506df1
  1. 询问用户(用
    question
    工具):是否将作品提交到开发者作品展览馆的闯关活动展示?(用户可选,明确同意才继续;不同意就结束,不要勉强)
  2. 用户同意后,执行:
    bash
    npx skills add https://gitcode.com/Lingxi-HandsOn/gallery.git --skill publish-work-to-gallery -y 2>&1
  3. 该命令会安装
    publish-work-to-gallery
    skill;随后按该 skill 的指引,收集并将用户本地做闯关任务产生的代码(前端、后端等项目的实际目录)推送至开发者作品展览馆的闯关活动。发布时默认使用
    trainingCampId=47d6ba99-fca0-4797-947d-a8776f506df1
    (闯关活动),无需再选择训练营
    。代码目录名不固定,以用户本次实际生成/使用的目录为准,不要假定某个固定仓库名。
  4. 用户不同意则跳过本步骤,直接结束。
注意事项:
  • 询问时机:
    beginner
    (沙箱部署)提交成功后始终询问;若用户未发布,则
    intermediate
    (ECS 持久化部署)提交成功后再询问一次;沙箱阶段已发布(
    galleryPublished=true
    )则 ECS 阶段不再询问(与操作步骤第 6 步、上方「询问时机」一致)。
  • 是否提交展览馆完全由用户决定,用户拒绝则跳过,不得代替用户决定。
  • 执行前先与用户确认或识别闯关任务实际产生的代码目录(前端、后端项目,目录名不固定),只推送相关代码,避免带上无关文件。可由用户指定,或扫描本次工作区中生成的项目目录来确定。
  • 如
    npx skills add
    需要联网/安装,失败时如实反馈错误并让用户决定是否重试。
When to ask:
  • After the
    beginner
    (Sandbox Deployment) submission succeeds, always ask whether to publish the work to the Works Gallery (the script resets
    galleryPublished
    to
    false
    at this point).
  • If the work was already published during the sandbox stage (
    node submit.mjs --gallery-published
    has been run, so
    galleryPublished=true
    ), do not ask again during the
    intermediate
    (Persistent ECS Deployment) stage.
  • If the work was not published during the sandbox stage (the state remains
    false
    ), ask again after the
    intermediate
    (ECS) submission succeeds.
Whether to publish is entirely the user’s decision—proceed only with consent; if the user declines, skip the step without applying pressure. After a successful publication, run
node submit.mjs --gallery-published
to record the state.
Submit directly to this activity by default: By default, the work is submitted to “Challenge Activity” in the Works Gallery, skipping training camp selection. The user is no longer asked to choose a camp.
  • Activity name:
    Challenge Activity
  • trainingCampId
    :
    47d6ba99-fca0-4797-947d-a8776f506df1
  1. Ask the user (using the
    question
    tool): Submit the work for display in the Challenge Activity in the Developer Works Gallery? (This is optional; proceed only with explicit consent. If the user declines, end the process without applying pressure.)
  2. After the user agrees, execute:
    bash
    npx skills add https://gitcode.com/Lingxi-HandsOn/gallery.git --skill publish-work-to-gallery -y 2>&1
  3. This command installs the
    publish-work-to-gallery
    skill. Then follow that skill’s instructions to collect and push the code generated locally by the user for the challenge task (the actual directories of frontend, backend, and other projects) to the Challenge Activity in the Developer Works Gallery. When publishing, use
    trainingCampId=47d6ba99-fca0-4797-947d-a8776f506df1
    by default
    (Challenge Activity); there is no need to select a training camp. Code directory names are not fixed; use the actual directory generated or used in the current task, and do not assume a specific repository name.
  4. If the user declines, skip this step and end the process directly.
Cautions:
  • When to ask: Always ask after the
    beginner
    (Sandbox Deployment) submission succeeds. If the user has not published the work, ask again after the
    intermediate
    (Persistent ECS Deployment) submission succeeds. If the work was already published during the sandbox stage (
    galleryPublished=true
    ), do not ask again during the ECS stage. This is consistent with Step 6 of the operation steps and the “When to ask” section above.
  • Whether to submit to the Gallery is entirely the user’s decision. If the user declines, skip the step; do not make the decision on the user’s behalf.
  • Before execution, confirm with the user or identify the actual code directories generated by the challenge task (frontend and backend projects; directory names are not fixed) and push only the relevant code to avoid including unrelated files. The user may specify the directories, or they can be determined by scanning the project directories generated in the current workspace.
  • If
    npx skills add
    requires network access or installation, report the error truthfully and let the user decide whether to retry.

Prerequisites

Prerequisites

  • Node.js ≥ 18:本 skill 的提交脚本
    submit.mjs
    使用原生
    fetch()
    ,需 Node 18 或以上版本。
  • 华为云 AK/SK:需要有效的 Access Key 和 Secret Key,用于接口鉴权请求头。可选 STS 临时凭证的 SecurityToken。
    • 凭证来源优先级:命令行参数 > 环境变量(
      HW_ACCESS_KEY
      /
      HW_SECRET_KEY
      /
      HW_SECURITY_TOKEN
      ,兼容
      HUAWEICLOUD_SDK_AK
      /
      HUAWEICLOUD_SDK_SK
      /
      HW_AK
      /
      HW_SK
      )。
  • ECS 步骤额外参数:
    intermediate
    (ECS 持久化部署)提交时需提供
    --project-id
    和
    --region
    (或环境变量
    HW_PROJECT_ID
    /
    HW_REGION
    ,或 hcloud 配置)。
  • 网络访问:需能访问提交接口基地址(
    https://open-dataset.huaweicloud.com
    )。
  • 作品链接:
    • 沙箱部署步骤(
      beginner
      ):需已部署的沙箱域名(
      https://xxx.devbridge-s2.hwtunnel.com
      格式)。
    • ECS 持久化部署步骤(
      intermediate
      ):需 ECS 公网访问地址(含
      index.html
      ,如
      http://<EIP>/hc-activity/index.html
      )。
  • 不使用 KooCLI:本 skill 直接通过 HTTP 请求头鉴权调用活动 API,不依赖 hcloud CLI,因此不需要
    --cli-region
    参数。
  • Node.js ≥ 18: This skill’s submission script,
    submit.mjs
    , uses the native
    fetch()
    API and requires Node 18 or later.
  • Huawei Cloud AK/SK: A valid Access Key and Secret Key are required for authentication request headers. SecurityToken is optional when using STS temporary credentials.
    • Credential source priority: command-line arguments > environment variables (
      HW_ACCESS_KEY
      /
      HW_SECRET_KEY
      /
      HW_SECURITY_TOKEN
      , compatible with
      HUAWEICLOUD_SDK_AK
      /
      HUAWEICLOUD_SDK_SK
      /
      HW_AK
      /
      HW_SK
      ).
  • Additional parameters for the ECS step: Submitting
    intermediate
    (Persistent ECS Deployment) requires
    --project-id
    and
    --region
    , or the environment variables
    HW_PROJECT_ID
    /
    HW_REGION
    , or an hcloud configuration.
  • Network access: The submission API base URL (
    https://open-dataset.huaweicloud.com
    ) must be reachable.
  • Work links:
    • Sandbox Deployment step (
      beginner
      ): A deployed sandbox domain is required, in the format
      https://xxx.devbridge-s2.hwtunnel.com
      .
    • Persistent ECS Deployment step (
      intermediate
      ): The ECS public access URL is required and must include
      index.html
      , such as
      http://<EIP>/hc-activity/index.html
      .
  • No KooCLI: This skill calls the activity API directly using HTTP request-header authentication and does not depend on the hcloud CLI, so the
    --cli-region
    parameter is unnecessary.

注意事项

Cautions

  • 只调接口,不做页面操作:不要驱动浏览器、不要模拟点击页面表单。
  • 固定环境、不切换:本 skill 始终使用生产环境;传入
    --env
    /
    --base
    等环境参数会被忽略(不报错、无效果),不会切到其它环境(测试环境请改用
    huawei-activity-submit-test
    )。
  • 顺序提交:步骤必须按
    beginner
    (沙箱)→
    intermediate
    (ECS)依次提交,接口会校验顺序。
  • ECS 步骤附加请求头:
    intermediate
    (ECS 持久化部署)提交时需携带
    X-HW-PROJECT-ID
    (ECS 的 Project ID)与
    X-HW-REGION
    (ECS 的 region);脚本通过
    --project-id
    /
    --region
    (或环境变量
    HW_PROJECT_ID
    /
    HW_REGION
    ,或 hcloud 配置)取值,缺失会报错。
  • 沙箱域名强校验:
    beginner
    步骤的链接必须是
    https://xxx.devbridge-s2.hwtunnel.com
    形式的沙箱域名;
    intermediate
    步骤提交的公网地址必须
    http(s)://
    开头(如
    http://<EIP>/hc-activity/index.html
    ),缺
    index.html
    时脚本会自动补全。
  • 凭证安全:AK/SK(及临时凭证的 SecurityToken)仅用于本次会话,不要写入仓库或提交到版本库;优先用环境变量传入,避免明文出现在命令行历史。
  • SK 明文传输说明:
    X-HW-SK
    以请求头明文传递是活动 API 自身设计(
    /agent/*
    接口要求 AK/SK 头),依赖 HTTPS 传输加密;请勿将 SK 写入仓库、日志或对外分享。
  • 提交不可重复使用:同一地址提交后即与该账户绑定,勿重复提交相同链接。
  • Call APIs only; do not perform page operations: Do not drive a browser or simulate clicking page forms.
  • Fixed environment; never switch: This skill always uses the production environment. Environment parameters such as
    --env
    /
    --base
    are ignored without producing an error or having any effect, and the skill cannot switch to another environment. For the test environment, use
    huawei-activity-submit-test
    instead.
  • Sequential submission: Steps must be submitted in order:
    beginner
    (Sandbox) →
    intermediate
    (ECS). The API validates this order.
  • Additional headers for the ECS step: Submitting
    intermediate
    (Persistent ECS Deployment) requires
    X-HW-PROJECT-ID
    (the ECS Project ID) and
    X-HW-REGION
    (the ECS region). The script obtains these values from
    --project-id
    /
    --region
    , environment variables (
    HW_PROJECT_ID
    /
    HW_REGION
    ), or the hcloud configuration, and reports an error if they are missing.
  • Strict sandbox-domain validation: The link submitted for the
    beginner
    step must be a sandbox domain in the form
    https://xxx.devbridge-s2.hwtunnel.com
    . The public address submitted for
    intermediate
    must start with
    http(s)://
    , such as
    http://<EIP>/hc-activity/index.html
    . The script automatically appends
    index.html
    when it is missing.
  • Credential security: AK/SK credentials and temporary SecurityTokens are used only for the current session. Do not write them into a repository or commit them to version control. Prefer environment variables to avoid exposing plaintext values in command-line history.
  • Plaintext SK transmission: Sending
    X-HW-SK
    as a plaintext request header is part of the activity API’s own design (
    /agent/*
    endpoints require AK/SK headers) and relies on HTTPS transport encryption. Do not write the SK into repositories or logs, or share it externally.
  • Do not submit the same address repeatedly: Once an address has been submitted, it is bound to that account. Do not submit the same link again.

Reference Documents

Reference Documents

  • references/iam-policies.md — IAM 权限说明(本 skill 使用 AK/SK 请求头鉴权,不依赖 IAM 策略)
  • references/verification-method.md — 验证方法(如何端到端验证提交功能)
  • references/acceptance-criteria.md — 验收标准(生产就绪的客观验收条件)
  • references/iam-policies.md — IAM permission details (this skill uses AK/SK request-header authentication and does not depend on IAM policies)
  • references/verification-method.md — Verification methods (how to verify the submission functionality end to end)
  • references/acceptance-criteria.md — Acceptance criteria (objective conditions for production readiness)