Huawei Cloud Open Capabilities Challenge · Work Submission Skill (Production Environment)
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
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: (Sandbox Deployment, 1,000 points) → (Persistent ECS Deployment, 2,000 points).
- AK/SK authentication: Authentication uses the / / request headers and does not depend on the hcloud CLI.
- Additional headers for the ECS step: The submission includes / .
- Pure Node.js script: (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
- 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
| Item | Value |
|---|
| Base URL (production, fixed) | https://open-dataset.huaweicloud.com/api/v1/hdopenservice/agent
|
| Submission | POST {base}/submit-activity-work
|
The frontend page uses
(SSO login session), while the Agent uses
(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):
- (required): Huawei Cloud Access Key
- (required): Huawei Cloud Secret Key
- (optional): Required when using STS temporary credentials
Additional headers for the ECS step (included only when submitting
for Persistent ECS Deployment):
- : ECS Project ID
- : ECS region, such as
Credential priority: command-line arguments > environment variables (
/
/
, compatible with
/
/
HUAWEICLOUD_SDK_SECURITY_TOKEN
and
/
).
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:
- (Sandbox Deployment): Submit only (the sandbox site link).
- (Persistent ECS Deployment): Submit only (the ECS public access URL, which must include , such as
http://<EIP>/hc-activity/index.html
).
Response:
{ "code": "success", "message": "..." }
; a submission is successful when
.
Milestones, Field Mapping, Validation, and Points
There are two steps, and they must be submitted
in order:
(Sandbox Deployment) →
(Persistent ECS Deployment). The next step can be submitted only after the previous step succeeds.
Field/value mapping (important): The backend
values
retain the legacy values /
, even though the page labels have changed to “Sandbox Deployment / Persistent ECS Deployment.” The old
step has been
removed and no longer exists.
| Page step | value | Submission field |
|---|
| Sandbox Deployment | | |
| Persistent ECS Deployment | | |
also accepts aliases:
→
and
→
; the script normalizes them automatically.
Sandbox domain regular expression (the same as the frontend
):
^https:\/\/[^/]*devbridge-s2\.hwtunnel\.com(\/|$)
| Step | milestone | Required submission | Validation | Points earned on success |
|---|
| Sandbox Deployment | | Sandbox site link () | Sandbox domain | 1,000 points (¥100) |
| Persistent ECS Deployment | | Public access URL () | Must start with and include , such as http://<EIP>/hc-activity/index.html
| 2,000 points (¥200) |
Operation Steps (Agent Execution)
- Collect links: For the sandbox step, use a public sandbox domain (
https://xxx.devbridge-s2.hwtunnel.com
; after deployment, first run to verify a 200 response). For the ECS step, use the ECS public HTML address ().
- Determine the current step: Follow the workflow—submit Sandbox () first, then submit ECS () after Sandbox succeeds; submit only the step that has been completed.
- Validate link formats: The script automatically validates before submission (sandbox domain, prefix and , summary ≤500 characters). If validation fails, it prints the reason; correct the value and submit again.
- Submit: Run (see below). Parameters correspond to the fields for each step; this skill always uses the production submission API.
- 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 verbatim, such as
Invalid milestone parameter
, The current milestone requires an API address
, , or Missing request header X-HW-AK
.
- Publish to the Works Gallery (optional for the user; see below): After the (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 at this point). If the user has not published the work, ask again after the (Persistent ECS Deployment) submission succeeds. If the work was already published during the sandbox stage (), do not ask again during the ECS stage. After a successful publication, run
node submit.mjs --gallery-published
to record the state.
- Resource cleanup (after everything is complete): A successful (Persistent ECS Deployment) submission sets . You must use the 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
The script is located in this skill’s directory:
(pure Node.js, Node ≥ 18, no additional dependencies).
bash
# 1) 沙箱部署:提交沙箱域名 URL(milestone=beginner)
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)
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
$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>]
Example successful output (the actual output is multiline JSON):
{
"ok": true,
"milestone": "intermediate",
"label": "ECS 持久化部署",
"points": 2000,
"message": "...",
"allCompleted": true
}
提交成功,已获得ECS 持久化部署对应积分 2000 分。
Publishing to the Challenge Activity in the Developer Works Gallery (Optional for the User)
When to ask:
- After the (Sandbox Deployment) submission succeeds, always ask whether to publish the work to the Works Gallery (the script resets to at this point).
- If the work was already published during the sandbox stage (
node submit.mjs --gallery-published
has been run, so ), do not ask again during the (Persistent ECS Deployment) stage.
- If the work was not published during the sandbox stage (the state remains ), ask again after the (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:
- :
47d6ba99-fca0-4797-947d-a8776f506df1
- Ask the user (using the 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.)
- After the user agrees, execute:
bash
npx skills add https://gitcode.com/Lingxi-HandsOn/gallery.git --skill publish-work-to-gallery -y 2>&1
- This command installs the 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.
- If the user declines, skip this step and end the process directly.
Cautions:
- When to ask: Always ask after the (Sandbox Deployment) submission succeeds. If the user has not published the work, ask again after the (Persistent ECS Deployment) submission succeeds. If the work was already published during the sandbox stage (), 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 requires network access or installation, report the error truthfully and let the user decide whether to retry.
Prerequisites
- Node.js ≥ 18: This skill’s submission script, , uses the native 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 ( / / , compatible with / / / ).
- Additional parameters for the ECS step: Submitting (Persistent ECS Deployment) requires and , or the environment variables / , or an hcloud configuration.
- Network access: The submission API base URL (
https://open-dataset.huaweicloud.com
) must be reachable.
- Work links:
- Sandbox Deployment step (): A deployed sandbox domain is required, in the format
https://xxx.devbridge-s2.hwtunnel.com
.
- Persistent ECS Deployment step (): The ECS public access URL is required and must include , 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 parameter is unnecessary.
Cautions
- 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 / 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: (Sandbox) → (ECS). The API validates this order.
- Additional headers for the ECS step: Submitting (Persistent ECS Deployment) requires (the ECS Project ID) and (the ECS region). The script obtains these values from /, environment variables (/), or the hcloud configuration, and reports an error if they are missing.
- Strict sandbox-domain validation: The link submitted for the step must be a sandbox domain in the form
https://xxx.devbridge-s2.hwtunnel.com
. The public address submitted for must start with , such as http://<EIP>/hc-activity/index.html
. The script automatically appends 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 as a plaintext request header is part of the activity API’s own design ( 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
- 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)