huaweicloud-devkit 1.0.2-next.7 → 1.0.2-next.8

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.
Files changed (91) hide show
  1. package/.agents/plugins/marketplace.json +18 -18
  2. package/LICENSE +201 -201
  3. package/README.md +16 -1
  4. package/README.zh-CN.md +16 -1
  5. package/bin/setup.cjs +5 -3
  6. package/integrations/opencode/opencode.json +1 -4
  7. package/package.json +15 -3
  8. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +3 -16
  9. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +3 -16
  10. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +3 -16
  11. package/plugins/huaweicloud-core/.mcp.json +1 -3
  12. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +3 -16
  13. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  14. package/plugins/huaweicloud-core/safety/policy.json +75 -100
  15. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +41 -13
  16. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +34 -34
  17. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +18 -18
  18. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
  19. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +32 -32
  20. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
  21. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +12 -11
  22. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +64 -17
  23. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
  24. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
  25. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +20 -20
  26. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +39 -30
  27. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
  28. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
  29. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +39 -36
  30. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +15 -4
  31. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
  33. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +40 -39
  34. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
  35. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
  36. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
  37. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
  38. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
  39. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +27 -27
  40. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
  41. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
  42. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +25 -25
  43. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +44 -44
  44. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
  45. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
  46. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
  47. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
  48. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +63 -58
  49. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +39 -39
  50. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +26 -26
  51. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
  52. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +13 -12
  53. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
  54. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
  55. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +18 -18
  56. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
  57. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
  58. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +6 -1
  59. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
  60. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +11 -1
  61. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
  62. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +53 -53
  63. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
  64. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
  65. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +3 -1
  66. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
  67. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
  68. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +33 -33
  69. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
  70. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +39 -4
  71. package/plugins/huaweicloud-core/src/auth/credentials.mjs +12 -4
  72. package/plugins/huaweicloud-core/src/auth/service.mjs +1 -1
  73. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  74. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +16 -7
  75. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  76. package/plugins/huaweicloud-core/src/mcp-server.mjs +0 -1
  77. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +1 -2
  78. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +4 -1
  79. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
  80. package/plugins/huaweicloud-core/src/safety-policy.mjs +122 -68
  81. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +2 -7
  82. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +10 -22
  83. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +30 -9
  84. package/plugins/huaweicloud-core/src/search-market.mjs +46 -12
  85. package/plugins/huaweicloud-core/src/setup-cli.mjs +743 -168
  86. package/plugins/huaweicloud-core/src/tools.mjs +427 -114
  87. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +54 -34
  88. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +1 -5
  89. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +3 -15
  90. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +3 -16
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +37 -31
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-obs
3
- description: "Use when creating, configuring, or managing OBS buckets and objects on Huawei Cloud. Covers bucket creation, lifecycle policies, versioning, static website hosting, CORS, access control (IAM/bucket policy/ACL), cross-region replication, event notifications, and presigned URLs. Triggers on: OBS, bucket, object storage, lifecycle, versioning, static website, CORS, presigned, replication. NOT for: EVS block storage (use huawei-ecs), SFS file storage, CBR backup (use huawei-cbr)."
3
+ description: 'Use when creating, configuring, or managing OBS buckets and objects on Huawei Cloud. Covers bucket creation, lifecycle policies, versioning, static website hosting, CORS, access control (IAM/bucket policy/ACL), cross-region replication, event notifications, and presigned URLs. Triggers on: OBS, bucket, object storage, lifecycle, versioning, static website, CORS, presigned, replication. NOT for: EVS block storage (use huawei-ecs), SFS file storage, CBR backup (use huawei-cbr).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -23,11 +23,11 @@ hcloud OBS help # NOT --help
23
23
  hcloud OBS help <command> # e.g. hcloud OBS help mb
24
24
  ```
25
25
 
26
- | Wrong (API-style) | Correct (obsutil-style) |
27
- |-------------------|-------------------------|
28
- | `OBS CreateBucket` | `OBS mb obs://<bucket>` |
29
- | `OBS PutObject` | `OBS cp <file> obs://<bucket>/` |
30
- | `OBS DeleteBucket` | `OBS rm obs://<bucket> -r` |
26
+ | Wrong (API-style) | Correct (obsutil-style) |
27
+ | ------------------ | ------------------------------- |
28
+ | `OBS CreateBucket` | `OBS mb obs://<bucket>` |
29
+ | `OBS PutObject` | `OBS cp <file> obs://<bucket>/` |
30
+ | `OBS DeleteBucket` | `OBS rm obs://<bucket> -r` |
31
31
 
32
32
  ## Overview
33
33
 
@@ -35,16 +35,16 @@ Domain expertise for Huawei Cloud Object Storage Service (OBS). Covers bucket/ob
35
35
 
36
36
  ## Critical Warnings
37
37
 
38
- | Trap | Why |
39
- |------|-----|
40
- | Bucket name is global | All users share bucket namespace. Always use a unique name: `{prefix}-{timestamp}` (e.g. `mybucket-20260810155048`) |
41
- | Three-layer permissions | IAM > Bucket Policy > ACL. Most restrictive wins |
42
- | Versioning is irreversible | Once enabled, cannot be disabled, only suspended |
43
- | OBS uses AK/SK directly | NOT IAM tokens. Auth errors mean check AK/SK validity |
44
- | Static website via CLI missing | KooCLI OBS lacks website config. Use REST API or console |
45
- | **OBS needs separate cred config** | `hcloud configure` is NOT enough for OBS. Before any OBS operation, call `huaweicloud_setup_obs_config` to sync credentials from hcloud profile. |
46
- | **obsutil interactive prompts** | `cp`/`rm` without `-f` causes "Please input (y/n)" → Agent hangs (TIMEOUT). Always use `-f` for non-interactive. |
47
- | **Directory upload adds prefix** | `cp <dir>/ obs://<bucket>/ -r` puts files under `bucket/<dir>/...`. Use `-flat` for root-level files (static sites). Preview with `-dryRun` first. |
38
+ | Trap | Why |
39
+ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | Bucket name is global | All users share bucket namespace. Always use a unique name: `{prefix}-{timestamp}` (e.g. `mybucket-20260810155048`) |
41
+ | Three-layer permissions | IAM > Bucket Policy > ACL. Most restrictive wins |
42
+ | Versioning is irreversible | Once enabled, cannot be disabled, only suspended |
43
+ | OBS uses AK/SK directly | NOT IAM tokens. Auth errors mean check AK/SK validity |
44
+ | Static website via CLI missing | KooCLI OBS lacks website config. Use REST API or console |
45
+ | **OBS needs separate cred config** | `hcloud configure` is NOT enough for OBS. Before any OBS operation, call `huaweicloud_setup_obs_config` to sync credentials from hcloud profile. |
46
+ | **obsutil interactive prompts** | `cp`/`rm` without `-f` causes "Please input (y/n)" → Agent hangs (TIMEOUT). Always use `-f` for non-interactive. |
47
+ | **Directory upload adds prefix** | `cp <dir>/ obs://<bucket>/ -r` puts files under `bucket/<dir>/...`. Use `-flat` for root-level files (static sites). Preview with `-dryRun` first. |
48
48
 
49
49
  ## OBS Credential Setup (Required Before First Use)
50
50
 
@@ -62,21 +62,21 @@ hcloud OBS config -e=<endpoint> -i=<AK> -k=<SK> -t=token
62
62
 
63
63
  ## Common Workflows
64
64
 
65
- | Task | Command |
66
- |------|---------|
67
- | Create bucket | `hcloud OBS mb obs://<bucket> -location=<region>` |
68
- | List buckets/objects | `hcloud OBS ls [obs://<bucket>]` |
69
- | Upload file | `hcloud OBS cp <file> obs://<bucket>/<key>` |
70
- | Upload directory (recursive) | `hcloud OBS cp <dir>/ obs://<bucket>/ -r -f -flat` |
71
- | Download object | `hcloud OBS cp obs://<bucket>/<key> <local-path>` |
72
- | Set bucket ACL | `hcloud OBS chattri obs://<bucket> -acl=public-read` |
73
- | Set object ACL | `hcloud OBS chattri obs://<bucket>/<key> -acl=public-read` | Bucket ACL does NOT cascade — anonymous reads need both |
74
- | Set lifecycle | `hcloud OBS lifecycle obs://<bucket> -method=put -localfile=<json>` |
75
- | Set bucket policy | `hcloud OBS bucketpolicy obs://<bucket> -method=put -localfile=<json>` |
76
- | Set CORS | `hcloud OBS cors obs://<bucket> -method=put -localfile=<json>` |
77
- | Delete bucket | `hcloud OBS rm obs://<bucket> -r` (must be empty) |
78
- | Presigned URL | `hcloud OBS sign obs://<bucket>/<key> -e=<seconds>` |
79
- | Object metadata | `hcloud OBS stat obs://<bucket>/<key>` |
65
+ | Task | Command |
66
+ | ---------------------------- | ---------------------------------------------------------------------- |
67
+ | Create bucket | `hcloud OBS mb obs://<bucket> -location=<region>` |
68
+ | List buckets/objects | `hcloud OBS ls [obs://<bucket>]` |
69
+ | Upload file | `hcloud OBS cp <file> obs://<bucket>/<key>` |
70
+ | Upload directory (recursive) | `hcloud OBS cp <dir>/ obs://<bucket>/ -r -f -flat` |
71
+ | Download object | `hcloud OBS cp obs://<bucket>/<key> <local-path>` |
72
+ | Set bucket ACL | `hcloud OBS chattri obs://<bucket> -acl=public-read` |
73
+ | Set object ACL | `hcloud OBS chattri obs://<bucket>/<key> -acl=public-read` | Bucket ACL does NOT cascade — anonymous reads need both |
74
+ | Set lifecycle | `hcloud OBS lifecycle obs://<bucket> -method=put -localfile=<json>` |
75
+ | Set bucket policy | `hcloud OBS bucketpolicy obs://<bucket> -method=put -localfile=<json>` |
76
+ | Set CORS | `hcloud OBS cors obs://<bucket> -method=put -localfile=<json>` |
77
+ | Delete bucket | `hcloud OBS rm obs://<bucket> -r` (must be empty) |
78
+ | Presigned URL | `hcloud OBS sign obs://<bucket>/<key> -e=<seconds>` |
79
+ | Object metadata | `hcloud OBS stat obs://<bucket>/<key>` |
80
80
 
81
81
  ## Static Website Deployment Workflow
82
82
 
@@ -94,22 +94,22 @@ See `references/single-file-share.md` for the full workflow to host one file and
94
94
 
95
95
  ## Storage Classes
96
96
 
97
- | Class | Use Case | Min Storage | Retrieval Fee |
98
- |-------|----------|-------------|---------------|
99
- | STANDARD | Frequently accessed | None | No |
100
- | STANDARD_IA | Infrequent access | 30 days | Yes |
101
- | ARCHIVE | Long-term archive | 90 days | Yes (hours) |
97
+ | Class | Use Case | Min Storage | Retrieval Fee |
98
+ | ----------- | ------------------- | ----------- | ------------- |
99
+ | STANDARD | Frequently accessed | None | No |
100
+ | STANDARD_IA | Infrequent access | 30 days | Yes |
101
+ | ARCHIVE | Long-term archive | 90 days | Yes (hours) |
102
102
 
103
103
  ## Troubleshooting
104
104
 
105
- | Error | Root Cause -> Fix |
106
- |-------|------------------|
107
- | AccessDenied on bucket | IAM/bucket policy/ACL conflict -> Check all three layers |
108
- | BucketAlreadyExists | Name taken globally -> Generate unique name with timestamp suffix: `{prefix}-{yyyymmddHHMMSS}` |
109
- | NoSuchKey | Object doesn't exist or wrong region -> Verify key and region |
110
- | InvalidAccessKeyId | OBS uses AK/SK directly -> Verify AK/SK validity, OBS endpoint, OBS permissions |
111
- | EntityTooLarge | Single PUT limit 5GB -> Use multipart upload |
112
- | OBS --help fails | KooCLI OBS uses `help` not `--help` -> Run `hcloud OBS help` |
105
+ | Error | Root Cause -> Fix |
106
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
107
+ | AccessDenied on bucket | IAM/bucket policy/ACL conflict -> Check all three layers |
108
+ | BucketAlreadyExists | Name taken globally -> Generate unique name with timestamp suffix: `{prefix}-{yyyymmddHHMMSS}` |
109
+ | NoSuchKey | Object doesn't exist or wrong region -> Verify key and region |
110
+ | InvalidAccessKeyId | OBS uses AK/SK directly -> Verify AK/SK validity, OBS endpoint, OBS permissions |
111
+ | EntityTooLarge | Single PUT limit 5GB -> Use multipart upload |
112
+ | OBS --help fails | KooCLI OBS uses `help` not `--help` -> Run `hcloud OBS help` |
113
113
  | Configuration file is not well-formed | `~/.obsutilconfig` was generated by a non-standard path (CRLF line endings or field-order differences). Even `hcloud OBS --help` fails. Rebuild it with `hcloud OBS config -e=<endpoint> -i=<AK> -k=<SK>` (or `huaweicloud_setup_obs_config`) -> retry |
114
114
 
115
115
  ## Security Considerations
@@ -4,14 +4,14 @@ From Huawei Cloud marketplace best practices.
4
4
 
5
5
  ## Naming Rules
6
6
 
7
- | Rule | Detail |
8
- |------|--------|
9
- | Length | 3-63 characters |
10
- | Characters | Lowercase letters, numbers, `-`, `.` |
11
- | No IP format | Cannot be IP address pattern |
12
- | No leading/trailing `-` or `.` | Start and end must be alphanumeric |
13
- | No `..` | Adjacent dots forbidden |
14
- | No `-.` or `.-` | Adjacent dot-hyphen combos forbidden |
7
+ | Rule | Detail |
8
+ | ------------------------------ | ------------------------------------ |
9
+ | Length | 3-63 characters |
10
+ | Characters | Lowercase letters, numbers, `-`, `.` |
11
+ | No IP format | Cannot be IP address pattern |
12
+ | No leading/trailing `-` or `.` | Start and end must be alphanumeric |
13
+ | No `..` | Adjacent dots forbidden |
14
+ | No `-.` or `.-` | Adjacent dot-hyphen combos forbidden |
15
15
 
16
16
  ## Create Bucket
17
17
 
@@ -19,11 +19,11 @@ From Huawei Cloud marketplace best practices.
19
19
  hcloud OBS mb obs://<bucket> [-acl=xxx] [-location=<r>] [-sc=xxx]
20
20
  ```
21
21
 
22
- | Option | Values | Default |
23
- |--------|--------|---------|
24
- | `-acl` | private, public-read, public-read-write | private |
25
- | `-location` | cn-south-1, cn-north-4, ... | config default |
26
- | `-sc` | standard, warm, cold, deep-archive | standard |
22
+ | Option | Values | Default |
23
+ | ----------- | --------------------------------------- | -------------- |
24
+ | `-acl` | private, public-read, public-read-write | private |
25
+ | `-location` | cn-south-1, cn-north-4, ... | config default |
26
+ | `-sc` | standard, warm, cold, deep-archive | standard |
27
27
 
28
28
  ## Quick Verify
29
29
 
@@ -34,12 +34,12 @@ hcloud OBS stat obs://<bucket>
34
34
 
35
35
  ## Storage Class Guide
36
36
 
37
- | Class | Access Frequency | Min Storage | Retrieval Cost |
38
- |-------|-----------------|-------------|----------------|
39
- | standard | Frequent | None | No |
40
- | warm | Infrequent | 30 days | Yes |
41
- | cold | Rare | 90 days | Yes |
42
- | deep-archive | Archive | 180 days | Yes |
37
+ | Class | Access Frequency | Min Storage | Retrieval Cost |
38
+ | ------------ | ---------------- | ----------- | -------------- |
39
+ | standard | Frequent | None | No |
40
+ | warm | Infrequent | 30 days | Yes |
41
+ | cold | Rare | 90 days | Yes |
42
+ | deep-archive | Archive | 180 days | Yes |
43
43
 
44
44
  ## Critical Rules
45
45
 
@@ -3,24 +3,29 @@
3
3
  > KooCLI OBS uses obsutil-style commands. `OBS CreateBucket` → `OBS mb`. `SetBucketWebsite` is NOT supported in KooCLI OBS (use API/SDK).
4
4
 
5
5
  ## Create Bucket
6
+
6
7
  hcloud OBS mb obs://<bucket> -location=<region>
7
8
 
8
9
  ## Lifecycle Rules (JSON)
10
+
9
11
  {
10
- "Rules": [{
11
- "ID": "move-to-ia-after-30d",
12
- "Status": "Enabled",
13
- "Filter": {"Prefix": ""},
14
- "Transitions": [{"Days": 30, "StorageClass": "STANDARD_IA"}],
15
- "Expiration": {"Days": 365}
16
- }]
12
+ "Rules": [{
13
+ "ID": "move-to-ia-after-30d",
14
+ "Status": "Enabled",
15
+ "Filter": {"Prefix": ""},
16
+ "Transitions": [{"Days": 30, "StorageClass": "STANDARD_IA"}],
17
+ "Expiration": {"Days": 365}
18
+ }]
17
19
  }
18
20
 
19
21
  ## Apply
22
+
20
23
  hcloud OBS lifecycle obs://<bucket> -method=put -localfile=<lifecycle.json>
21
24
 
22
25
  ## Static Website
26
+
23
27
  Not available via KooCLI OBS CLI. Use `hcloud OBS chattri obs://<bucket> -acl=public-read` for bucket ACL, or use API/SDK for website configuration.
24
28
 
25
29
  ## Cross-Region Replication
30
+
26
31
  Requires: source bucket versioning enabled, destination bucket in different region, replication IAM role.
@@ -6,13 +6,13 @@
6
6
 
7
7
  OBS 使用 **obsutil-style** 子命令,不是 API-style 操作名:
8
8
 
9
- | 错误写法(API-style) | 正确写法(obsutil-style) |
10
- |----------------------|--------------------------|
11
- | `OBS --help` | `hcloud OBS help`(无 `--`,`help` 是子命令) |
12
- | `OBS CreateBucket` | `hcloud OBS mb obs://<bucket>` |
13
- | `OBS PutObject` | `hcloud OBS cp <file> obs://<bucket>/` |
14
- | `OBS DeleteBucket` | `hcloud OBS rm obs://<bucket> -r` |
15
- | `OBS ListBuckets` | `hcloud OBS ls` |
9
+ | 错误写法(API-style) | 正确写法(obsutil-style) |
10
+ | --------------------- | --------------------------------------------- |
11
+ | `OBS --help` | `hcloud OBS help`(无 `--`,`help` 是子命令) |
12
+ | `OBS CreateBucket` | `hcloud OBS mb obs://<bucket>` |
13
+ | `OBS PutObject` | `hcloud OBS cp <file> obs://<bucket>/` |
14
+ | `OBS DeleteBucket` | `hcloud OBS rm obs://<bucket> -r` |
15
+ | `OBS ListBuckets` | `hcloud OBS ls` |
16
16
 
17
17
  ## 独立凭证配置
18
18
 
@@ -45,6 +45,7 @@ hcloud OBS config -i
45
45
  ```
46
46
 
47
47
  **规避方法**:
48
+
48
49
  1. 先 `-dryRun` 预览实际键名,再执行真实上传
49
50
  2. 或先将本地目录重命名为目标前缀名,如 `mv devkit/ root/` 后上传 `root/`
50
51
  3. 或使用 `-flat` 参数(如支持)
@@ -60,11 +61,11 @@ KooCLI OBS **不支持** `SetBucketWebsite` 命令。配置静态网站托管需
60
61
 
61
62
  ## 权限模型(三层)
62
63
 
63
- | 层级 | 作用域 | 优先级 |
64
- |------|--------|--------|
65
- | IAM Policy | 用户/用户组 | 最高 |
66
- | Bucket Policy | 桶级 | 中 |
67
- | ACL | 对象级 | 最低 |
64
+ | 层级 | 作用域 | 优先级 |
65
+ | ------------- | ----------- | ------ |
66
+ | IAM Policy | 用户/用户组 | 最高 |
67
+ | Bucket Policy | 桶级 | 中 |
68
+ | ACL | 对象级 | 最低 |
68
69
 
69
70
  **关键规则**:三层中**最严格**的生效。Bucket Policy 设为 public-read,但 IAM deny 了 → 结果是 deny。
70
71
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Host one file and get a shareable link in seconds. Two options:
4
4
 
5
- | Option | Link type | Bucket/object visibility | Expiry |
6
- |--------|-----------|--------------------------|--------|
7
- | Presigned URL | Time-limited private link | Keep private | `-e=<seconds>`, max 7 days |
8
- | Public URL | Permanent public link | Set object `-acl=public-read` | None |
5
+ | Option | Link type | Bucket/object visibility | Expiry |
6
+ | ------------- | ------------------------- | ----------------------------- | -------------------------- |
7
+ | Presigned URL | Time-limited private link | Keep private | `-e=<seconds>`, max 7 days |
8
+ | Public URL | Permanent public link | Set object `-acl=public-read` | None |
9
9
 
10
10
  ## Option 1: Presigned URL (private, time-limited)
11
11
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-rds
3
- description: "Use when creating, configuring, managing, or troubleshooting RDS instances on Huawei Cloud. Covers MySQL, PostgreSQL, SQL Server. Triggers: RDS, MySQL, PostgreSQL, database instance, backup, read replica. NOT for: GaussDB (use huawei-gaussdb), DDS (use huawei-dds-dcs)."
3
+ description: 'Use when creating, configuring, managing, or troubleshooting RDS instances on Huawei Cloud. Covers MySQL, PostgreSQL, SQL Server. Triggers: RDS, MySQL, PostgreSQL, database instance, backup, read replica. NOT for: GaussDB (use huawei-gaussdb), DDS (use huawei-dds-dcs).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -13,6 +13,7 @@ Always run `hcloud RDS <Operation> --help` before constructing commands to disco
13
13
  ## Prerequisites
14
14
 
15
15
  Before creating an RDS instance, you MUST have:
16
+
16
17
  - A VPC and subnet (see `huawei-vpc`)
17
18
  - A security group with database port open (MySQL=3306, PostgreSQL=5432, SQL Server=1433)
18
19
  - Run `hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>` to get spec codes
@@ -23,32 +24,33 @@ Before creating an RDS instance, you MUST have:
23
24
  hcloud RDS <Operation> --cli-region=<region> [--key=value ...]
24
25
  ```
25
26
 
26
- | Rule | Detail |
27
- |------|--------|
28
- | Service name | `RDS` (uppercase) |
29
- | Operation | PascalCase: `ListInstances`, `CreateManualBackup` |
30
- | Params | `--key=value` format. JSON params: `--key='{"k":"v"}'` |
31
- | Array params | 1-based: `--instance_ids.1=xxx` |
27
+ | Rule | Detail |
28
+ | -------------- | --------------------------------------------------------------------------------- |
29
+ | Service name | `RDS` (uppercase) |
30
+ | Operation | PascalCase: `ListInstances`, `CreateManualBackup` |
31
+ | Params | `--key=value` format. JSON params: `--key='{"k":"v"}'` |
32
+ | Array params | 1-based: `--instance_ids.1=xxx` |
32
33
  | Password param | Conflicts with KooCLI system param; use `--cli-jsonInput` (see Critical Warnings) |
33
34
 
34
35
  ## Critical Warnings
35
36
 
36
- | Trap | Why |
37
- |------|-----|
38
- | Engine version immutable | Cannot change MySQL to PostgreSQL in-place |
39
- | Automated backups use OBS | Backup storage incurs separate charges. Set retention period explicitly |
40
- | Storage auto-scaling off by default | Enable before storage runs out or instance goes read-only |
41
- | `--password` conflicts with KooCLI | Use `--cli-jsonInput=<file>` with JSON file (see `--cli-jsonInput` section below). The `printf "b\n"` workaround is broken in KooCLI 7.2.12+ |
42
- | Volume type must match flavor | General→CLOUDSSD; Dedicated→CLOUDSSD\|ESSD; ARM→ULTRAHIGH |
43
- | Flavor not in region | Always `ListFlavors` first. Spec codes vary by region |
44
- | `database_name` is case-sensitive | Use `MySQL` / `PostgreSQL` / `SQLServer` / `MariaDB` — NOT lower-case `mysql` |
45
- | Instance creation takes 3–8 min | Status: BUILD→MODIFYING→ACTIVE. Poll every 15s: `hcloud RDS ListInstances --cli-region=<r> --instance_id=<id> \| jq '.instances[0].status'` |
46
- | Body `--region` is required | CreateInstance body requires `--region=<r>` (same as `--cli-region`) or `DBS.280243` |
47
- | Restore creates new instance | No in-place restore. Verify target flavor before restoring |
37
+ | Trap | Why |
38
+ | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | Engine version immutable | Cannot change MySQL to PostgreSQL in-place |
40
+ | Automated backups use OBS | Backup storage incurs separate charges. Set retention period explicitly |
41
+ | Storage auto-scaling off by default | Enable before storage runs out or instance goes read-only |
42
+ | `--password` conflicts with KooCLI | Use `--cli-jsonInput=<file>` with JSON file (see `--cli-jsonInput` section below). The `printf "b\n"` workaround is broken in KooCLI 7.2.12+ |
43
+ | Volume type must match flavor | General→CLOUDSSD; Dedicated→CLOUDSSD\|ESSD; ARM→ULTRAHIGH |
44
+ | Flavor not in region | Always `ListFlavors` first. Spec codes vary by region |
45
+ | `database_name` is case-sensitive | Use `MySQL` / `PostgreSQL` / `SQLServer` / `MariaDB` — NOT lower-case `mysql` |
46
+ | Instance creation takes 3–8 min | Status: BUILD→MODIFYING→ACTIVE. Poll every 15s: `hcloud RDS ListInstances --cli-region=<r> --instance_id=<id> \| jq '.instances[0].status'` |
47
+ | Body `--region` is required | CreateInstance body requires `--region=<r>` (same as `--cli-region`) or `DBS.280243` |
48
+ | Restore creates new instance | No in-place restore. Verify target flavor before restoring |
48
49
 
49
50
  ## Instance Management
50
51
 
51
52
  ### List
53
+
52
54
  ```bash
53
55
  hcloud RDS ListInstances --cli-region=<r>
54
56
  hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>
@@ -57,6 +59,7 @@ hcloud RDS ListEngineFlavors --instance_id=<id> --cli-region=<r>
57
59
  ```
58
60
 
59
61
  ### Create Instance
62
+
60
63
  ```bash
61
64
  hcloud RDS CreateInstance --cli-region=<r> \
62
65
  --region=<r> \
@@ -101,21 +104,22 @@ hcloud RDS CreateInstance --cli-region=<r> \
101
104
 
102
105
  > Save as `rds-create.json` then: `hcloud RDS CreateInstance --cli-jsonInput=rds-create.json`. For `project_id`, run `hcloud IAM KeystoneListProjects`.
103
106
 
104
- | Param | Required | Note |
105
- |-------|----------|------|
106
- | `--name` | Yes | Instance name |
107
- | `--datastore` | Yes | `--datastore.type=<engine> --datastore.version=<version>` |
108
- | `--flavor_ref` | Yes | From `ListFlavors` output |
109
- | `--volume` | Yes | Type matching: General→CLOUDSSD, Dedicated→CLOUDSSD\|ESSD, ARM→ULTRAHIGH |
110
- | `--vpc_id` | Yes | Must exist in target region |
111
- | `--subnet_id` | Yes | Must exist in target region |
112
- | `--security_group_id` | Yes | Must have DB port open |
113
- | `--availability_zone` | Yes | Use AZ code from `NovaListAvailabilityZones` |
114
- | `--charge_info` | No | `--charge_info.charge_mode=<mode>`. Default postPaid (pay-per-use). Run `--help` for options |
115
- | `--password` | Yes | 8-32 chars, uppercase+lowercase+digit+special |
116
- | `--port` | No | Default 3306 (MySQL) / 5432 (PG) / 1433 (SQL Server) |
107
+ | Param | Required | Note |
108
+ | --------------------- | -------- | -------------------------------------------------------------------------------------------- |
109
+ | `--name` | Yes | Instance name |
110
+ | `--datastore` | Yes | `--datastore.type=<engine> --datastore.version=<version>` |
111
+ | `--flavor_ref` | Yes | From `ListFlavors` output |
112
+ | `--volume` | Yes | Type matching: General→CLOUDSSD, Dedicated→CLOUDSSD\|ESSD, ARM→ULTRAHIGH |
113
+ | `--vpc_id` | Yes | Must exist in target region |
114
+ | `--subnet_id` | Yes | Must exist in target region |
115
+ | `--security_group_id` | Yes | Must have DB port open |
116
+ | `--availability_zone` | Yes | Use AZ code from `NovaListAvailabilityZones` |
117
+ | `--charge_info` | No | `--charge_info.charge_mode=<mode>`. Default postPaid (pay-per-use). Run `--help` for options |
118
+ | `--password` | Yes | 8-32 chars, uppercase+lowercase+digit+special |
119
+ | `--port` | No | Default 3306 (MySQL) / 5432 (PG) / 1433 (SQL Server) |
117
120
 
118
121
  ### Modify / Resize
122
+
119
123
  ```bash
120
124
  hcloud RDS StartInstanceRestartAction --instance_id=<id> --cli-region=<r>
121
125
  hcloud RDS StartResizeFlavorAction --instance_id=<id> --flavor_ref=<new-id> --cli-region=<r>
@@ -125,6 +129,7 @@ hcloud RDS UpdateInstanceAlias --instance_id=<id> --alias=<new-name> --cli-regio
125
129
  ```
126
130
 
127
131
  ### Delete
132
+
128
133
  ```bash
129
134
  hcloud RDS DeleteInstance --instance_id=<id> --cli-region=<r>
130
135
  ```
@@ -172,41 +177,41 @@ psql -h <private_ip> -p 5432 -U root -d postgres
172
177
 
173
178
  If a database client is not installed on the agent's machine, install one:
174
179
 
175
- | Platform | MySQL | PostgreSQL |
176
- |----------|-------|------------|
177
- | **Linux** | `apt install mysql-client` / `yum install mysql` | `apt install postgresql-client` |
178
- | **macOS** | `brew install mysql-client` | `brew install libpq` |
179
- | **Windows** | Download MySQL Workbench or `winget install Oracle.MySQL` | Download pgAdmin or `winget install PostgreSQL.PostgreSQL` |
180
+ | Platform | MySQL | PostgreSQL |
181
+ | ---------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
182
+ | **Linux** | `apt install mysql-client` / `yum install mysql` | `apt install postgresql-client` |
183
+ | **macOS** | `brew install mysql-client` | `brew install libpq` |
184
+ | **Windows** | Download MySQL Workbench or `winget install Oracle.MySQL` | Download pgAdmin or `winget install PostgreSQL.PostgreSQL` |
180
185
  | **Python (any)** | `pip install pymysql` then `python -c "import pymysql; ..."` | `pip install psycopg2` then `python -c "import psycopg2; ..."` |
181
- | **Docker (any)** | `docker run -it --rm mysql:8 mysql -h <ip> -u root -p` | `docker run -it --rm postgres:16 psql -h <ip> -U root` |
186
+ | **Docker (any)** | `docker run -it --rm mysql:8 mysql -h <ip> -u root -p` | `docker run -it --rm postgres:16 psql -h <ip> -U root` |
182
187
 
183
188
  > If no client can be installed, use the Huawei Cloud **Data Studio** console: https://console.huaweicloud.com/dms/
184
189
 
185
190
  ## Mutating Operations (Require Approval)
186
191
 
187
- | Operation | Effect |
188
- |-----------|--------|
189
- | `CreateInstance` | New instance (billing starts) |
190
- | `DeleteInstance` | Irreversible data loss |
191
- | `StartResizeFlavorAction` | Brief interruption during switchover |
192
- | `StartInstanceEnlargeVolumeAction` | Online, but irreversible |
193
- | `StartFailover` | Primary-standby switchover |
194
- | `CreateRestoreInstance` | Creates new instance from backup |
195
- | `CreateManualBackup` | Incurs OBS storage charges |
196
- | `DeleteManualBackup` | Irreversible |
192
+ | Operation | Effect |
193
+ | ---------------------------------- | ------------------------------------ |
194
+ | `CreateInstance` | New instance (billing starts) |
195
+ | `DeleteInstance` | Irreversible data loss |
196
+ | `StartResizeFlavorAction` | Brief interruption during switchover |
197
+ | `StartInstanceEnlargeVolumeAction` | Online, but irreversible |
198
+ | `StartFailover` | Primary-standby switchover |
199
+ | `CreateRestoreInstance` | Creates new instance from backup |
200
+ | `CreateManualBackup` | Incurs OBS storage charges |
201
+ | `DeleteManualBackup` | Irreversible |
197
202
 
198
203
  ## Troubleshooting
199
204
 
200
- | Error | Root Cause -> Fix |
201
- |-------|-------------------|
202
- | Connection refused | SG missing DB port. Add ingress rule |
203
- | Storage full | Manual resize or enable auto-scaling |
204
- | DBS.280241 Invalid storage type | Volume type doesn't match flavor group |
205
- | DBS.280448 Sold out | Try different volume type or AZ |
206
- | Replication lag | Check `ShowReplicationStatus`. Consider read replica |
207
- | Instance stuck BUILDING | Check task status: `hcloud RDS ListTasks` |
208
- | SYS.0403 | SCP policy denies this operation (e.g. security group rules, EIP binding). See `huawei-vpc` troubleshooting |
209
- | EIP.7905 | EIP quota exceeded — cannot create new EIP for public access. See `huawei-vpc` troubleshooting |
205
+ | Error | Root Cause -> Fix |
206
+ | ------------------------------- | ----------------------------------------------------------------------------------------------------------- |
207
+ | Connection refused | SG missing DB port. Add ingress rule |
208
+ | Storage full | Manual resize or enable auto-scaling |
209
+ | DBS.280241 Invalid storage type | Volume type doesn't match flavor group |
210
+ | DBS.280448 Sold out | Try different volume type or AZ |
211
+ | Replication lag | Check `ShowReplicationStatus`. Consider read replica |
212
+ | Instance stuck BUILDING | Check task status: `hcloud RDS ListTasks` |
213
+ | SYS.0403 | SCP policy denies this operation (e.g. security group rules, EIP binding). See `huawei-vpc` troubleshooting |
214
+ | EIP.7905 | EIP quota exceeded — cannot create new EIP for public access. See `huawei-vpc` troubleshooting |
210
215
 
211
216
  ## Security
212
217
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: huawei-sandbox
3
- description: "Use when creating, connecting, or managing Huawei Cloud Sandbox instances and workspace terminals, or when a task needs a temporary runtime to deploy, run, or preview a web application. Covers sandbox lifecycle (check-user, sign-agreement, connect, release), session-based terminal execution, and credential injection. Triggers on: sandbox, workspace, terminal, web app deployment, deploy web app, preview app, deploy github, github repo, deploy repo, website, static site, web application, hwlink, devstation, hdkitservice, remote exec. NOT for: ECS instances (use huawei-ecs), CCE clusters (use huawei-cce)."
3
+ description: 'Use when creating, connecting, or managing Huawei Cloud Sandbox instances and workspace terminals, or when a task needs a temporary runtime to deploy, run, or preview a web application. Covers sandbox lifecycle (check-user, sign-agreement, connect, release), session-based terminal execution, and credential injection. Triggers on: sandbox, workspace, terminal, web app deployment, deploy web app, preview app, deploy github, github repo, deploy repo, website, static site, web application, hwlink, devstation, hdkitservice, remote exec. NOT for: ECS instances (use huawei-ecs), CCE clusters (use huawei-cce).'
4
4
  version: 1
5
5
  ---
6
6
 
@@ -26,25 +26,25 @@ Domain expertise for Huawei Cloud Sandbox (DevStation) instances and workspace t
26
26
 
27
27
  ### User Verification (Prerequisites)
28
28
 
29
- | Tool | Purpose |
30
- |------|---------|
31
- | `huaweicloud_sandbox_check_user` | Check real-name verification and agreement signing status |
29
+ | Tool | Purpose |
30
+ | ------------------------------------ | ----------------------------------------------------------- |
31
+ | `huaweicloud_sandbox_check_user` | Check real-name verification and agreement signing status |
32
32
  | `huaweicloud_sandbox_sign_agreement` | Sign unsigned/outdated agreements (required before connect) |
33
33
 
34
34
  ### Sandbox Lifecycle
35
35
 
36
- | Tool | Purpose |
37
- |------|---------|
38
- | `huaweicloud_sandbox_connect` | Connect to sandbox (one user one instance, reuses existing if available) |
39
- | `huaweicloud_sandbox_credentials` | Inject temporary AK/SK into a running sandbox |
36
+ | Tool | Purpose |
37
+ | --------------------------------- | ------------------------------------------------------------------------ |
38
+ | `huaweicloud_sandbox_connect` | Connect to sandbox (one user one instance, reuses existing if available) |
39
+ | `huaweicloud_sandbox_credentials` | Inject temporary AK/SK into a running sandbox |
40
40
 
41
41
  ### Terminal Execution
42
42
 
43
- | Tool | Purpose |
44
- |------|---------|
45
- | `huaweicloud_sandbox_exec_with_session` | Session-based execution (state persists) |
46
- | `huaweicloud_sandbox_upload_file` | Upload a local file into the sandbox (chunked base64 write + md5 verify) |
47
- | `huaweicloud_sandbox_close_session` | Close a persistent terminal session |
43
+ | Tool | Purpose |
44
+ | --------------------------------------- | ------------------------------------------------------------------------ |
45
+ | `huaweicloud_sandbox_exec_with_session` | Session-based execution (state persists) |
46
+ | `huaweicloud_sandbox_upload_file` | Upload a local file into the sandbox (chunked base64 write + md5 verify) |
47
+ | `huaweicloud_sandbox_close_session` | Close a persistent terminal session |
48
48
 
49
49
  ## Workflow
50
50
 
@@ -74,11 +74,11 @@ There is no general file-upload primitive on the sandbox service itself. Get loc
74
74
 
75
75
  `huaweicloud_sandbox_exec_with_session` is fragile for long commands and large inline content. Do NOT paste a file's base64 directly into a single command:
76
76
 
77
- | Payload | Result |
78
- |---------|--------|
79
- | ~30KB base64 in one command | exec timeout |
77
+ | Payload | Result |
78
+ | --------------------------- | -------------------------------------- |
79
+ | ~30KB base64 in one command | exec timeout |
80
80
  | ~12KB base64 in one command | session crash (`session is not ready`) |
81
- | ~4–5KB normal command | OK |
81
+ | ~4–5KB normal command | OK |
82
82
 
83
83
  Keep individual exec commands small (≤ ~4KB). For larger content, use `huaweicloud_sandbox_upload_file` instead.
84
84
 
@@ -133,20 +133,20 @@ sleep 10 && cat /tmp/host.log
133
133
 
134
134
  ## Critical Warnings
135
135
 
136
- | Trap | Why |
137
- |------|-----|
138
- | Agreement required first | `sandbox_connect` fails if the agreement isn't signed; the `sandbox_check_user` preflight detects this, so surface it to the developer only when signing is needed |
139
- | Real-name required | `sandbox_connect` fails if `realnameVerified=false`; tell the developer once and stop, don't loop on connect |
140
- | Never expose tunnel details | Do not mention "DevBridge"/"tunnel"/"devbridge" to the developer — say "正在生成访问地址..." and hand over only the URL |
141
- | Login needs `--huaweicloud` | `devbridge auth login --access-key/--secret-key` without `--huaweicloud` falls back to interactive browser login, which fails in the sandbox |
142
- | CLI PATH | The installer only writes `~/.bashrc`; run `export PATH=$PATH:$HOME/.huawei/bin` in the session before using `devbridge` |
143
- | Never install tunnel tooling locally | If the sandbox cannot install it, report a generic error and stop — installing on the developer's machine defeats sandbox deployment |
144
- | Return the deployment URL | Always hand the public URL from the host log to the developer as the final result |
145
- | Session state persists | `exec_with_session` preserves `cd`, env vars, aliases between calls |
146
- | Destructive commands blocked | `rm -rf /`, `mkfs`, `dd if=`, fork bombs are denied by safety policy |
147
- | Workspace ID = dev_stage_id | Use `dev_stage_id` from `sandbox_connect` as `workspace_id` for terminal exec |
148
- | Projects live in `/workspace` | Clone/install project code under `/workspace/<repo-name>` (filesystem-root workspace mount, not `$HOME/workspace`), never in `/tmp` — ephemeral locations lose the project when the sandbox session restarts |
149
- | Node.js >= 22 required | Sandbox terminal uses built-in WebSocket (globalThis.WebSocket); if Node.js is missing, install it from the Huawei Cloud mirror (see "Node.js in the sandbox") |
136
+ | Trap | Why |
137
+ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
138
+ | Agreement required first | `sandbox_connect` fails if the agreement isn't signed; the `sandbox_check_user` preflight detects this, so surface it to the developer only when signing is needed |
139
+ | Real-name required | `sandbox_connect` fails if `realnameVerified=false`; tell the developer once and stop, don't loop on connect |
140
+ | Never expose tunnel details | Do not mention "DevBridge"/"tunnel"/"devbridge" to the developer — say "正在生成访问地址..." and hand over only the URL |
141
+ | Login needs `--huaweicloud` | `devbridge auth login --access-key/--secret-key` without `--huaweicloud` falls back to interactive browser login, which fails in the sandbox |
142
+ | CLI PATH | The installer only writes `~/.bashrc`; run `export PATH=$PATH:$HOME/.huawei/bin` in the session before using `devbridge` |
143
+ | Never install tunnel tooling locally | If the sandbox cannot install it, report a generic error and stop — installing on the developer's machine defeats sandbox deployment |
144
+ | Return the deployment URL | Always hand the public URL from the host log to the developer as the final result |
145
+ | Session state persists | `exec_with_session` preserves `cd`, env vars, aliases between calls |
146
+ | Destructive commands blocked | `rm -rf /`, `mkfs`, `dd if=`, fork bombs are denied by safety policy |
147
+ | Workspace ID = dev_stage_id | Use `dev_stage_id` from `sandbox_connect` as `workspace_id` for terminal exec |
148
+ | Projects live in `/workspace` | Clone/install project code under `/workspace/<repo-name>` (filesystem-root workspace mount, not `$HOME/workspace`), never in `/tmp` — ephemeral locations lose the project when the sandbox session restarts |
149
+ | Node.js >= 22 required | Sandbox terminal uses built-in WebSocket (globalThis.WebSocket); if Node.js is missing, install it from the Huawei Cloud mirror (see "Node.js in the sandbox") |
150
150
 
151
151
  ## Node.js in the sandbox
152
152
 
@@ -163,11 +163,11 @@ node --version
163
163
 
164
164
  ## Environment Variables
165
165
 
166
- | Variable | Required | Description |
167
- |----------|----------|-------------|
168
- | `HW_ACCESS_KEY` | Yes | Huawei Cloud AK |
169
- | `HW_SECRET_KEY` | Yes | Huawei Cloud SK |
170
- | `HW_SECURITY_TOKEN` | No | STS security token |
171
- | `HW_WORKSPACE_ID` | No | Default workspace ID |
172
- | `HDKITSERVICE_ENDPOINT` | No | hdkitservice API endpoint |
173
- | `HWLINK_ENDPOINT` | No | DevStation API endpoint |
166
+ | Variable | Required | Description |
167
+ | ----------------------- | -------- | ------------------------- |
168
+ | `HW_ACCESS_KEY` | Yes | Huawei Cloud AK |
169
+ | `HW_SECRET_KEY` | Yes | Huawei Cloud SK |
170
+ | `HW_SECURITY_TOKEN` | No | STS security token |
171
+ | `HW_WORKSPACE_ID` | No | Default workspace ID |
172
+ | `HDKITSERVICE_ENDPOINT` | No | hdkitservice API endpoint |
173
+ | `HWLINK_ENDPOINT` | No | DevStation API endpoint |