huaweicloud-devkit 1.0.2-dev.3 → 1.0.2-dev.4
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "1.0.2-dev.
|
|
3
|
+
"version": "1.0.2-dev.4",
|
|
4
4
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"mcpServers": "./.mcp.json",
|
|
21
21
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
22
22
|
"skills": "./skills/",
|
|
23
|
-
"version": "1.0.2-dev.
|
|
23
|
+
"version": "1.0.2-dev.4",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "HuaweiCloud Mate",
|
|
26
26
|
"url": "https://github.com/huaweicloud"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-core",
|
|
3
|
-
"version": "1.0.2-dev.
|
|
3
|
+
"version": "1.0.2-dev.4",
|
|
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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"mcpServers": "./.mcp.json",
|
|
21
21
|
"description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
|
|
22
22
|
"skills": "./skills/",
|
|
23
|
-
"version": "1.0.2-dev.
|
|
23
|
+
"version": "1.0.2-dev.4",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "HuaweiCloud Mate",
|
|
26
26
|
"url": "https://github.com/huaweicloud"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
4
4
|
import { createConnection, getCredentials } from './hwlink-api.mjs';
|
|
5
5
|
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const
|
|
7
|
+
export const WS_EXEC_INDEX_URL = pathToFileURL(join(__dirname, '..', 'ws-exec', 'index.js')).href;
|
|
8
8
|
|
|
9
9
|
const DEFAULT_WORKSPACE_ID = process.env.HW_WORKSPACE_ID || '0107bd9997aa4287bd2b4890b49af07d';
|
|
10
10
|
|
|
@@ -55,7 +55,7 @@ async function getSession(workspaceId, username, timeoutMs) {
|
|
|
55
55
|
const { ak, sk, securitytoken } = getCredentials();
|
|
56
56
|
const { wsUrl, source } = await createConnection(workspaceId, ak, sk, securitytoken);
|
|
57
57
|
|
|
58
|
-
const { connectHwlinkTerminalSession } = await import(
|
|
58
|
+
const { connectHwlinkTerminalSession } = await import(WS_EXEC_INDEX_URL);
|
|
59
59
|
const session = await connectHwlinkTerminalSession({
|
|
60
60
|
url: wsUrl,
|
|
61
61
|
source,
|
|
@@ -71,7 +71,7 @@ export async function execOneShot(workspaceId, command, username, timeoutMs) {
|
|
|
71
71
|
const { ak, sk, securitytoken } = getCredentials();
|
|
72
72
|
const { wsUrl, source } = await createConnection(workspaceId, ak, sk, securitytoken);
|
|
73
73
|
|
|
74
|
-
const { executeHwlinkCommand } = await import(
|
|
74
|
+
const { executeHwlinkCommand } = await import(WS_EXEC_INDEX_URL);
|
|
75
75
|
return await executeHwlinkCommand({
|
|
76
76
|
url: wsUrl,
|
|
77
77
|
source,
|