@guandata/guanskill 0.1.11 → 0.1.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## @guandata/guanskill 0.1.13 - 2026-07-15
4
+
5
+ - 新增统一的观远 CLI 套件入口,可识别任务并路由到六个正式组件。
6
+ - 同步聚合包依赖到 guancli 1.0.40、guands 0.1.20、guanwf 0.1.820 和 guanvis 0.1.31。
7
+
8
+ ## @guandata/guanskill 0.1.12 - 2026-07-10
9
+
10
+ - 同步聚合包依赖版本,包含本次发布的 guanmetric。
11
+ - 聚合包命令转发与 `install-skill` 依赖版本同步到最新组件版本。
12
+
3
13
  ## @guandata/guanskill 0.1.11 - 2026-07-08
4
14
 
5
15
  - 同步聚合包依赖版本,包含本次发布的 guancli、guands、guanetl、guanwf、guanvis、guanmetric。
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @guandata/guanskill
2
2
 
3
- Guandata BI Skills 聚合安装包,用于一次性安装和更新观远 BI 命令行工具与常用 AI skills。
3
+ Guandata BI Skills 聚合安装包,用于一次性安装和更新观远 BI 命令行工具、常用 AI skills 与统一的观远 CLI 套件入口。
4
4
 
5
5
  ## 安装
6
6
 
@@ -25,19 +25,31 @@ guanmetric
25
25
  guanskill install-skill
26
26
  ```
27
27
 
28
+ 该命令还会安装 `guandata-cli-suite`。它负责识别观远数据任务并路由到下列正式组件。
29
+
28
30
  ## 包含组件
29
31
 
30
32
  | 组件 | 版本 | 用途 |
31
33
  |---|---:|---|
32
- | `@guandata/guancli` | `1.0.39` | 观远 BI 基础命令行工具 |
33
- | `@guandata/guands` | `0.1.19` | 数据源和数据集管理 |
34
+ | `@guandata/guancli` | `1.0.40` | 观远 BI 基础命令行工具 |
35
+ | `@guandata/guands` | `0.1.20` | 数据源和数据集管理 |
34
36
  | `@guandata/guanetl` | `0.1.19` | ETL 编辑、预览和执行 |
35
- | `@guandata/guanwf` | `0.1.7` | 工作流数据流管理 |
36
- | `@guandata/guanvis` | `0.1.30` | 图表、卡片和仪表板构建 |
37
- | `@guandata/guanmetric` | `0.1.0` | 指标创建、编辑和模板标准化 |
37
+ | `@guandata/guanwf` | `0.1.820` | 工作流数据流管理 |
38
+ | `@guandata/guanvis` | `0.1.31` | 图表、卡片和仪表板构建 |
39
+ | `@guandata/guanmetric` | `0.1.1` | 指标创建、编辑和模板标准化 |
38
40
 
39
41
  ## 版本更新
40
42
 
43
+ ### @guandata/guanskill 0.1.13
44
+
45
+ - 新增统一的观远 CLI 套件入口,可识别任务并路由到六个正式组件。
46
+ - 同步聚合包依赖到 guancli 1.0.40、guands 0.1.20、guanwf 0.1.820 和 guanvis 0.1.31。
47
+
48
+ ### @guandata/guanskill 0.1.12
49
+
50
+ - 同步聚合包依赖版本,包含本次发布的 guanmetric。
51
+ - 聚合包命令转发与 `install-skill` 依赖版本同步到最新组件版本。
52
+
41
53
  ### @guandata/guanskill 0.1.11
42
54
 
43
55
  - 同步聚合包依赖版本,包含本次发布的 guancli、guands、guanetl、guanwf、guanvis、guanmetric。
package/bin/run.js CHANGED
@@ -3,8 +3,20 @@
3
3
  "use strict";
4
4
 
5
5
  const { spawnSync } = require("child_process");
6
+ const fs = require("fs");
7
+ const os = require("os");
6
8
  const path = require("path");
7
9
 
10
+ const SUITE_SKILL = "guandata-cli-suite";
11
+
12
+ class BuddyInstallError extends Error {
13
+ constructor(failures) {
14
+ super(`Buddy skill installation failed:\n${failures.join("\n")}`);
15
+ this.name = "BuddyInstallError";
16
+ this.failures = failures;
17
+ }
18
+ }
19
+
8
20
  const COMPONENTS = [
9
21
  { command: "guancli", packageName: "@guandata/guancli" },
10
22
  { command: "guands", packageName: "@guandata/guands" },
@@ -44,6 +56,167 @@ function resolveComponentBin(component) {
44
56
  }
45
57
  }
46
58
 
59
+ function resolveComponentPackageRoot(component) {
60
+ try {
61
+ return path.dirname(require.resolve(`${component.packageName}/package.json`));
62
+ } catch (err) {
63
+ console.error(
64
+ `Cannot find ${component.packageName}. Reinstall with: npm install -g @guandata/guanskill`
65
+ );
66
+ process.exit(1);
67
+ }
68
+ }
69
+
70
+ function copyDirectory(src, dest) {
71
+ fs.mkdirSync(dest, { recursive: true });
72
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
73
+ const srcPath = path.join(src, entry.name);
74
+ const destPath = path.join(dest, entry.name);
75
+ if (entry.isDirectory()) {
76
+ copyDirectory(srcPath, destPath);
77
+ } else if (entry.isSymbolicLink()) {
78
+ fs.symlinkSync(fs.readlinkSync(srcPath), destPath);
79
+ } else {
80
+ fs.copyFileSync(srcPath, destPath);
81
+ }
82
+ }
83
+ }
84
+
85
+ function replaceDirectory(src, dest, copy = copyDirectory, operations = fs) {
86
+ const parentDir = path.dirname(dest);
87
+ const suffix = `${process.pid}-${Date.now()}`;
88
+ const tempDir = path.join(parentDir, `.${path.basename(dest)}.tmp-${suffix}`);
89
+ const backupDir = path.join(parentDir, `.${path.basename(dest)}.backup-${suffix}`);
90
+
91
+ operations.mkdirSync(parentDir, { recursive: true });
92
+ try {
93
+ copy(src, tempDir);
94
+ if (operations.existsSync(dest)) {
95
+ operations.renameSync(dest, backupDir);
96
+ }
97
+ operations.renameSync(tempDir, dest);
98
+ operations.rmSync(backupDir, { recursive: true, force: true });
99
+ } catch (err) {
100
+ let restoreError;
101
+ let cleanupError;
102
+ if (!operations.existsSync(dest) && operations.existsSync(backupDir)) {
103
+ try {
104
+ operations.renameSync(backupDir, dest);
105
+ } catch (restoreErr) {
106
+ restoreError = restoreErr;
107
+ }
108
+ }
109
+ try {
110
+ operations.rmSync(tempDir, { recursive: true, force: true });
111
+ } catch (cleanupErr) {
112
+ cleanupError = cleanupErr;
113
+ }
114
+ if (restoreError) {
115
+ throw new Error(`${err.message}; failed to restore previous skill: ${restoreError.message}`);
116
+ }
117
+ if (cleanupError) {
118
+ throw new Error(`${err.message}; failed to clean temporary skill: ${cleanupError.message}`);
119
+ }
120
+ throw err;
121
+ }
122
+ }
123
+
124
+ function resolveNpxInvocation(options = {}) {
125
+ const platform = options.platform || process.platform;
126
+ const nodePath = options.nodePath || process.execPath;
127
+ const npmExecPath = Object.prototype.hasOwnProperty.call(options, "npmExecPath")
128
+ ? options.npmExecPath
129
+ : process.env.npm_execpath;
130
+ const exists = options.exists || fs.existsSync;
131
+ const executableDir = path.dirname(nodePath);
132
+ const candidates = [];
133
+
134
+ if (npmExecPath) {
135
+ candidates.push(path.join(path.dirname(npmExecPath), "npx-cli.js"));
136
+ }
137
+ candidates.push(path.join(executableDir, "node_modules", "npm", "bin", "npx-cli.js"));
138
+ candidates.push(path.resolve(executableDir, "..", "node_modules", "npm", "bin", "npx-cli.js"));
139
+ candidates.push(path.resolve(executableDir, "..", "lib", "node_modules", "npm", "bin", "npx-cli.js"));
140
+
141
+ const npxCliPath = candidates.find((candidate) => exists(candidate));
142
+ if (npxCliPath) {
143
+ return { command: nodePath, argsPrefix: [npxCliPath] };
144
+ }
145
+ if (platform === "win32") {
146
+ throw new Error("Cannot locate npm/bin/npx-cli.js for safe Windows execution");
147
+ }
148
+ return { command: "npx", argsPrefix: [] };
149
+ }
150
+
151
+ function installBuddySkill(pkgRoot, skill) {
152
+ const srcDir = path.join(pkgRoot, "skills", skill);
153
+ if (!fs.existsSync(path.join(srcDir, "SKILL.md"))) {
154
+ console.error(`Skill not found: ${srcDir}. Reinstall @guandata/guanskill.`);
155
+ process.exit(1);
156
+ }
157
+
158
+ const targets = [
159
+ {
160
+ name: "CodeBuddy",
161
+ configDir: process.env.CODEBUDDY_CONFIG_DIR || path.join(os.homedir(), ".codebuddy"),
162
+ },
163
+ {
164
+ name: "WorkBuddy",
165
+ configDir: process.env.WORKBUDDY_CONFIG_DIR || path.join(os.homedir(), ".workbuddy"),
166
+ },
167
+ ];
168
+ const failures = [];
169
+
170
+ for (const target of targets) {
171
+ try {
172
+ const destDir = path.join(target.configDir, "skills", skill);
173
+ replaceDirectory(srcDir, destDir);
174
+ console.log(`Installed ${skill} to ${target.name}: ${destDir}`);
175
+ } catch (err) {
176
+ const message = `${target.name} install failed for ${skill}: ${err.message}`;
177
+ console.error(message);
178
+ failures.push(message);
179
+ }
180
+ }
181
+
182
+ if (failures.length > 0) {
183
+ throw new BuddyInstallError(failures);
184
+ }
185
+ }
186
+
187
+ function installPackageSkill(pkgRoot, skill, extraArgs, options = {}) {
188
+ const spawn = options.spawn || spawnSync;
189
+ const installBuddy = options.installBuddy || installBuddySkill;
190
+ const exit = options.exit || process.exit;
191
+ const npxInvocation = options.npxInvocation || resolveNpxInvocation();
192
+ const args = ["skills", "add", pkgRoot, "--skill", skill, "-g", "-y", ...extraArgs];
193
+ const result = spawn(npxInvocation.command, [...npxInvocation.argsPrefix, ...args], {
194
+ stdio: "inherit",
195
+ env: process.env,
196
+ shell: false,
197
+ });
198
+ if (result.error) {
199
+ throw result.error;
200
+ }
201
+ if (result.status == null) {
202
+ console.error(`${skill} installer terminated by signal: ${result.signal || "unknown"}`);
203
+ exit(1);
204
+ return false;
205
+ }
206
+ if (result.status !== 0) {
207
+ exit(result.status);
208
+ return false;
209
+ }
210
+ installBuddy(pkgRoot, skill);
211
+ return true;
212
+ }
213
+
214
+ function installSuiteSkill(extraArgs, options = {}) {
215
+ const pkgRoot = options.pkgRoot || path.join(__dirname, "..");
216
+ console.log(`\n== ${SUITE_SKILL} install-skill ==`);
217
+ return installPackageSkill(pkgRoot, SUITE_SKILL, extraArgs, options);
218
+ }
219
+
47
220
  function printVersion() {
48
221
  const pkg = ownPackage();
49
222
  console.log(`${pkg.name} ${pkg.version}`);
@@ -57,21 +230,39 @@ function printVersion() {
57
230
  }
58
231
  }
59
232
 
60
- function installAllSkills(extraArgs) {
61
- for (const component of COMPONENTS) {
62
- const scriptPath = resolveComponentBin(component);
63
- console.log(`\n== ${component.command} install-skill ==`);
64
- const result = spawnSync(process.execPath, [scriptPath, "install-skill", ...extraArgs], {
65
- stdio: "inherit",
66
- env: process.env,
67
- });
68
- if (result.error) {
69
- throw result.error;
233
+ function installAllSkills(extraArgs, options = {}) {
234
+ const components = options.components || COMPONENTS;
235
+ const resolvePackageRoot = options.resolveComponentPackageRoot || resolveComponentPackageRoot;
236
+ const installPackage = options.installPackageSkill || installPackageSkill;
237
+ const installSuite = options.installSuite || installSuiteSkill;
238
+ const buddyFailures = [];
239
+
240
+ function attemptInstall(install) {
241
+ try {
242
+ return install();
243
+ } catch (err) {
244
+ if (!(err instanceof BuddyInstallError)) {
245
+ throw err;
246
+ }
247
+ buddyFailures.push(...err.failures);
248
+ return true;
70
249
  }
71
- if (result.status) {
72
- process.exit(result.status);
250
+ }
251
+
252
+ for (const component of components) {
253
+ const pkgRoot = resolvePackageRoot(component);
254
+ console.log(`\n== ${component.command} install-skill ==`);
255
+ if (!attemptInstall(() => installPackage(pkgRoot, component.command, extraArgs))) {
256
+ return false;
73
257
  }
74
258
  }
259
+ if (!attemptInstall(() => installSuite(extraArgs))) {
260
+ return false;
261
+ }
262
+ if (buddyFailures.length > 0) {
263
+ throw new BuddyInstallError(buddyFailures);
264
+ }
265
+ return true;
75
266
  }
76
267
 
77
268
  function printHelp() {
@@ -116,4 +307,19 @@ function main() {
116
307
  process.exit(1);
117
308
  }
118
309
 
119
- main();
310
+ if (require.main === module) {
311
+ main();
312
+ }
313
+
314
+ module.exports = {
315
+ BuddyInstallError,
316
+ SUITE_SKILL,
317
+ copyDirectory,
318
+ installBuddySkill,
319
+ installAllSkills,
320
+ installPackageSkill,
321
+ installSuiteSkill,
322
+ replaceDirectory,
323
+ resolveComponentPackageRoot,
324
+ resolveNpxInvocation,
325
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guandata/guanskill",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Guandata BI Skills 聚合安装包 - 一次性安装和更新 guancli、guands、guanetl、guanwf、guanvis、guanmetric",
5
5
  "bin": {
6
6
  "guanskill": "bin/run.js",
@@ -12,23 +12,28 @@
12
12
  "guanmetric": "bin/run.js"
13
13
  },
14
14
  "scripts": {
15
+ "build": "node scripts/sync-skill.js",
16
+ "test": "npm run build && node scripts/sync-skill.test.js && node scripts/install-skill.test.js && node scripts/preflight.test.js && node scripts/pack.test.js",
17
+ "prepack": "npm run build",
18
+ "skillhub:dry-run": "npm run build && skillhub publish ./skillhub/guandata-cli-suite --host https://api.skillhub.cn --dry-run",
15
19
  "check-changelog": "node ../../scripts/check-release-changelog.js .",
16
- "prepublishOnly": "npm run check-changelog && node scripts/preflight.js"
20
+ "prepublishOnly": "npm run test && npm run check-changelog && node scripts/preflight.js"
17
21
  },
18
22
  "files": [
19
23
  "bin/",
24
+ "skills/",
20
25
  "CHANGELOG.md",
21
26
  "LICENSE",
22
27
  "LICENSE.zh-CN",
23
28
  "README.md"
24
29
  ],
25
30
  "dependencies": {
26
- "@guandata/guancli": "1.0.39",
27
- "@guandata/guands": "0.1.19",
31
+ "@guandata/guancli": "1.0.40",
32
+ "@guandata/guands": "0.1.20",
28
33
  "@guandata/guanetl": "0.1.19",
29
- "@guandata/guanwf": "0.1.7",
30
- "@guandata/guanvis": "0.1.30",
31
- "@guandata/guanmetric": "0.1.0"
34
+ "@guandata/guanwf": "0.1.820",
35
+ "@guandata/guanvis": "0.1.31",
36
+ "@guandata/guanmetric": "0.1.1"
32
37
  },
33
38
  "keywords": [
34
39
  "guandata",
@@ -38,7 +43,7 @@
38
43
  ],
39
44
  "license": "SEE LICENSE IN LICENSE",
40
45
  "engines": {
41
- "node": ">=14"
46
+ "node": ">=14.14.0"
42
47
  },
43
48
  "publishConfig": {
44
49
  "registry": "https://registry.npmjs.org/",
@@ -0,0 +1,133 @@
1
+ Guandata Developer Tools Free Evaluation License
2
+
3
+ Copyright (c) Hangzhou Guandata Co., Ltd.
4
+
5
+ This software and its related source code, documentation, examples, packages,
6
+ configuration files, command-line tools, MCP servers, SDKs, plugins, and tool
7
+ integrations are proprietary software of Hangzhou Guandata Co., Ltd. or its
8
+ licensors.
9
+
10
+ This license applies to Guandata developer tools, including but not limited to
11
+ Guandata CLI, Guandata MCP Server, related npm packages, source code,
12
+ documentation, examples, configuration files, and tool integrations.
13
+
14
+ 1. Free Personal Evaluation Use
15
+
16
+ Hangzhou Guandata Co., Ltd. grants you a limited, non-exclusive,
17
+ non-transferable, revocable license to use this software free of charge solely
18
+ for personal learning, local testing, technical evaluation, and non-production
19
+ experiments.
20
+
21
+ This free license does not permit enterprise, commercial, production, internal
22
+ business, team, organizational, hosted, customer-facing, or revenue-generating
23
+ use.
24
+
25
+ 2. Enterprise and Commercial Use
26
+
27
+ Any use by or for a company, organization, institution, government entity, team,
28
+ client, or other non-individual entity requires a separate commercial license
29
+ from Hangzhou Guandata Co., Ltd.
30
+
31
+ Enterprise or commercial use includes, but is not limited to:
32
+
33
+ - use in production, staging, shared, or hosted environments;
34
+ - use for internal business operations or automated business workflows;
35
+ - use by employees, contractors, consultants, service providers, or
36
+ representatives on behalf of an organization;
37
+ - integration into commercial products, services, platforms, workflows, AI
38
+ agents, MCP clients, or customer deliverables;
39
+ - connection to, access to, processing of, exposure of, or operation on
40
+ enterprise data, business systems, customer data, or production data;
41
+ - redistribution, hosting, resale, sublicensing, or provision of this software
42
+ as part of a paid or unpaid service.
43
+
44
+ To obtain an enterprise or commercial license, please contact Hangzhou Guandata
45
+ Co., Ltd. through its official sales, support, or business channels.
46
+
47
+ 3. MCP Server and Agent Integration
48
+
49
+ For Guandata MCP Server or any MCP-compatible tool integration, the free license
50
+ is limited to local personal testing, learning, and non-production evaluation.
51
+
52
+ The free license does not permit use of the MCP Server in enterprise agent
53
+ platforms, production AI applications, shared team environments,
54
+ customer-facing systems, hosted services, automated business workflows, or
55
+ integrations that access, process, expose, or operate on enterprise data.
56
+
57
+ Any organizational, commercial, hosted, production, or data-connected use of the
58
+ MCP Server requires a separate commercial license from Hangzhou Guandata Co., Ltd.
59
+
60
+ 4. Restrictions
61
+
62
+ Unless expressly permitted by this license, reasonably necessary to install and
63
+ use the software as allowed by this license, or expressly permitted by a
64
+ separate written agreement with Hangzhou Guandata Co., Ltd., you may not:
65
+
66
+ - copy, distribute, sublicense, sell, lease, host, or provide this software to
67
+ third parties;
68
+ - modify, adapt, translate, create derivative works of, or otherwise alter this
69
+ software;
70
+ - reverse engineer, decompile, disassemble, or attempt to derive the source
71
+ code, structure, sequence, organization, or underlying ideas of this software,
72
+ except to the extent such restriction is prohibited by applicable law;
73
+ - remove or alter copyright, trademark, license, or proprietary notices;
74
+ - use Guandata names, logos, trademarks, product names, or brand assets without
75
+ permission;
76
+ - use this software in violation of applicable laws, regulations, or third-party
77
+ rights;
78
+ - circumvent license, access control, usage limitation, telemetry, audit, or
79
+ security mechanisms, if any.
80
+
81
+ 5. Ownership
82
+
83
+ Hangzhou Guandata Co., Ltd. and its licensors retain all rights, title, and
84
+ interest in and to this software. No rights are granted except as expressly
85
+ stated in this license.
86
+
87
+ 6. Third-Party Components
88
+
89
+ Third-party open source components, if any, are licensed under their respective
90
+ licenses. This license applies only to software owned by Hangzhou Guandata Co., Ltd.
91
+ and does not modify any third-party license terms.
92
+
93
+ 7. No Warranty
94
+
95
+ This software is provided "as is" and "as available", without warranties of any
96
+ kind, whether express, implied, statutory, or otherwise, including but not
97
+ limited to warranties of merchantability, fitness for a particular purpose,
98
+ accuracy, availability, security, and non-infringement.
99
+
100
+ 8. Limitation of Liability
101
+
102
+ To the maximum extent permitted by applicable law, Hangzhou Guandata Co., Ltd.
103
+ shall not be liable for any indirect, incidental, special, consequential,
104
+ exemplary, or punitive damages, or for any loss of profits, revenue, data,
105
+ goodwill, business opportunity, or business interruption arising from or related
106
+ to this software, even if Hangzhou Guandata Co., Ltd. has been advised of the
107
+ possibility of such damages.
108
+
109
+ 9. Termination
110
+
111
+ Your rights under this license terminate automatically if you violate any term of
112
+ this license. Upon termination, you must stop using the software and delete all
113
+ copies in your possession or control.
114
+
115
+ 10. Governing Law and Dispute Resolution
116
+
117
+ This license shall be governed by the laws of the People's Republic of China,
118
+ without regard to its conflict of laws principles.
119
+
120
+ Any dispute arising from or related to this license or the software shall be
121
+ submitted to the competent court with jurisdiction in Hangzhou, Zhejiang
122
+ Province, China, unless otherwise required by applicable law.
123
+
124
+ 11. Contact
125
+
126
+ For enterprise licensing, commercial authorization, partnership, procurement, or
127
+ other questions, please contact Hangzhou Guandata Co., Ltd. through its official
128
+ website or official business channels.
129
+
130
+ 12. Language
131
+
132
+ If this license is provided in multiple languages, the English version controls
133
+ unless Hangzhou Guandata Co., Ltd. expressly states otherwise in writing.
@@ -0,0 +1,82 @@
1
+ 观远开发者工具免费评估许可协议
2
+
3
+ 版权所有 (c) 杭州观远数据有限公司。
4
+
5
+ 本软件及其相关源代码、文档、示例、软件包、配置文件、命令行工具、MCP Server、SDK、插件和工具集成,属于杭州观远数据有限公司或其授权方的专有软件。
6
+
7
+ 本协议适用于观远开发者工具,包括但不限于观远 CLI、观远 MCP Server、相关 npm 包、源代码、文档、示例、配置文件和工具集成。
8
+
9
+ 1. 免费个人评估使用
10
+
11
+ 杭州观远数据有限公司授予你一项有限的、非独占的、不可转让的、可撤销的许可,允许你免费使用本软件,但仅限于个人学习、本地测试、技术评估和非生产环境实验。
12
+
13
+ 本免费许可不允许企业使用、商业使用、生产环境使用、内部业务使用、团队使用、组织使用、托管使用、面向客户的使用,或任何直接或间接产生商业收益的使用。
14
+
15
+ 2. 企业及商业使用
16
+
17
+ 任何由公司、组织、机构、政府单位、团队、客户或其他非个人主体进行的使用,或代表上述主体进行的使用,均需事先取得杭州观远数据有限公司的单独商业授权。
18
+
19
+ 企业或商业使用包括但不限于:
20
+
21
+ - 在生产环境、预发布环境、共享环境或托管环境中使用;
22
+ - 用于内部业务运营或自动化业务流程;
23
+ - 由员工、承包商、顾问、服务商或代理人代表组织使用;
24
+ - 集成到商业产品、服务、平台、工作流、AI 智能体、MCP 客户端或客户交付物中;
25
+ - 连接、访问、处理、暴露或操作企业数据、业务系统、客户数据或生产数据;
26
+ - 对本软件进行分发、托管、转售、再许可,或作为任何付费或免费的服务的一部分提供。
27
+
28
+ 如需企业或商业授权,请通过观远官方销售、支持或商务渠道联系杭州观远数据有限公司。
29
+
30
+ 3. MCP Server 与智能体集成
31
+
32
+ 对于观远 MCP Server 或任何兼容 MCP 的工具集成,免费许可仅限于个人本地测试、学习和非生产环境评估。
33
+
34
+ 免费许可不允许将 MCP Server 用于企业级智能体平台、生产环境 AI 应用、团队共享环境、面向客户的系统、托管服务、自动化业务流程,或任何访问、处理、暴露、操作企业数据的集成场景。
35
+
36
+ 任何组织用途、商业用途、托管用途、生产用途,或涉及企业数据连接的 MCP Server 使用,均需取得杭州观远数据有限公司的单独商业授权。
37
+
38
+ 4. 限制
39
+
40
+ 除非本协议明确允许、为按照本协议安装和使用本软件所合理必需,或杭州观远数据有限公司通过单独书面协议明确允许,你不得:
41
+
42
+ - 复制、分发、再许可、销售、出租、托管本软件,或向第三方提供本软件;
43
+ - 修改、改编、翻译本软件,创作本软件的衍生作品,或以其他方式变更本软件;
44
+ - 对本软件进行反向工程、反编译、反汇编,或试图获取本软件的源代码、结构、顺序、组织方式或底层思想,但适用法律禁止限制的情形除外;
45
+ - 删除或修改版权、商标、许可或专有权利声明;
46
+ - 未经许可使用杭州观远数据有限公司或观远品牌的名称、标识、商标、产品名称或品牌资产;
47
+ - 以违反适用法律法规或第三方权利的方式使用本软件;
48
+ - 绕过任何许可、访问控制、使用限制、遥测、审计或安全机制。
49
+
50
+ 5. 权利归属
51
+
52
+ 本软件的所有权利、所有权和利益均归杭州观远数据有限公司及其授权方所有。除本协议明确授予的权利外,不授予任何其他权利。
53
+
54
+ 6. 第三方组件
55
+
56
+ 本软件中如包含第三方开源组件,该等组件适用其各自的许可协议。本协议仅适用于杭州观远数据有限公司拥有权利的软件部分,并不修改任何第三方许可条款。
57
+
58
+ 7. 无担保
59
+
60
+ 本软件按“现状”和“现有”基础提供,不作任何明示、默示、法定或其他形式的担保,包括但不限于适销性、特定用途适用性、准确性、可用性、安全性和不侵权担保。
61
+
62
+ 8. 责任限制
63
+
64
+ 在适用法律允许的最大范围内,杭州观远数据有限公司不对因本软件引起或与本软件相关的任何间接、附带、特殊、后果性、惩罚性或惩戒性损害承担责任,也不对利润、收入、数据、商誉、商业机会损失或业务中断承担责任,即使杭州观远数据有限公司已被告知可能发生该等损害。
65
+
66
+ 9. 终止
67
+
68
+ 如果你违反本协议的任何条款,你在本协议项下的权利将自动终止。终止后,你必须停止使用本软件,并删除你持有或控制的所有副本。
69
+
70
+ 10. 适用法律与争议解决
71
+
72
+ 本协议适用中华人民共和国法律,但不包括其冲突法规则。
73
+
74
+ 因本协议或本软件引起或与之相关的任何争议,应提交中国浙江省杭州市有管辖权的人民法院解决,除非适用法律另有强制性规定。
75
+
76
+ 11. 联系方式
77
+
78
+ 如需企业授权、商业许可、合作、采购或有其他问题,请通过观远官方网站或官方商务渠道联系杭州观远数据有限公司。
79
+
80
+ 12. 语言
81
+
82
+ 如本协议提供多个语言版本,除非杭州观远数据有限公司另有明确书面说明,以英文版本为准。
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: guandata-cli-suite
3
+ description: 观远 CLI 套件的统一入口。用户要查询或分析 ETL、数据集、页面、卡片、指标和血缘,读写表单填报数据,创建 SuperApp 模板,管理数据源或数据集,创建修改 ETL,构建图表或仪表板,创建编辑指标,或查询和编排工作流、数据流时使用。根据任务选择 guancli、guands、guanetl、guanvis、guanmetric 或 guanwf;若组件尚未安装,则引导通过 @guandata/guanskill 安装正式套件。
4
+ license: SEE LICENSE IN LICENSE
5
+ ---
6
+
7
+ # 观远 CLI 套件
8
+
9
+ 根据观远数据任务选择对应的正式 CLI Skill,并按目标 Skill 的最新说明完成查询、修改和验证。
10
+
11
+ ## 执行流程
12
+
13
+ 1. 判断用户是在了解能力、请求安装,还是要执行具体任务。
14
+ 2. 按“能力路由”选择最贴近主任务的组件;跨域任务再按依赖顺序组合多个组件。
15
+ 3. 检查目标组件是否已安装。已安装时使用对应 Skill;未安装时进入“安装套件”流程。
16
+ 4. 遵守目标 Skill 的查询、预览、确认、保存、发布和验证规则。
17
+
18
+ ## 能力路由
19
+
20
+ | 用户意图 | 使用 Skill | 边界 |
21
+ |---|---|---|
22
+ | 查询、分析 ETL、数据集、字段、页面、卡片、血缘、节点 SQL、指标数据,读写表单填报数据,或创建 SuperApp 模板 | `guancli` | 负责查询分析、表单数据 CRUD 和通用入口;不负责修改 ETL、数据集或仪表板 |
23
+ | 管理连接器、账号、数据源、数据集、目录、导入数据、增量更新、刷新调度、计算字段,或创建 SurveyEngine 填报表单 | `guands` | 数据源和数据集写操作,以及表单结构创建 |
24
+ | 新建、修改、调试、保存、运行、取消或调度 ETL | `guanetl` | 查基础元信息时可先配合 `guancli` |
25
+ | 新建、修改、组装卡片、筛选器、指标卡片或仪表板,或做页面截图验证 | `guanvis` | 只查询现有页面或卡片内容时使用 `guancli` |
26
+ | 创建、编辑、删除指标,管理指标主题、目录、公共维度或标准化指标 Excel | `guanmetric` | 指标查询仍使用 `guancli` |
27
+ | 查询、创建、编辑、保存、运行工作流或数据流,编排 Python、子工作流和多节点 DAG | `guanwf` | 工作流引擎能力;普通 ETL 使用 `guanetl` |
28
+
29
+ 典型跨域顺序:先用 `guands` 准备数据层,再按需用 `guanetl` 做复杂转换,最后用 `guanvis` 构建可视化。查询线上资源 ID 或结构时使用 `guancli`。
30
+
31
+ ## 安装套件
32
+
33
+ 先检查 `guanskill` 和目标组件命令是否可用。macOS/Linux 使用:
34
+
35
+ ```bash
36
+ command -v guanskill
37
+ command -v guancli
38
+ ```
39
+
40
+ Windows PowerShell 使用:
41
+
42
+ ```powershell
43
+ Get-Command guanskill
44
+ Get-Command guancli
45
+ ```
46
+
47
+ 若未安装,说明将安装六个正式组件;获得用户同意后执行:
48
+
49
+ ```bash
50
+ npm install -g @guandata/guanskill
51
+ guanskill install-skill
52
+ ```
53
+
54
+ 安装要求和认证说明以官方文档为准:
55
+
56
+ `https://www.guandata.com/guandata-cli-installation-guide.md`
57
+
58
+ 安装完成后重新加载目标组件 Skill,再继续原始任务。
59
+
60
+ 需要连接观远环境时检查认证状态:
61
+
62
+ ```bash
63
+ guancli auth status
64
+ ```
65
+
66
+ 尚未认证时引导用户执行 `guancli auth login`。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "观远 CLI 套件"
3
+ short_description: "统一识别观远数据场景并路由到正式 CLI Skills"
4
+ default_prompt: "Use $guandata-cli-suite to handle this Guandata task with the appropriate official CLI skill."