Skip to content

Draft: GeneralUpdate.Extension component documentation#60

Merged
JusterZhu merged 1 commit into
mainfrom
docs/issue-51-extension-draft
Jun 3, 2026
Merged

Draft: GeneralUpdate.Extension component documentation#60
JusterZhu merged 1 commit into
mainfrom
docs/issue-51-extension-draft

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Parent: #45
Closes #51

Summary

  • Rewrite GeneralUpdate.Extension documentation from the latest source APIs.
  • Cover metadata, manifests, query/download/install/update/rollback/uninstall, compatibility, dependencies, events, auto-update flags, and server API contracts.
  • Explain Extension consumption vs Tools/CI package publishing and link the advanced cookbook workflow task.

Validation

  • git diff --check
  • npm run build -- --no-minify

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JusterZhu JusterZhu force-pushed the docs/issue-51-extension-draft branch from c185396 to 57b32bd Compare June 3, 2026 07:53
@JusterZhu JusterZhu marked this pull request as ready for review June 3, 2026 07:53
Copilot AI review requested due to automatic review settings June 3, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the GeneralUpdate.Extension component documentation (site default + EN + zh-Hans i18n) to reflect the latest Extension APIs and to provide a clearer end-to-end narrative: querying, downloading, installing/updating, rollback/uninstall, metadata/manifest, packaging responsibilities (Tools/CI vs consumer), and server API contracts.

Changes:

  • Replaces the previous long-form reference-style doc with a structured, workflow-oriented component guide (quick start → core workflow → metadata/manifest → packaging → compatibility/deps → events/auto-update → server contract → extensibility → best practices).
  • Updates code snippets and terminology (DTOs, response shape, host options, lifecycle hooks, queue, etc.) to match the described current API surface.
  • Applies the same rewrite consistently across website/docs and both i18n copies (EN + zh-Hans).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
website/docs/doc/GeneralUpdate.Extension.md Main site doc rewrite for GeneralUpdate.Extension (Chinese) with new structure and API contract sections
website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Extension.md English i18n version of the rewritten Extension component documentation
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Extension.md zh-Hans i18n version of the rewritten Extension component documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `Token` | Authorization token。需要和 `Scheme` 同时非空才会生效 |
| `HostVersion` | 宿主应用版本,用于 `MinHostVersion` / `MaxHostVersion` 兼容性判断 |
| `ExtensionsDirectory` | 扩展包下载、安装和 `.backup` 目录所在位置 |
| `CatalogPath` | 可选,本地扩展目录扫描路径;为空时使用 `ExtensionsDirectory` |
Comment on lines +289 to 293
本地安装 catalog 不再是单个 `catalog.json`。当前实现会扫描 `CatalogPath` 下的子目录,并读取每个扩展目录中的

```c#
var extension = new ExtensionMetadata
{
Id = "550e8400-e29b-41d4-a716-446655440001",
Name = "my-extension",
DisplayName = "My Extension",
Version = "1.0.0",
// 依赖两个其他扩展
Dependencies = "550e8400-e29b-41d4-a716-446655440002,550e8400-e29b-41d4-a716-446655440003"
};
```text
manifest.json
```

// 禁用自动更新
host.SetAutoUpdate(extensionId, false);
推荐 ZIP 内容:
| `Token` | Authorization token. It is only used when both `Scheme` and `Token` are non-empty |
| `HostVersion` | Host application version used by `MinHostVersion` / `MaxHostVersion` checks |
| `ExtensionsDirectory` | Directory for downloaded packages, installed extensions, and `.backup` |
| `CatalogPath` | Optional local catalog scan path. Defaults to `ExtensionsDirectory` |
Comment on lines +289 to 293
The local catalog is not a single `catalog.json`. Current code scans child directories under `CatalogPath` and reads each extension's:

```c#
var extension = new ExtensionMetadata
{
Id = "550e8400-e29b-41d4-a716-446655440001",
Name = "my-extension",
DisplayName = "My Extension",
Version = "1.0.0",
// Depends on two other extensions
Dependencies = "550e8400-e29b-41d4-a716-446655440002,550e8400-e29b-41d4-a716-446655440003"
};
```text
manifest.json
```

// Disable auto-update
host.SetAutoUpdate(extensionId, false);
Recommended ZIP contents:
| `Token` | Authorization token。需要和 `Scheme` 同时非空才会生效 |
| `HostVersion` | 宿主应用版本,用于 `MinHostVersion` / `MaxHostVersion` 兼容性判断 |
| `ExtensionsDirectory` | 扩展包下载、安装和 `.backup` 目录所在位置 |
| `CatalogPath` | 可选,本地扩展目录扫描路径;为空时使用 `ExtensionsDirectory` |
Comment on lines +289 to 293
本地安装 catalog 不再是单个 `catalog.json`。当前实现会扫描 `CatalogPath` 下的子目录,并读取每个扩展目录中的

```c#
var extension = new ExtensionMetadata
{
Id = "550e8400-e29b-41d4-a716-446655440001",
Name = "my-extension",
DisplayName = "My Extension",
Version = "1.0.0",
// 依赖两个其他扩展
Dependencies = "550e8400-e29b-41d4-a716-446655440002,550e8400-e29b-41d4-a716-446655440003"
};
```text
manifest.json
```

// 禁用自动更新
host.SetAutoUpdate(extensionId, false);
推荐 ZIP 内容:
@JusterZhu JusterZhu merged commit 9121857 into main Jun 3, 2026
2 checks passed
@JusterZhu JusterZhu deleted the docs/issue-51-extension-draft branch June 3, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs subtask: update GeneralUpdate.Extension component documentation

2 participants