huaweicloud-devkit 2.0.1-next.1 → 2.0.1-next.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
3
  "mcpName": "io.github.huaweicloud/huaweicloud-devkit",
4
- "version": "2.0.1-next.1",
4
+ "version": "2.0.1-next.2",
5
5
  "kooCliVersion": "7.3.12",
6
6
  "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
7
7
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "mcpServers": "./.mcp.json",
18
18
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
19
- "version": "2.0.1-next.1",
19
+ "version": "2.0.1-next.2",
20
20
  "author": {
21
21
  "name": "HuaweiCloud Mate",
22
22
  "url": "https://github.com/huaweicloud"
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "mcpServers": "./.mcp.json",
21
21
  "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
22
- "version": "2.0.1-next.1",
22
+ "version": "2.0.1-next.2",
23
23
  "author": {
24
24
  "name": "HuaweiCloud Mate",
25
25
  "url": "https://github.com/huaweicloud"
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "mcpServers": "./.mcp.json",
18
18
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
19
- "version": "2.0.1-next.1",
19
+ "version": "2.0.1-next.2",
20
20
  "author": {
21
21
  "name": "HuaweiCloud Mate",
22
22
  "url": "https://github.com/huaweicloud"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "2.0.1-next.1",
3
+ "version": "2.0.1-next.2",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "2.0.1-next.1",
3
+ "version": "2.0.1-next.2",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -69,6 +69,10 @@ function planningWarnings(args) {
69
69
  }
70
70
  const REQUIRED_PARAMS = {
71
71
  'ECS CreateServers': ['server.flavorRef', 'server.imageRef', 'server.nics.1.subnet_id'],
72
+ // KooCLI rejects a CreatePostPaidServers call that omits server.vpcid
73
+ // with "The following parameters are required: server.vpcid" (live
74
+ // evidence 2026-11-27), so the plan warns before the child ever runs.
75
+ 'ECS CreatePostPaidServers': ['server.flavorRef', 'server.imageRef', 'server.nics.1.subnet_id', 'server.vpcid'],
72
76
  'VPC CreateVpc': ['vpc.cidr'],
73
77
  'VPC CreateSubnet': ['subnet.vpc_id', 'subnet.cidr'],
74
78
  'VPC CreateSecurityGroupRule': [
@@ -87,6 +91,7 @@ const PARAM_VALUE_HINTS = {
87
91
  'server.flavorRef': 'Run `hcloud ECS ListFlavors --cli-region=<r>` to find valid flavors',
88
92
  'server.imageRef': 'Run `hcloud IMS ListImages --cli-region=<r> --__imagetype=gold` to find image IDs',
89
93
  'server.nics.1.subnet_id': 'Run `hcloud VPC ListSubnets --cli-region=<r>` to find subnet IDs',
94
+ 'server.vpcid': 'Run `hcloud VPC ListVpcs --cli-region=<r>` to find VPC IDs (KooCLI rejects CreatePostPaidServers without it)',
90
95
  'subnet.vpc_id': 'Run `hcloud VPC ListVpcs --cli-region=<r>` to find VPC IDs',
91
96
  func_name: 'Function name must be unique within project',
92
97
  runtime: 'Run `hcloud FunctionGraph ListRuntimes` to see available runtimes',
@@ -45259,6 +45259,16 @@ function classifyHcloudArgs(args, options = {}) {
45259
45259
  reason: "The command appears to retrieve a secret value. Use a runtime secret reference pattern instead."
45260
45260
  };
45261
45261
  }
45262
+ if (options.rawCommand === void 0 && (normalizedArgs.includes(DRYRUN_GLOBAL_TOKEN) || DRY_RUN_PREFLIGHT_OPERATIONS.has(`${service.toLowerCase()} ${operation.toLowerCase()}`) && normalizedArgs.includes(DRY_RUN_EXACT_TOKEN) && !normalizedArgs.some((arg) => arg.startsWith("--cli-jsonInput")))) {
45263
+ return applyCommandRiskRules({
45264
+ decision: "allow",
45265
+ risk: "preflight",
45266
+ reason: "Documented dry-run preflight: the CLI prints the request without executing, or the service validates it and creates nothing, so no confirmation is required.",
45267
+ service,
45268
+ operation,
45269
+ args: normalizedArgs
45270
+ }, normalizedArgs, options);
45271
+ }
45262
45272
  const readOnly = hasReadPrefix(operation, policy);
45263
45273
  const executionOps = /(^|\.)(Invoke|SyncInvoke|AsyncInvoke|Send|Trigger|Execute|Start|Reboot|Restart|Stop|Publish|Deploy)/i;
45264
45274
  const isExecution = executionOps.test(operation) && !readOnly;
@@ -45346,6 +45356,7 @@ function assertAllowed(result) {
45346
45356
  }
45347
45357
  return result;
45348
45358
  }
45359
+ var DRYRUN_GLOBAL_TOKEN, DRY_RUN_PREFLIGHT_OPERATIONS, DRY_RUN_EXACT_TOKEN;
45349
45360
  var init_classify_hcloud = __esm({
45350
45361
  "plugins/huaweicloud-core/dist.new/safety/classify-hcloud.js"() {
45351
45362
  "use strict";
@@ -45358,6 +45369,9 @@ var init_classify_hcloud = __esm({
45358
45369
  init_tokens();
45359
45370
  init_unwrap();
45360
45371
  init_vocabulary();
45372
+ DRYRUN_GLOBAL_TOKEN = "--dryrun";
45373
+ DRY_RUN_PREFLIGHT_OPERATIONS = /* @__PURE__ */ new Set(["ecs createservers", "ecs createpostpaidservers"]);
45374
+ DRY_RUN_EXACT_TOKEN = "--dry_run=true";
45361
45375
  }
45362
45376
  });
45363
45377
 
@@ -59362,6 +59376,10 @@ var init_hcloud_plan = __esm({
59362
59376
  init_hcloud_triage();
59363
59377
  REQUIRED_PARAMS = {
59364
59378
  "ECS CreateServers": ["server.flavorRef", "server.imageRef", "server.nics.1.subnet_id"],
59379
+ // KooCLI rejects a CreatePostPaidServers call that omits server.vpcid
59380
+ // with "The following parameters are required: server.vpcid" (live
59381
+ // evidence 2026-11-27), so the plan warns before the child ever runs.
59382
+ "ECS CreatePostPaidServers": ["server.flavorRef", "server.imageRef", "server.nics.1.subnet_id", "server.vpcid"],
59365
59383
  "VPC CreateVpc": ["vpc.cidr"],
59366
59384
  "VPC CreateSubnet": ["subnet.vpc_id", "subnet.cidr"],
59367
59385
  "VPC CreateSecurityGroupRule": [
@@ -59380,6 +59398,7 @@ var init_hcloud_plan = __esm({
59380
59398
  "server.flavorRef": "Run `hcloud ECS ListFlavors --cli-region=<r>` to find valid flavors",
59381
59399
  "server.imageRef": "Run `hcloud IMS ListImages --cli-region=<r> --__imagetype=gold` to find image IDs",
59382
59400
  "server.nics.1.subnet_id": "Run `hcloud VPC ListSubnets --cli-region=<r>` to find subnet IDs",
59401
+ "server.vpcid": "Run `hcloud VPC ListVpcs --cli-region=<r>` to find VPC IDs (KooCLI rejects CreatePostPaidServers without it)",
59383
59402
  "subnet.vpc_id": "Run `hcloud VPC ListVpcs --cli-region=<r>` to find VPC IDs",
59384
59403
  func_name: "Function name must be unique within project",
59385
59404
  runtime: "Run `hcloud FunctionGraph ListRuntimes` to see available runtimes",