huaweicloud-devkit 1.0.2-dev.9 → 1.1.2-next.0
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/README.md +29 -4
- package/README.zh-CN.md +27 -4
- package/bin/setup.cjs +0 -0
- package/package.json +3 -1
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +6 -0
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +13 -8
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +18 -3
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +19 -1
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +155 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +87 -0
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +7 -3
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +12 -3
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +7 -0
- package/plugins/huaweicloud-core/src/search-market.mjs +7 -2
- package/plugins/huaweicloud-core/src/setup-cli.mjs +433 -10
- package/plugins/huaweicloud-core/src/tools.mjs +21 -6
|
@@ -25,8 +25,13 @@ function workbuddySkillsDir() {
|
|
|
25
25
|
const home = homedir();
|
|
26
26
|
return join(home, '.workbuddy', 'skills');
|
|
27
27
|
}
|
|
28
|
+
function dshSkillsDir() {
|
|
29
|
+
const home = process.env.DSH_HOME || join(homedir(), '.dsh');
|
|
30
|
+
return join(home, 'skills');
|
|
31
|
+
}
|
|
28
32
|
function resolveSkillsRoot() {
|
|
29
33
|
if (existsSync(SKILLS_ROOT_DEV)) return SKILLS_ROOT_DEV;
|
|
34
|
+
if (existsSync(dshSkillsDir())) return dshSkillsDir();
|
|
30
35
|
if (existsSync(codeartsSkillsDir())) return codeartsSkillsDir();
|
|
31
36
|
if (existsSync(opencodeSkillsDir())) return opencodeSkillsDir();
|
|
32
37
|
if (existsSync(workbuddySkillsDir())) return workbuddySkillsDir();
|
|
@@ -295,7 +300,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
295
300
|
inputSchema: {
|
|
296
301
|
type: 'object',
|
|
297
302
|
properties: {
|
|
298
|
-
target: { type: 'string', description: 'Agent target to check: opencode, codex, codex-desktop, codearts, workbuddy, or all (default).' },
|
|
303
|
+
target: { type: 'string', description: 'Agent target to check: opencode, codex, codex-desktop, codearts, workbuddy, dsh, or all (default).' },
|
|
299
304
|
},
|
|
300
305
|
},
|
|
301
306
|
},
|
|
@@ -305,7 +310,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
305
310
|
inputSchema: {
|
|
306
311
|
type: 'object',
|
|
307
312
|
properties: {
|
|
308
|
-
target: { type: 'string', description: 'Agent target to report after sync: opencode, codex, codex-desktop, codearts, workbuddy, or all (default).' },
|
|
313
|
+
target: { type: 'string', description: 'Agent target to report after sync: opencode, codex, codex-desktop, codearts, workbuddy, dsh, or all (default).' },
|
|
309
314
|
},
|
|
310
315
|
},
|
|
311
316
|
},
|
|
@@ -336,7 +341,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
336
341
|
},
|
|
337
342
|
{
|
|
338
343
|
name: 'huaweicloud_sandbox_check_user',
|
|
339
|
-
description: 'Check if the current user has completed real-name verification and signed the required agreements. Returns
|
|
344
|
+
description: 'Check if the current user has completed real-name verification and signed the required agreements. Returns 200 {realnameVerified, agreementSigned} when all good; throws 403 HDKIT_NOT_REALNAME / HDKIT_NOT_AGREEMENT / HDKIT_NOT_REALNAME_AND_AGREEMENT to indicate what is missing. Never signs anything itself.',
|
|
340
345
|
inputSchema: {
|
|
341
346
|
type: 'object',
|
|
342
347
|
properties: {},
|
|
@@ -344,7 +349,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
344
349
|
},
|
|
345
350
|
{
|
|
346
351
|
name: 'huaweicloud_sandbox_sign_agreement',
|
|
347
|
-
description: 'Sign all unsigned or outdated agreements for the current user. Required before huaweicloud_sandbox_connect if check-user returns
|
|
352
|
+
description: 'Sign all unsigned or outdated agreements for the current user. Required before huaweicloud_sandbox_connect if check-user returns agreementSigned=false. CRITICAL: only call after the user explicitly consents to signing — never sign agreements on the user\'s behalf without their explicit request.',
|
|
348
353
|
inputSchema: {
|
|
349
354
|
type: 'object',
|
|
350
355
|
properties: {},
|
|
@@ -709,19 +714,29 @@ function serviceCatalog(intent = '') {
|
|
|
709
714
|
{ keywords: ['cts', 'audit', 'trace', 'tracker'], skills: ['huawei-cts'], services: ['CTS'] },
|
|
710
715
|
{ keywords: ['cbr', 'backup', 'restore', 'vault', 'snapshot'], skills: ['huawei-cbr'], services: ['CBR'] },
|
|
711
716
|
{ keywords: ['deployment', 'deploy', 'ci/cd', 'pipeline', 'release'], skills: ['huawei-deployment'], services: ['CloudDeploy'] },
|
|
712
|
-
{ keywords: ['sandbox', 'devstation', 'workspace', 'terminal', 'preview', 'hwlink'], skills: ['huawei-sandbox'], services: ['Sandbox', 'DevStation'] },
|
|
717
|
+
{ keywords: ['sandbox', 'devstation', 'workspace', 'terminal', 'preview', 'hwlink', 'website', 'web app', 'webapp', 'hosting', '网站', '网页', '静态'], skills: ['huawei-sandbox'], services: ['Sandbox', 'DevStation'] },
|
|
713
718
|
{ keywords: ['dds', 'dcs', 'mongodb', 'redis', 'memcached', 'cache', 'document db'], skills: ['huawei-dds-dcs'], services: ['DDS', 'DCS'] },
|
|
714
719
|
];
|
|
715
720
|
const matched = [];
|
|
716
721
|
const tokens = it.split(/[\s,./-]+/).filter((t) => t.length > 0);
|
|
722
|
+
const cjk = /[\u4e00-\u9fff]/;
|
|
717
723
|
for (const route of routeMap) {
|
|
718
|
-
if (route.keywords.some((kw) => tokens.includes(kw))) {
|
|
724
|
+
if (route.keywords.some((kw) => (kw.includes(' ') || cjk.test(kw)) ? it.includes(kw) : tokens.includes(kw))) {
|
|
719
725
|
matched.push(route);
|
|
720
726
|
}
|
|
721
727
|
}
|
|
722
728
|
const recommendedSkills = [...new Set(matched.flatMap((r) => r.skills))];
|
|
723
729
|
const recommendedServices = [...new Set(matched.flatMap((r) => r.services))].slice(0, 5);
|
|
724
730
|
|
|
731
|
+
// Deployment intent (deploy/host/publish a web app or static website) must never
|
|
732
|
+
// default to a storage/other service — recommend the sandbox first.
|
|
733
|
+
const deploymentIntent = /deploy|host|hosting|publish|website|web app|preview|部署|托管|发布|网站|网页/.test(it);
|
|
734
|
+
if (deploymentIntent && recommendedSkills.includes('huawei-sandbox')) {
|
|
735
|
+
const idx = recommendedSkills.indexOf('huawei-sandbox');
|
|
736
|
+
recommendedSkills.splice(idx, 1);
|
|
737
|
+
recommendedSkills.unshift('huawei-sandbox');
|
|
738
|
+
}
|
|
739
|
+
|
|
725
740
|
return {
|
|
726
741
|
intent,
|
|
727
742
|
recommendedSkills: recommendedSkills.length ? recommendedSkills : ['Use huaweicloud-core to route intent.'],
|