huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -20
- package/LICENSE +201 -201
- package/README.md +178 -138
- package/README.zh-CN.md +176 -138
- package/bin/setup.cjs +10 -8
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
- package/integrations/opencode/opencode.json +11 -14
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
- package/package.json +60 -44
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.mcp.json +13 -15
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
- package/plugins/huaweicloud-core/safety/policy.json +76 -100
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
- package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
- package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
- package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
- package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
- package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
- package/plugins/huaweicloud-core/src/tools.mjs +463 -111
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
- package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
|
@@ -1,124 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const CN_EN_MAP_URL =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
|
|
3
|
+
const INDEX_URL =
|
|
4
|
+
'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/index.json?ref=main';
|
|
5
|
+
const CN_EN_MAP_URL =
|
|
6
|
+
'https://gitcode.com/api/v5/repos/2501_91318609/skills-for-index/contents/skills-index/cn-en-map.json?ref=main';
|
|
7
|
+
|
|
8
|
+
const GENERIC_KEYWORDS = new Set([
|
|
9
|
+
'华为云',
|
|
10
|
+
'huawei',
|
|
11
|
+
'huawei cloud',
|
|
12
|
+
'云',
|
|
13
|
+
'cloud',
|
|
14
|
+
'技能',
|
|
15
|
+
'skill',
|
|
16
|
+
'skills',
|
|
17
|
+
'所有',
|
|
18
|
+
'all',
|
|
19
|
+
'全部',
|
|
20
|
+
'有什么',
|
|
21
|
+
'有哪些',
|
|
22
|
+
'相关',
|
|
23
|
+
'列表',
|
|
24
|
+
'list',
|
|
25
|
+
'查找',
|
|
26
|
+
'搜索',
|
|
27
|
+
'发现',
|
|
28
|
+
'浏览',
|
|
29
|
+
'find',
|
|
30
|
+
'search',
|
|
31
|
+
'discover',
|
|
32
|
+
'browse',
|
|
33
|
+
'show',
|
|
34
|
+
'explore',
|
|
35
|
+
'agent',
|
|
36
|
+
'市场',
|
|
37
|
+
'market',
|
|
38
|
+
'类目',
|
|
39
|
+
'category',
|
|
40
|
+
'安装',
|
|
41
|
+
'install',
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
async function fetchJson(url, _label) {
|
|
45
|
+
const resp = await fetch(url, { headers: { 'User-Agent': 'huaweicloud-devkit/1.0' } });
|
|
46
|
+
const data = await resp.json();
|
|
47
|
+
if (data?.encoding === 'base64' && data.content) {
|
|
48
|
+
return JSON.parse(Buffer.from(data.content, 'base64').toString('utf8'));
|
|
49
|
+
}
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function isGeneric(kw) {
|
|
54
|
+
const k = kw.toLowerCase().trim();
|
|
55
|
+
return GENERIC_KEYWORDS.has(k) || /华为云|huawei/i.test(k);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function expandKeywords(raw, cnEnMap) {
|
|
59
|
+
if (!raw) return [[], []];
|
|
60
|
+
const parts = raw.replace(/[,;]/g, ' ').split(/\s+/).filter(Boolean);
|
|
61
|
+
const expanded = [...parts];
|
|
62
|
+
for (const p of parts) {
|
|
63
|
+
const lower = p.toLowerCase();
|
|
64
|
+
if (cnEnMap[p]) expanded.push(cnEnMap[p]);
|
|
65
|
+
for (const [cn, en] of Object.entries(cnEnMap)) {
|
|
66
|
+
if (en === lower) expanded.push(cn);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const unique = [...new Set(expanded)].sort();
|
|
70
|
+
return [unique.filter((kw) => !isGeneric(kw)), unique.filter((kw) => isGeneric(kw))];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function scoreSkill(skill, specificKws, genericKws) {
|
|
74
|
+
if (!specificKws.length && !genericKws.length) return [1, []];
|
|
75
|
+
let total = 0;
|
|
76
|
+
const matched = [];
|
|
77
|
+
const nl = (skill.name || '').toLowerCase();
|
|
78
|
+
const dl = (skill.description || '').toLowerCase();
|
|
79
|
+
const sl = (skill.service || '').toLowerCase();
|
|
80
|
+
const tl = (skill.triggers || []).map((t) => (t || '').toLowerCase());
|
|
81
|
+
|
|
82
|
+
for (const kw of specificKws) {
|
|
83
|
+
const k = kw.toLowerCase();
|
|
84
|
+
let s = 0;
|
|
85
|
+
if (nl.includes(k)) s += 10;
|
|
86
|
+
else if (tl.some((t) => t.includes(k))) s += 8;
|
|
87
|
+
else if (dl.includes(k)) s += 5;
|
|
88
|
+
else if (sl.includes(k)) s += 3;
|
|
89
|
+
if (s > 0) {
|
|
90
|
+
total += s;
|
|
91
|
+
matched.push(kw);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (const kw of genericKws) {
|
|
95
|
+
const k = kw.toLowerCase();
|
|
96
|
+
let s = 0;
|
|
97
|
+
if (nl.includes(k)) s += 10;
|
|
98
|
+
else if (tl.some((t) => t.includes(k))) s += 4;
|
|
99
|
+
else if (dl.includes(k)) s += 2;
|
|
100
|
+
else if (sl.includes(k)) s += 1;
|
|
101
|
+
if (s > 0) {
|
|
102
|
+
total += s;
|
|
103
|
+
matched.push(kw);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (!specificKws.length && total === 0) {
|
|
107
|
+
total = 1;
|
|
108
|
+
if (dl.length > 20) total += 1;
|
|
109
|
+
if (tl.length) total += 1;
|
|
110
|
+
}
|
|
111
|
+
return [total, matched];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
async function main() {
|
|
115
|
+
const keyword =
|
|
116
|
+
process.argv
|
|
117
|
+
.slice(2)
|
|
118
|
+
.filter((a) => !a.startsWith('-'))
|
|
119
|
+
.join(' ') || '';
|
|
120
|
+
const catIdx = process.argv.indexOf('-c');
|
|
121
|
+
const category = catIdx >= 0 ? process.argv[catIdx + 1] || '' : '';
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const [idx, cnEnMap] = await Promise.all([fetchJson(INDEX_URL, 'index'), fetchJson(CN_EN_MAP_URL, 'cn-en-map')]);
|
|
125
|
+
|
|
126
|
+
if (!keyword && !category) {
|
|
127
|
+
console.log(`Categories: ${(idx.categories || []).join(', ')}`);
|
|
128
|
+
console.log('Usage: node search-skills.mjs <keyword> [-c <category>]');
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const [specificKws, genericKws] = expandKeywords(keyword, cnEnMap);
|
|
133
|
+
const hasSpecific = specificKws.length > 0;
|
|
134
|
+
|
|
135
|
+
const results = [];
|
|
136
|
+
for (const skill of idx.skills || []) {
|
|
137
|
+
if (category && skill.category !== category) continue;
|
|
138
|
+
const [score, matched] = scoreSkill(skill, specificKws, genericKws);
|
|
139
|
+
if (hasSpecific && score === 0) continue;
|
|
140
|
+
const desc = (skill.description || '').slice(0, 150);
|
|
141
|
+
results.push({
|
|
142
|
+
score,
|
|
143
|
+
name: skill.name,
|
|
144
|
+
category: skill.category,
|
|
145
|
+
service: skill.service,
|
|
146
|
+
description: desc + (skill.description?.length > 150 ? '...' : ''),
|
|
147
|
+
triggers: (skill.triggers || []).slice(0, 5),
|
|
148
|
+
matched,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
results.sort((a, b) => b.score - a.score);
|
|
152
|
+
|
|
153
|
+
if (!results.length) {
|
|
154
|
+
console.log(`No results. Try broader keywords, remove category filter, or switch CN↔EN.`);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
console.log(`Found ${results.length} skill(s):`);
|
|
159
|
+
for (const r of results) {
|
|
160
|
+
console.log(
|
|
161
|
+
` [${r.score}pts] ${r.name} (${r.category}/${r.service})${r.matched.length ? ' matched: ' + r.matched.join(',') : ''}`,
|
|
162
|
+
);
|
|
163
|
+
console.log(` ${r.description}`);
|
|
164
|
+
}
|
|
165
|
+
} catch (e) {
|
|
166
|
+
console.error(`Error: ${e.message}`);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
main();
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-cts
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud CTS
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud CTS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for Cloud Trace Service. Covers trackers, traces, notifications, and resource tags.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
| Tracker required for traces | Must create a tracker before traces are recorded
|
|
22
|
-
| OBS bucket prerequisite
|
|
23
|
-
| 7-day retention default
|
|
24
|
-
| Organization tracker
|
|
25
|
-
|
|
26
|
-
## Common Workflows
|
|
27
|
-
|
|
28
|
-
| Task
|
|
29
|
-
|
|
30
|
-
| List operations
|
|
31
|
-
| List traces
|
|
32
|
-
| Create tracker
|
|
33
|
-
| List trackers
|
|
34
|
-
| Delete tracker
|
|
35
|
-
| Create notification
|
|
36
|
-
| List notifications
|
|
37
|
-
| List trace resources | `ListTraceResources --cli-region=<r> --project_id=<p>` |
|
|
38
|
-
|
|
39
|
-
Discover exact parameters with `--help` before executing any command.
|
|
40
|
-
|
|
41
|
-
## Troubleshooting
|
|
42
|
-
|
|
43
|
-
| Error
|
|
44
|
-
|
|
45
|
-
| No traces found
|
|
46
|
-
| Tracker creation fails | Ensure OBS bucket exists and has correct permissions
|
|
47
|
-
|
|
48
|
-
## Security
|
|
49
|
-
|
|
50
|
-
- SHOULD enable CTS for all production accounts
|
|
51
|
-
- MUST use OBS server-side encryption for trace logs
|
|
52
|
-
|
|
53
|
-
## Cross-Skill References
|
|
54
|
-
|
|
55
|
-
- **OBS**: See `huawei-obs` for tracker log delivery bucket
|
|
1
|
+
---
|
|
2
|
+
name: huawei-cts
|
|
3
|
+
description: 'Use when managing Cloud Trace Service (CTS) audit logs, trackers, and traces on Huawei Cloud. Triggers: CTS, Cloud Trace, audit log, tracker, trace, operation record. NOT for: CES monitoring alarms (use huawei-cloud-eye), log analysis (use LTS).'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud CTS
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud CTS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for Cloud Trace Service. Covers trackers, traces, notifications, and resource tags.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| --------------------------- | ------------------------------------------------------------------------------ |
|
|
21
|
+
| Tracker required for traces | Must create a tracker before traces are recorded |
|
|
22
|
+
| OBS bucket prerequisite | Tracker needs an OBS bucket for log delivery |
|
|
23
|
+
| 7-day retention default | Trace data retained 7 days by default. Create LTS tracker for longer retention |
|
|
24
|
+
| Organization tracker | Cross-account auditing requires organization tracker |
|
|
25
|
+
|
|
26
|
+
## Common Workflows
|
|
27
|
+
|
|
28
|
+
| Task | Operation |
|
|
29
|
+
| -------------------- | ------------------------------------------------------ |
|
|
30
|
+
| List operations | `ListOperations --cli-region=<r> --project_id=<p>` |
|
|
31
|
+
| List traces | `ListTraces --cli-region=<r> --project_id=<p>` |
|
|
32
|
+
| Create tracker | `CreateTracker --cli-region=<r> --project_id=<p>` |
|
|
33
|
+
| List trackers | `ListTrackers --cli-region=<r> --project_id=<p>` |
|
|
34
|
+
| Delete tracker | `DeleteTracker --cli-region=<r> --project_id=<p>` |
|
|
35
|
+
| Create notification | `CreateNotification --cli-region=<r> --project_id=<p>` |
|
|
36
|
+
| List notifications | `ListNotifications --cli-region=<r> --project_id=<p>` |
|
|
37
|
+
| List trace resources | `ListTraceResources --cli-region=<r> --project_id=<p>` |
|
|
38
|
+
|
|
39
|
+
Discover exact parameters with `--help` before executing any command.
|
|
40
|
+
|
|
41
|
+
## Troubleshooting
|
|
42
|
+
|
|
43
|
+
| Error | Fix |
|
|
44
|
+
| ---------------------- | ---------------------------------------------------------- |
|
|
45
|
+
| No traces found | Check tracker is created and enabled. Filter by time range |
|
|
46
|
+
| Tracker creation fails | Ensure OBS bucket exists and has correct permissions |
|
|
47
|
+
|
|
48
|
+
## Security
|
|
49
|
+
|
|
50
|
+
- SHOULD enable CTS for all production accounts
|
|
51
|
+
- MUST use OBS server-side encryption for trace logs
|
|
52
|
+
|
|
53
|
+
## Cross-Skill References
|
|
54
|
+
|
|
55
|
+
- **OBS**: See `huawei-obs` for tracker log delivery bucket
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-dds-dcs
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud DDS / DCS
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud DDS <Operation> --help` or `hcloud DCS <Operation> --help` before constructing commands.
|
|
12
|
-
|
|
13
|
-
## DDS (Document Database Service — MongoDB Compatible)
|
|
14
|
-
|
|
15
|
-
## DDS Critical Warnings
|
|
16
|
-
|
|
17
|
-
| Trap
|
|
18
|
-
|
|
19
|
-
| Requires 3-node replica
|
|
20
|
-
| Shard key permanent
|
|
21
|
-
| Storage auto-scaling off | Enable before storage fills
|
|
22
|
-
|
|
23
|
-
### Common Workflows
|
|
24
|
-
|
|
25
|
-
| Task
|
|
26
|
-
|
|
27
|
-
| List instances
|
|
28
|
-
| Create instance
|
|
29
|
-
| Delete instance
|
|
30
|
-
| Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
|
|
31
|
-
| Add shard
|
|
32
|
-
| Create backup
|
|
33
|
-
|
|
34
|
-
Discover exact parameters with `--help` before executing any command.
|
|
35
|
-
|
|
36
|
-
## DCS (Distributed Cache Service — Redis/Memcached)
|
|
37
|
-
|
|
38
|
-
## DCS Critical Warnings
|
|
39
|
-
|
|
40
|
-
| Trap
|
|
41
|
-
|
|
42
|
-
| Redis password required | Cannot create Redis instance without password
|
|
43
|
-
| Memcached no password
|
|
44
|
-
| Cache persistence costs | AOF/RDB persistence uses additional storage
|
|
45
|
-
|
|
46
|
-
### Common Workflows
|
|
47
|
-
|
|
48
|
-
| Task
|
|
49
|
-
|
|
50
|
-
| List instances
|
|
51
|
-
| Create Redis instance
|
|
52
|
-
| Delete instance
|
|
53
|
-
| Restart instance
|
|
54
|
-
| Show node information
|
|
55
|
-
| Create custom template | `CreateCustomTemplate --cli-region=<r> --project_id=<p>`
|
|
56
|
-
|
|
57
|
-
Discover exact parameters with `--help` before executing any command.
|
|
58
|
-
|
|
59
|
-
## Troubleshooting
|
|
60
|
-
|
|
61
|
-
| Error
|
|
62
|
-
|
|
63
|
-
| DDS instance creation fails | Check 3-node minimum, VPC/subnet availability
|
|
64
|
-
| DCS connection refused
|
|
65
|
-
| DCS auto-expire not working | Enable auto-expire scan task for Redis
|
|
66
|
-
|
|
67
|
-
## Cross-Skill References
|
|
68
|
-
|
|
69
|
-
- **VPC/Subnet**: See `huawei-vpc` for instance networking
|
|
70
|
-
- **Backup/CBR**: See `huawei-cbr` for backup management
|
|
1
|
+
---
|
|
2
|
+
name: huawei-dds-dcs
|
|
3
|
+
description: 'Use when creating or managing Document Database Service (DDS/MongoDB-compatible) or Distributed Cache Service (DCS/Redis/Memcached) on Huawei Cloud. Triggers: DDS, DCS, MongoDB, Redis, Memcached, document DB, cache, replica set, sharding. NOT for: RDS (use huawei-rds), GaussDB (use huawei-gaussdb).'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud DDS / DCS
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud DDS <Operation> --help` or `hcloud DCS <Operation> --help` before constructing commands.
|
|
12
|
+
|
|
13
|
+
## DDS (Document Database Service — MongoDB Compatible)
|
|
14
|
+
|
|
15
|
+
## DDS Critical Warnings
|
|
16
|
+
|
|
17
|
+
| Trap | Why |
|
|
18
|
+
| ------------------------ | ------------------------------------------- |
|
|
19
|
+
| Requires 3-node replica | Minimum production deployment needs 3 nodes |
|
|
20
|
+
| Shard key permanent | Once selected, shard key cannot be changed |
|
|
21
|
+
| Storage auto-scaling off | Enable before storage fills |
|
|
22
|
+
|
|
23
|
+
### Common Workflows
|
|
24
|
+
|
|
25
|
+
| Task | Operation |
|
|
26
|
+
| ----------------- | --------------------------------------------------- |
|
|
27
|
+
| List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
|
|
28
|
+
| Create instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
|
|
29
|
+
| Delete instance | `DeleteInstance --cli-region=<r> --project_id=<p>` |
|
|
30
|
+
| Add readonly node | `AddReadonlyNode --cli-region=<r> --project_id=<p>` |
|
|
31
|
+
| Add shard | `AddShardingNode --cli-region=<r> --project_id=<p>` |
|
|
32
|
+
| Create backup | `CreateBackup --cli-region=<r> --project_id=<p>` |
|
|
33
|
+
|
|
34
|
+
Discover exact parameters with `--help` before executing any command.
|
|
35
|
+
|
|
36
|
+
## DCS (Distributed Cache Service — Redis/Memcached)
|
|
37
|
+
|
|
38
|
+
## DCS Critical Warnings
|
|
39
|
+
|
|
40
|
+
| Trap | Why |
|
|
41
|
+
| ----------------------- | -------------------------------------------------- |
|
|
42
|
+
| Redis password required | Cannot create Redis instance without password |
|
|
43
|
+
| Memcached no password | Memcached has no auth — only accessible within VPC |
|
|
44
|
+
| Cache persistence costs | AOF/RDB persistence uses additional storage |
|
|
45
|
+
|
|
46
|
+
### Common Workflows
|
|
47
|
+
|
|
48
|
+
| Task | Operation |
|
|
49
|
+
| ---------------------- | ------------------------------------------------------------- |
|
|
50
|
+
| List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
|
|
51
|
+
| Create Redis instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
|
|
52
|
+
| Delete instance | `DeleteInstances --cli-region=<r> --project_id=<p>` |
|
|
53
|
+
| Restart instance | `RestartInstance --cli-region=<r> --project_id=<p>` |
|
|
54
|
+
| Show node information | `BatchShowNodesInformation --cli-region=<r> --project_id=<p>` |
|
|
55
|
+
| Create custom template | `CreateCustomTemplate --cli-region=<r> --project_id=<p>` |
|
|
56
|
+
|
|
57
|
+
Discover exact parameters with `--help` before executing any command.
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
|
|
61
|
+
| Error | Fix |
|
|
62
|
+
| --------------------------- | ------------------------------------------------------------------- |
|
|
63
|
+
| DDS instance creation fails | Check 3-node minimum, VPC/subnet availability |
|
|
64
|
+
| DCS connection refused | Redis instances need password. Memcached only accessible within VPC |
|
|
65
|
+
| DCS auto-expire not working | Enable auto-expire scan task for Redis |
|
|
66
|
+
|
|
67
|
+
## Cross-Skill References
|
|
68
|
+
|
|
69
|
+
- **VPC/Subnet**: See `huawei-vpc` for instance networking
|
|
70
|
+
- **Backup/CBR**: See `huawei-cbr` for backup management
|