Skip to content

Commit db844fa

Browse files
committed
rebase onto main:external_plugins 新布局,payload 刷新 v1.98.2(清 pytest_cache 遗留)
1 parent e11153b commit db844fa

966 files changed

Lines changed: 139031 additions & 1901 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ scripts/publish_incremental.py export-ignore
2525
tests/test_sync_external_prs.py export-ignore
2626
tests/test_distribution.py export-ignore
2727
tests/test_public_docs.py export-ignore
28+
.agents/skills/zcode-plugin-sync/ export-ignore
29+
.claude/skills/zcode-plugin-sync export-ignore
30+
.agents/skills/zcode-plugin-license-review/ export-ignore
31+
.claude/skills/zcode-plugin-license-review export-ignore
32+
33+
plugins/openpencil/licenses/font-NotoNaskhArabic-OFL.txt -whitespace
34+
35+
# Blank context lines in unified patches intentionally contain one space.
36+
ui-plugins/*craft/patches/*.patch -whitespace
37+
ui-plugins/craft-runtime/fonts/OFL-LXGWWenKai.txt -whitespace

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@ PR title must follow Conventional Commits / PR 标题必须符合 Conventional C
66
The PR title becomes the squash commit on main. / PR 标题会成为 main 上的最终提交信息。
77
-->
88

9+
## Plugin type (required) / 插件类型(必填)
10+
11+
Select exactly one before requesting review. / 发起评审前必须且只能勾选一项。
12+
13+
- [ ] **UI Plugin / 是 UI 插件** — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
14+
- [ ] **Standard plugin / 普通插件(非 UI)** — does not provide MCP Apps interactive pages / 不提供 MCP Apps 交互页面
15+
- [ ] **Not applicable / 不适用** — repository-only changes; no plugin content changed / 仅仓库级改动,不涉及插件内容
16+
17+
Affected plugin name(s) / 涉及的插件名称:
18+
19+
<!-- Use the manifest name; write N/A only for repository-only changes.
20+
填写清单中的 name;仅仓库级改动时填写 N/A。 -->
21+
22+
Classify the affected plugin, even when only changing its docs or skills. Adding or removing an interactive page also counts as a UI Plugin change. For multiple plugins, list each name and type; select UI Plugin if any is affected.
23+
24+
按涉及的插件判断,即使本次只改它的文档或 skill 也须声明类型。新增或移除交互页面也属于 UI Plugin 改动。涉及多个插件时分别列出名称和类型,只要包含 UI Plugin 就选择 UI Plugin。
25+
26+
`ui.surfaces` panels and tool-result pages using `_meta.ui.resourceUri` both count. An MCP server or a skill that generates Gen UI alone does not. This declaration is separate from marketplace `category`.
27+
28+
`ui.surfaces` 面板和通过 `_meta.ui.resourceUri` 展示的工具结果页面都算 UI Plugin。仅有 MCP server 或生成 Gen UI 的 skill 不算。这项声明与市场 `category` 分类独立。
29+
930
## What / 改动内容
1031

1132
<!-- What does this PR change, and why? / 这个 PR 改了什么,为什么? -->
@@ -15,7 +36,9 @@ The PR title becomes the squash commit on main. / PR 标题会成为 main 上的
1536
<!-- For plugin changes. Delete this section for repo-level changes (docs/ci).
1637
插件改动必填;纯仓库级改动(docs/ci)可删除本节。 -->
1738

18-
- [ ] Plugin name is unique kebab-case; directory is `plugins/<name>/` / 插件名唯一且 kebab-case,目录为 `plugins/<name>/`
39+
- [ ] Plugin name is unique kebab-case; new external plugin directory is `external_plugins/<name>/`; existing fixes retain ownership / 插件名唯一且 kebab-case,外部新增插件位于 `external_plugins/<name>/`,已有插件修复保留原归属
40+
- [ ] Usage `category` is set independently of publisher ownership / 用途分类 `category` 已填写,与维护归属分开
41+
- [ ] Plugin type and affected names are declared above / 已在上方声明插件类型与涉及的插件名称
1942
- [ ] `version` bumped in BOTH `plugin.json` and `marketplace.json` (artifacts are immutable) / `plugin.json` 与 `marketplace.json` 两处版本号已同步升级(制品不可变)
2043
- [ ] `README.md` (EN) and `README_CN.md` (中文) both updated and equivalent / 中英文 README 均已更新且语义一致
2144
- [ ] `description_i18n` has both `en` and `zh-CN` / `description_i18n` 包含 `en` 与 `zh-CN`

‎.github/workflows/pr-title.yml‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎.github/workflows/publish.yml‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: Publish
44
on:
55
push:
66
branches: [main]
7+
pull_request:
78
workflow_dispatch:
89

910
permissions:
@@ -23,6 +24,31 @@ jobs:
2324
- uses: actions/setup-python@v5
2425
with:
2526
python-version: "3.12"
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: "24.14.0"
30+
- uses: pnpm/action-setup@v4
31+
with:
32+
version: "10.33.2"
33+
# Craft Web snapshots are compiled from pinned upstream sources, not committed.
34+
# Keep compiled snapshots and the installed Trunk between runs.
35+
- uses: actions/cache@v4
36+
with:
37+
path: |
38+
.craft-cache/snapshots
39+
.craft-cache/tools
40+
key: craft-${{ runner.os }}-${{ hashFiles('ui-plugins/*/upstream.json', 'ui-plugins/*/patches/**', 'ui-plugins/craft-runtime/**') }}
41+
restore-keys: craft-${{ runner.os }}-
42+
- name: Build and test MCP Apps
43+
env:
44+
CRAFT_TOOLCHAIN_INSTALL: "1"
45+
run: |
46+
pnpm install --frozen-lockfile
47+
pnpm build
48+
pnpm typecheck
49+
pnpm lint
50+
pnpm test
51+
pnpm test:artifacts
2652
- name: Validate
2753
run: python scripts/validate.py
2854
- name: Build distribution
@@ -33,15 +59,15 @@ jobs:
3359
name: dist
3460
path: dist/
3561
- name: Upload Pages artifact
36-
if: ${{ !github.event.repository.private }}
62+
if: ${{ github.event_name != 'pull_request' && !github.event.repository.private }}
3763
uses: actions/upload-pages-artifact@v3
3864
with:
3965
path: dist/
4066

4167
# Skipped when GitHub Pages is unavailable for the repository visibility tier.
4268
deploy-pages:
4369
needs: build
44-
if: ${{ !github.event.repository.private }}
70+
if: ${{ github.event_name != 'pull_request' && !github.event.repository.private }}
4571
runs-on: ubuntu-latest
4672
environment:
4773
name: github-pages

‎.github/workflows/validate.yml‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.gitignore‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
dist/
2-
!plugins/mimosa/payload/dist/
3-
!plugins/mimosa/payload/dist/**
1+
# Release output, UI source build intermediates and compiled install payloads
2+
# are generated by `pnpm build`, in CI and locally. None of them is committed.
3+
/dist/
4+
/ui-plugins/**/dist/
5+
/plugins/*/dist/
6+
/external_plugins/*/dist/
47
__pycache__/
58
.DS_Store
69

710
# Written by scripts/sync_external_prs.py for the CI after_script; never committed.
811
mirror-failure.txt
912
mirror-result.txt
1013
publish-failure.txt
14+
15+
# MCP App development dependencies and generated license intermediates.
16+
node_modules/
17+
ui-plugins/*/licenses/
18+
*.tsbuildinfo
19+
20+
# Craft Web snapshots are compiled from the pinned upstream; caches are local.
21+
/.craft-cache/
22+
/ui-plugins/*/web/
23+
24+
# JetBrain IDE
25+
.idea/*

‎AGENTS.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Derive the current contract from repository files, not memory or examples from o
1111
- Its actual component directories: `commands/`, `skills/`, `agents/`, and `hooks/`, plus `.mcp.json` when present
1212
- The matching entry in the root `marketplace.json`
1313
- Repository validators and tests for machine-enforced behavior
14+
- MCP App build sources under `ui-plugins/<name>/` and [the build contract](docs/MCP_APP_BUILD.md) when changing interactive plugins
15+
16+
For local testing, ordinary plugins and UI plugins share [the existing development workflow](docs/PLUGIN_DEVELOPMENT.md#18-test-a-plugin-locally). The root marketplace is the only catalogue: never hardcode plugin names in generic build or registration scripts, and never force-install a development skill. Compiled plugins own their build and optional stage scripts. `pnpm build` generates `dist/local-marketplace`; developers register this source and choose what to install. Rebuild, refresh the source, and reinstall selected plugins after changes. The host's `pnpm dev:desktop` only starts the application. Verify the marketplace record, installation, enabled state, and actual UI in the same application profile before reporting availability. Preserve existing source identities and plugin data.
1417

1518
## Workflow
1619

@@ -45,6 +48,8 @@ For a new plugin, start from `plugins/example-plugin/`, remove unused sample com
4548
Run the baseline checks from the repository root:
4649

4750
```shell
51+
pnpm install --frozen-lockfile
52+
pnpm build
4853
python3 scripts/validate.py
4954
python3 scripts/build_dist.py
5055
git diff --check
@@ -76,6 +81,7 @@ When adding a plugin, keep the merge request focused on the plugin package and i
7681

7782
## Git and Merge Request Workflow
7883

84+
- Before requesting review, complete the required plugin-type section in the PR template: UI Plugin, Standard plugin, or Not applicable for repository-only changes. List affected manifest names; classify plugins with MCP Apps interactive pages as UI Plugin even for docs-only edits to that plugin. See the [classification rules](CONTRIBUTING.md#declare-the-plugin-type-required).
7985
- Use Conventional Commits for commit messages and merge request titles, for example `fix(assets): refresh business plugin icons`.
8086
- Before pushing a working branch or updating its merge request, fetch the latest `origin/main` and rebase the working branch onto it.
8187
- Resolve and verify any rebase conflicts locally before publishing the rewritten history.

‎CONTRIBUTING.md‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Thank you for improving the ZCode Plugins Marketplace. Use GitHub Issues for pro
1414

1515
Every plugin must:
1616

17-
- live in a unique kebab-case directory under `plugins/`;
17+
- live in a unique kebab-case directory under `external_plugins/` for partner/community submissions; `plugins/` is reserved for officially maintained plugins;
1818
- include `.zcode-plugin/plugin.json` with `name`, `description`, `version`, and `author`;
1919
- have a matching `name`, `version`, and description in the root [`marketplace.json`](./marketplace.json);
2020
- provide at least one useful component: command, skill, hook, agent, or MCP server;
@@ -31,7 +31,8 @@ Do not commit credentials, private endpoints, customer data, machine-specific pa
3131
2. Copy the example plugin, or edit the existing plugin in scope:
3232

3333
```shell
34-
cp -R plugins/example-plugin plugins/<your-plugin-name>
34+
mkdir -p external_plugins
35+
cp -R plugins/example-plugin external_plugins/<your-plugin-name>
3536
```
3637

3738
3. Update the manifest, component files, both language READMEs, and the root marketplace entry. Keep the manifest and marketplace versions identical.
@@ -47,6 +48,16 @@ Do not commit credentials, private endpoints, customer data, machine-specific pa
4748

4849
## Pull request checklist
4950

51+
### Declare the plugin type (required)
52+
53+
Every PR must complete **Plugin type** in the [PR template](.github/PULL_REQUEST_TEMPLATE.md) before requesting review. Select exactly one option and list the affected manifest `name` values:
54+
55+
- **UI Plugin**: an affected plugin provides MCP Apps interactive pages, whether through `ui.surfaces` or a tool's `_meta.ui.resourceUri`. Select this even for changes limited to that plugin's docs or skills, or when adding or removing its interactive page.
56+
- **Standard plugin**: an affected plugin provides no MCP Apps interactive page. MCP tools alone, or a skill that generates Gen UI, do not make a plugin a UI Plugin.
57+
- **Not applicable**: only repository-level documentation, build, or CI changes; no installable plugin content changes.
58+
59+
If more than one plugin is affected, list each name and type, and select UI Plugin if any is affected. This declaration does not replace the marketplace `category` or the Conventional Commits title. Reviewers must confirm it is complete and accurate before approving.
60+
5061
In the pull request description, include:
5162

5263
- what user problem the change solves;
@@ -57,6 +68,7 @@ In the pull request description, include:
5768

5869
Before requesting review, confirm:
5970

71+
- [ ] the required plugin type is selected and affected plugin names are listed;
6072
- [ ] the plugin name is unique and kebab-case;
6173
- [ ] required files and both language READMEs are present;
6274
- [ ] the category is correct;

‎CONTRIBUTING_CN.md‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
每个插件都必须:
1616

17-
- 位于 `plugins/` 下唯一的 kebab-case 目录;
17+
- 外部团队、合作方和社区新增插件位于 `external_plugins/` 下唯一的 kebab-case 目录;`plugins/` 保留给官方维护插件;
1818
- 包含 `.zcode-plugin/plugin.json`,并填写 `name`、`description`、`version` 和 `author`;
1919
- 在根目录 [`marketplace.json`](./marketplace.json) 中注册,且 `name`、`version` 和描述保持一致;
2020
- 至少提供一种有效组件:command、skill、hook、agent 或 MCP server;
@@ -31,7 +31,8 @@
3131
2. 复制示例插件,或在本次改动涉及的现有插件中修改:
3232

3333
```shell
34-
cp -R plugins/example-plugin plugins/<你的插件名>
34+
mkdir -p external_plugins
35+
cp -R plugins/example-plugin external_plugins/<你的插件名>
3536
```
3637

3738
3. 更新插件清单、组件文件、两种语言的 README 和根目录市场条目,确保清单与市场条目的版本一致。
@@ -47,6 +48,16 @@
4748

4849
## Pull Request 自查清单
4950

51+
### 声明插件类型(必填)
52+
53+
每个 PR 在发起评审前都必须填写 [PR 模板](.github/PULL_REQUEST_TEMPLATE.md) 中的 **插件类型**,且只能勾选一项,同时列出涉及插件的清单 `name`:
54+
55+
- **UI Plugin**:涉及的插件提供 MCP Apps 交互页面,包括 `ui.surfaces` 面板或工具的 `_meta.ui.resourceUri` 页面。即使只改该插件的文档或 skill,或者本次新增、移除交互页面,也选择此项。
56+
- **普通插件(非 UI)**:涉及的插件不提供 MCP Apps 交互页面。仅有 MCP 工具,或 skill 会生成 Gen UI,都不会使其成为 UI Plugin。
57+
- **不适用**:仅修改仓库级文档、构建或 CI,不涉及可安装插件的内容。
58+
59+
涉及多个插件时,分别列出名称和类型,只要包含 UI Plugin 就选择 UI Plugin。这项声明不替代市场 `category` 分类,也不改变 Conventional Commits 标题要求。评审者批准前必须确认声明完整且准确。
60+
5061
Pull Request 描述中请写清:
5162

5263
- 改动解决的用户问题;
@@ -57,6 +68,7 @@ Pull Request 描述中请写清:
5768

5869
发起评审前确认:
5970

71+
- [ ] 已勾选必填的插件类型,并列出涉及的插件名称;
6072
- [ ] 插件名唯一且为 kebab-case;
6173
- [ ] 必需文件和中英文 README 均已提供;
6274
- [ ] 分类填写正确;

0 commit comments

Comments
 (0)