@klingai/plugin-global 0.0.1-beta → 0.0.2-beta

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.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "kling-universal",
4
4
  "displayName": "Kling AI",
5
- "version": "0.0.1-beta",
5
+ "version": "0.0.2-beta",
6
6
  "description": "Create and edit images and Kling 4.0 videos with keyframes, Omni-Ref, reusable subjects, and motion control.",
7
7
  "author": {
8
8
  "name": "Kling AI"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kling-universal",
3
- "version": "0.0.1-beta",
3
+ "version": "0.0.2-beta",
4
4
  "description": "Create and edit images and Kling 4.0 videos with keyframes, Omni-Ref, reusable subjects, and motion control.",
5
5
  "author": {
6
6
  "name": "Kling AI"
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "kling-universal",
4
4
  "displayName": "Kling AI",
5
- "version": "0.0.1-beta",
5
+ "version": "0.0.2-beta",
6
6
  "description": "Create and edit images and Kling 4.0 videos with keyframes, Omni-Ref, reusable subjects, and motion control.",
7
7
  "author": {
8
8
  "name": "Kling AI"
package/README.cn.md ADDED
@@ -0,0 +1,48 @@
1
+ # 可灵 AI 插件
2
+
3
+ 在 AI 助手中使用可灵 AI 生成图片、创作视频、复用角色主体和控制动作。内置 CLI、创作 Skill 和 MCP 集成。
4
+
5
+ 需要 Node.js 18 或更高版本。本包适用于中国站账号;海外站账号请安装 `@klingai/plugin-global`。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ npm i -g @klingai/plugin-cn@latest
11
+ ```
12
+
13
+ 安装时自动为默认支持的全部助手安装 Skill,无需选择助手。安装后重启助手,新建会话即可使用 **Kling AI Plugin**。
14
+
15
+ ## 快速开始
16
+
17
+ 在助手中输入:
18
+
19
+ ```text
20
+ 使用可灵 AI 插件,生成一张图片:一只柴犬坐在咖啡馆窗边。
21
+ ```
22
+
23
+ 首次使用时按提示完成登录。生成图片和视频会消耗灵感值,可用模型和功能以当前账号为准。
24
+
25
+ 也可以在终端使用内置 CLI:
26
+
27
+ ```bash
28
+ kling-plugin login
29
+ kling-plugin who_am_i
30
+ ```
31
+
32
+ ## 升级
33
+
34
+ ```bash
35
+ npm i -g @klingai/plugin-cn@latest
36
+ ```
37
+
38
+ 升级后重启助手。
39
+
40
+ ## 检查与卸载
41
+
42
+ ```bash
43
+ # 检查安装
44
+ plugin-cn doctor --host all
45
+
46
+ # 完整卸载,保留登录凭据和日志
47
+ plugin-cn uninstall
48
+ ```
@@ -0,0 +1,48 @@
1
+ # Kling AI Plugin
2
+
3
+ Generate images and videos, reuse Elements, and control motion with Kling AI in your AI assistant. Includes a CLI, a creation Skill, and MCP integration.
4
+
5
+ Requires Node.js 18+. This package is for Global accounts; use `@klingai/plugin-cn` for China-site accounts.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm i -g @klingai/plugin-global@latest
11
+ ```
12
+
13
+ Installation automatically adds the Skill for all default supported assistants. No assistant selection is needed. Restart your assistant and open a new conversation to use **Kling AI Plugin**.
14
+
15
+ ## Quick Start
16
+
17
+ Ask your assistant:
18
+
19
+ ```text
20
+ Use Kling AI Plugin to generate an image of a shiba inu sitting by a cafe window.
21
+ ```
22
+
23
+ Follow the sign-in instructions when prompted. Image and video generation consumes credits. Available models and features depend on your account.
24
+
25
+ You can also use the bundled CLI in your terminal:
26
+
27
+ ```bash
28
+ kling-plugin login
29
+ kling-plugin who_am_i
30
+ ```
31
+
32
+ ## Upgrade
33
+
34
+ ```bash
35
+ npm i -g @klingai/plugin-global@latest
36
+ ```
37
+
38
+ Restart your assistant after upgrading.
39
+
40
+ ## Check And Uninstall
41
+
42
+ ```bash
43
+ # Check installation
44
+ plugin-global doctor --host all
45
+
46
+ # Uninstall; keep login credentials and logs
47
+ plugin-global uninstall
48
+ ```
package/README.md CHANGED
@@ -1,93 +1,48 @@
1
- # Kling AI 通用安装包 / Universal Plugin
1
+ # Kling AI Plugin
2
2
 
3
- 可灵 AI Agent 安装包按账号区域发布为两个独立 npm 包,二者共享同一份源码,但端点在发布时固定,运行时不可切换:
3
+ Generate images and videos, reuse Elements, and control motion with Kling AI in your AI assistant. Includes a CLI, a creation Skill, and MCP integration.
4
4
 
5
- | 账号区域 | npm 包 | registry | 固定 MCP |
6
- | --- | --- | --- | --- |
7
- | 中国区 | `@klingai/plugin-cn` | `https://registry.npmjs.org` | `https://klingai.com/mcp/plugin` |
8
- | 海外区 | `@klingai/plugin-global` | `https://registry.npmjs.org` | `https://kling.ai/mcp/plugin` |
5
+ Requires Node.js 18+. This package is for Global accounts; use `@klingai/plugin-cn` for China-site accounts.
9
6
 
10
- 支持可灵 4.0、4.0 Flash 等账号实时可用模型,覆盖图片生成与编辑、文生视频、图生视频、关键帧、全能参考、角色主体和动作控制。模型、参数和素材限制以 `who_am_i` 的实时声明为准。通用 Skill 的列表描述直接介绍创作用途,MCP 与 CLI 的执行通道由 Skill 正文选择。
11
-
12
- Skill 的目录和 frontmatter 内部名称统一为 `kling-ai-plugin`,`agents/openai.yaml` 中的显示名为 **Kling AI Plugin**。所有默认技能目录与 frontmatter 名称一致,不安装不同目录别名,避免跨目录发现产生重复菜单。复制和软连接均携带同一区域的 `dist/cli.mjs`,独立沙箱可用 Node 直接运行,无需访问桌面用户的 `~/.kling`。
13
-
14
- 两个包都是分发和兼容层,不是第二个可灵产品或第二套 MCP App UI。每个包同时提供:
15
-
16
- - 与所选账号区域一致的预构建 `kling` CLI;
17
- - 原生 Host 使用的 `kling-ai` 远端 MCP 注册(域名带 `/mcp/plugin` 后缀);
18
- - 可被 Agent 自动触发的一个 Skill:`kling-ai-plugin`,包含图片、视频和素材管理;
19
- - Agent Plugins 1.0、Codex、Claude Code、WorkBuddy 兼容清单;
20
- - 面向主流本地 Agent Host 与开放 Agent Skills 生态的 `npx` 安装器,并提供任意 Skill 目录兜底。
21
-
22
- ## 云端应用导入
23
-
24
- Manus Studio 与 Grok Bot 的执行电脑不在桌面用户目录中,不能用本地 `--skills-dir` 自动安装到云端。当前 CN PRT 已实际导入并执行随 Skill 附带的 CLI,版本为 `0.4.13-beta.6`;不代表收费业务、Global 或 MCP App UI 已验收。
25
-
26
- 内网正式端点构建同时输出两份可导入 ZIP,路径见构建结果 JSON:
27
-
28
- | 字段 | 导入目标 | ZIP 布局 |
29
- | --- | --- | --- |
30
- | `skillArchive` | Manus 等要求根目录技能文件的宿主 | 根目录包含 `SKILL.md`、对应区域 `dist/cli.mjs` 和版本元数据 |
31
- | `claudeSkillArchive` | Claude 主界面的 `Customize → Skills` | 顶层 `kling-ai-plugin/` 文件夹,完整运行时位于 `lib/kling-cli/`,封装使用相对导入,避免 Claude 拒绝含 `@` 的 npm 路径 |
32
-
33
- 发布构建机需提供 `zip`;这是构建工具,不是安装包运行时依赖。已构建的 npm 包也可单独导出,Claude 无需再手动调整 ZIP:
7
+ ## Installation
34
8
 
35
9
  ```bash
36
- node plugin/scripts/export-skill.mjs /绝对路径/已构建的plugin /绝对路径/新建的skill.zip
37
- node plugin/scripts/export-skill.mjs /绝对路径/已构建的plugin /绝对路径/新建的claude-skill.zip --format claude
10
+ npm i -g @klingai/plugin-global@latest
38
11
  ```
39
12
 
40
- 普通 `pnpm build:plugin` 也会生成 `plugin/archives/claude-skill.zip`;发布的 npm 包携带同一路径 `archives/claude-skill.zip`,可直接上传到 Claude。该 ZIP 是构建时的区域 CLI 快照;重新执行本地安装器不会更新已导入 Claude 的账号侧副本,需要用新版 ZIP 替换。
13
+ Installation automatically adds the Skill for all default supported assistants. No assistant selection is needed. Restart your assistant and open a new conversation to use **Kling AI Plugin**.
41
14
 
42
- - Manus Studio:更多 → 技能 → 创建 → 上传技能。导入 ZIP 后在“我的技能”启用自动生效,再新建会话。实际菜单仅一项 `kling-ai-plugin`,加载 `/home/ubuntu/skills/kling-ai-plugin/SKILL.md`,便携 CLI 已在应用终端执行成功。仅导入但未挂载时,菜单可见不等于可调用。
43
- - Grok Bot:通过附件上传 ZIP,在 Bot 云端安装到其用户 Skill 目录;本次由应用确认目录为 `/home/box/agent-data/workflows/kling-ai-plugin`,frontmatter 保留 `kling-ai-plugin`。已检查正常目录索引加载及可见终端的版本/退出码;Grok 没有本地 slash 技能菜单,本轮不能宣称菜单名称验收通过。不要据此新增猜测的桌面目录。
44
- - TRAE CN:本机应用未成功启动出窗口;Antigravity:账号地区资格限制。两者尚未完成应用调用验收,不新增默认安装目标。
15
+ ## Quick Start
45
16
 
46
- ## 安装
17
+ Ask your assistant:
47
18
 
48
- 插件自带对应区域的 CLI:构建时由 `kling-cli/src` 打包为 `dist/cli.js`,区域端点在构建时写死,不依赖 `@klingai/cli-*` 包,也不随它们的 `latest` 变化。持久化命令为 `~/.kling/bin/kling-plugin`(私有 wrapper,不是 npm bin),固定使用 `/mcp/plugin`;Skill 另带同一份单文件 CLI(`dist/cli.mjs`),无需 `node_modules`。升级会移除本插件托管的旧 `kling`、`kling-ai-plugin` wrapper。安装后安装器会把 `kling-plugin` 链接到 PATH 中一个已有且可写的目录(优先 `~/.local/bin`、`/opt/homebrew/bin`、`/usr/local/bin`),不改 shell 配置、不覆盖非本包托管的同名文件;没有合适目录时会提示把 `~/.kling/bin` 加入 PATH,卸载时移除该链接。Skill 只使用插件持久化封装或自带封装;PATH 中独立 `kling` 不作为插件回退,独立 CLI 也不会被插件覆盖。
49
-
50
- ```bash
51
- npx --yes --registry=https://registry.npmjs.org @klingai/plugin-cn@beta doctor --host codex
52
- ~/.kling/bin/kling-plugin --version
19
+ ```text
20
+ Use Kling AI Plugin to generate an image of a shiba inu sitting by a cafe window.
53
21
  ```
54
22
 
55
- Codex 的 `doctor` 会额外报告旧版 Kling 插件、marketplace 和远端 MCP 注册。Codex、Claude Code 的 `doctor` 还会核对 Host 实际启用的插件版本,Pi 会核对包级注册;目录型 Host 则核对通用 Skill 的托管标记与版本。普通 `install --host codex` 会自动执行同一套有备份的迁移;也可以预先查看或单独执行。
23
+ Follow the sign-in instructions when prompted. Image and video generation consumes credits. Available models and features depend on your account.
56
24
 
57
- Claude Code 若启用了其他提供 `kling-ai` MCP 的插件,安装预检会阻止显式 `--host claude` 安装;批量安装会跳过 Claude 并继续其他 Host。`doctor` 也会报告该冲突,但不会擅自卸载不属于本包管理的插件。所有 Host 的 `doctor` 都不能证明账号已登录、当前会话已刷新或 AI 已调用 Skill。请在对应 Host 的技能列表中新开会话核对通用 Skill;无法登录的 Host 不能视为通过界面验收。
58
-
59
- Cursor 同时发现共享目录和 Claude 用户技能目录。不同目录标识可以显示为相同的技能名称,形成两个入口;本包现在统一目录名与 frontmatter 为 `kling-ai-plugin`,升级时移除托管的 `kling-universal` 与 `Kling AI Plugin` 旧标识。旧版跨 Host 的实测记录见验收文档;此次改名后的菜单和调用显示需要重新验收。独立旧插件与非托管副本不会被清理;其他重复项须先确认实际来源,`doctor` 不替代菜单唯一性验收。
60
-
61
- 完整卸载使用一条命令,无需区分 npm 本地或全局安装:
25
+ You can also use the bundled CLI in your terminal:
62
26
 
63
27
  ```bash
64
- npx --yes --registry=https://registry.npmjs.org @klingai/plugin-cn@beta uninstall
28
+ kling-plugin login
29
+ kling-plugin who_am_i
65
30
  ```
66
31
 
67
- 开发验收可运行 `node plugin/scripts/verify-uninstall.mjs /绝对路径/package.tgz`,在隔离目录验证多个项目、全局 prefix、保留用户数据和重复卸载。`verify-host-discovery.mjs` 还会检查真实 Host 在安装后能发现 Skill、完整卸载后不再发现 Skill;追加旧版压缩包路径作为第二个参数,可验证从三个入口升级为一个入口以及旧入口不再被 Host 发现。
68
-
69
- 该命令移除本包托管的所有 Host Skill(含记录的自定义目录)、持久化 `kling` CLI、插件文件与找到的本地/全局 npm 包;凭据、日志、其他 Skill 和非本包的同名可执行文件保留。支持 npm workspace 的根项目与子项目依赖声明;即使 `node_modules` 或包目录已删除,也会清理声明及指向本包的失效 npm 命令链接。原生注册通过 Host 的插件清单核对,尊重 `CODEX_HOME`、`CLAUDE_CONFIG_DIR`、`PI_CODING_AGENT_DIR`,注销后再次检查。可先使用 `uninstall --dry-run` 查看计划。失败会非零退出并保留持久化安装器与记录,方便重试,不会报告“已完整卸载”。
70
-
71
- 从 0.4.11 起,安装器记录 npm 包与 Skill 目录,支持清理多个项目或自定义全局 prefix 的安装。对于没有记录的旧版本,请在原 npm 安装项目目录执行;命令会检查当前目录的父级项目及 npm 当前全局位置,不扫描整块磁盘。npx 下载缓存由 npm 管理,不作为已安装插件清理。
72
-
73
- 显式指定 Host 仍只卸载对应集成,不移除 npm 包;卸载不会删除 `~/.kling/.credentials` 或历史日志:
32
+ ## Upgrade
74
33
 
75
34
  ```bash
76
- npx --yes --registry=https://registry.npmjs.org @klingai/plugin-cn@beta uninstall --host codex
35
+ npm i -g @klingai/plugin-global@latest
77
36
  ```
78
37
 
79
- ## MCP 与 Skill
38
+ Restart your assistant after upgrading.
80
39
 
81
- 每个区域包只做两件事:
40
+ ## Check And Uninstall
82
41
 
83
- 1. **原生远端 MCP 注册**:插件清单中的 `kling-ai` 直接连接该区域固定的、带 `plugin` 后缀的 Streamable HTTP MCP(中国区 `https://klingai.com/mcp/plugin`,海外区 `https://kling.ai/mcp/plugin`)。npm 包不复制、重写或发布 HTML,也不提供 stdio Bridge。
84
- 2. **给各 Host 安装 Skill**:通用 Skill 的目录名和 frontmatter 统一为 `kling-ai-plugin`,用户显示名为 `Kling AI Plugin`;内部插件注册 ID 为 `kling-universal`。
85
-
86
- UI 是否出现由 Host 决定,npm/CLI 不能替 Host 增加 iframe 渲染能力。一次生成只能选择原生 MCP 或 CLI 其中一条通道,避免重复扣费。
87
-
88
- ## 运行限制
42
+ ```bash
43
+ # Check installation
44
+ plugin-global doctor --host all
89
45
 
90
- - `@klingai/plugin-cn` 固定连接中国区 `https://klingai.com`;`@klingai/plugin-global` 固定连接海外区 `https://kling.ai`。
91
- - 两个包不提供环境变量或配置文件切区;换区必须安装另一个包并重新完成对应账号授权。
92
- - Host 的网络或文件沙箱仍然生效;受限模式下可能需要用户批准访问网络与 `~/.kling`。
93
- - Node.js 18 或更高版本。
46
+ # Uninstall; keep login credentials and logs
47
+ plugin-global uninstall
48
+ ```
Binary file