huaweicloud-devkit 1.1.9-next.2 → 1.1.9-next.3
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 +1 -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/.hermes-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/openclaw.plugin.json +1 -1
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +26 -10
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": "1.1.9-next.
|
|
4
|
+
"version": "1.1.9-next.3",
|
|
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",
|
|
@@ -17,7 +17,7 @@
|
|
|
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
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.9-next.
|
|
20
|
+
"version": "1.1.9-next.3",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -20,7 +20,7 @@
|
|
|
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
22
|
"skills": "./skills/",
|
|
23
|
-
"version": "1.1.9-next.
|
|
23
|
+
"version": "1.1.9-next.3",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "HuaweiCloud Mate",
|
|
26
26
|
"url": "https://github.com/huaweicloud"
|
|
@@ -17,7 +17,7 @@
|
|
|
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
19
|
"skills": "./skills/",
|
|
20
|
-
"version": "1.1.9-next.
|
|
20
|
+
"version": "1.1.9-next.3",
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "HuaweiCloud Mate",
|
|
23
23
|
"url": "https://github.com/huaweicloud"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.1.9-next.
|
|
3
|
+
"version": "1.1.9-next.3",
|
|
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": "1.1.9-next.
|
|
3
|
+
"version": "1.1.9-next.3",
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
3
|
"id": "huaweicloud-devkit",
|
|
4
4
|
"displayName": "HuaweiCloud DevKit",
|
|
5
|
-
"version": "1.1.9-next.
|
|
5
|
+
"version": "1.1.9-next.3",
|
|
6
6
|
"family": "bundle-plugin",
|
|
7
7
|
"bundleFormat": "codex",
|
|
8
8
|
"description": "Guide coding agents to use Huawei Cloud safely — KooCLI, APIs, SDKs, 28 MCP tools, skills, and safety guardrails.",
|
|
@@ -1087,18 +1087,27 @@ fi
|
|
|
1087
1087
|
.join('\n');
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1090
|
+
// Strip terminal escape sequences from sandbox command output (#946): CSI
|
|
1091
|
+
// color/cursor codes and OSC shell-integration markers (shells with integration
|
|
1092
|
+
// enabled wrap EVERY line in \x1b]133;C\x07, which blinds anchored ^DB_...=
|
|
1093
|
+
// parsers), then normalize \r\n / \r line endings to \n.
|
|
1094
|
+
// Use new RegExp to avoid ESLint no-control-regex on literal control chars.
|
|
1095
|
+
export function stripTerminalEscapes(text) {
|
|
1094
1096
|
const ESC = '\x1b';
|
|
1095
1097
|
const csiRe = new RegExp(ESC + '\\[[0-9;]*[a-zA-Z]', 'g');
|
|
1096
1098
|
const oscRe = new RegExp(ESC + '\\][^' + ESC + '\x07]*(?:\x07|' + ESC + '\\\\)', 'g');
|
|
1097
|
-
|
|
1099
|
+
return String(text || '')
|
|
1098
1100
|
.replace(csiRe, '')
|
|
1099
|
-
.replace(oscRe, '')
|
|
1101
|
+
.replace(oscRe, '')
|
|
1102
|
+
.replace(/\r\n|\r/g, '\n');
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export function parseDeployCheckOutput(stdout, { port, isCrossPlatform } = {}) {
|
|
1106
|
+
// Strip ANSI escape sequences (CSI color/cursor codes and OSC shell-integration markers)
|
|
1107
|
+
// and split on any line-ending style (\r\n, \r, or \n) to handle all terminal outputs.
|
|
1108
|
+
const cleanStdout = stripTerminalEscapes(stdout);
|
|
1100
1109
|
const checks = {};
|
|
1101
|
-
const lines = cleanStdout.split(
|
|
1110
|
+
const lines = cleanStdout.split('\n');
|
|
1102
1111
|
for (const line of lines) {
|
|
1103
1112
|
const trimmed = line.trim();
|
|
1104
1113
|
const m = trimmed.match(/^(\w+):(PASS|FAIL|SKIP)\b(.*)/);
|
|
@@ -1270,7 +1279,9 @@ export function buildDevbridgeAuthProbe() {
|
|
|
1270
1279
|
// authMode is the LAST DB_AUTH_MODE line; attempts collects the non-sensitive
|
|
1271
1280
|
// DB_ATTEMPT_* diagnostics emitted by tiers that failed and fell through.
|
|
1272
1281
|
export function parseDevbridgeAuthOutput(stdout) {
|
|
1273
|
-
|
|
1282
|
+
// #946: OSC 133 markers precede every line on integration-enabled shells; the
|
|
1283
|
+
// anchored ^DB_ATTEMPT_ regexes are blind to them without stripping first.
|
|
1284
|
+
const text = stripTerminalEscapes(stdout);
|
|
1274
1285
|
const modes = text.match(/DB_AUTH_MODE=([A-Z_]+)/g) || [];
|
|
1275
1286
|
const authMode = modes.length > 0 ? modes[modes.length - 1].split('=')[1] : '';
|
|
1276
1287
|
const attempts = {};
|
|
@@ -1357,7 +1368,10 @@ export function buildDevbridgeVerifyScript(tunnelUrl) {
|
|
|
1357
1368
|
// regardless of the app. `badGateway` (502 "bad gateway") means the tunnel is
|
|
1358
1369
|
// alive but the local service on the exposed port is not serving.
|
|
1359
1370
|
export function parseDevbridgeExposeOutput(stdout) {
|
|
1360
|
-
|
|
1371
|
+
// #946: strip OSC/CSI escapes + \r BEFORE the anchored ^DB_ lookups — otherwise
|
|
1372
|
+
// every field is lost on integration-enabled shells and a perfectly good tunnel
|
|
1373
|
+
// comes back as ok:true with publicUrl missing (and pointlessly re-built once).
|
|
1374
|
+
const text = stripTerminalEscapes(stdout);
|
|
1361
1375
|
const getField = (key) => {
|
|
1362
1376
|
const m = text.match(new RegExp(`^${key}=(.*)$`, 'm'));
|
|
1363
1377
|
return m ? m[1].trim() : '';
|
|
@@ -1381,7 +1395,9 @@ export function parseDevbridgeExposeOutput(stdout) {
|
|
|
1381
1395
|
// parseDevbridgeExposeOutput never matches them, which used to leave
|
|
1382
1396
|
// verifyHttpCode empty and persistent always false.
|
|
1383
1397
|
export function parseDevbridgeVerifyOutput(stdout) {
|
|
1384
|
-
|
|
1398
|
+
// #946: strip OSC/CSI escapes + \r — the anchored DB_VERIFY_* lookups are blind
|
|
1399
|
+
// to them, leaving verifyHttpCode empty and persistent permanently false.
|
|
1400
|
+
const text = stripTerminalEscapes(stdout);
|
|
1385
1401
|
const getField = (key) => {
|
|
1386
1402
|
const m = text.match(new RegExp(`^${key}=(.*)$`, 'm'));
|
|
1387
1403
|
return m ? m[1].trim() : '';
|