refactor(office): 合并为 office-kit,Kit 缺失时降级而非加载失败

- Kit CLI 由 office-kit/locate 在 Host 中定位(含 ASAR 映射与可选 root 越界检查),删除 Desktop 壳的 office-cli 与诊断文件;生产版 Desktop 由壳通过 DSH_BUNDLED_RUNTIME_ROOT 显式传入 Kit 根目录,开发版与 Web 不检查
- office-to-pdf 与 office-kit-resolver 合并为 @deepseek-ai/dsh-office-kit,由同一包定位 Kit 并提供转换服务
- Kit 缺失时 provider 照常注册,转换请求以 OfficeKitError unavailable 拒绝,之后安装 Kit 无需重载
- 类型统一使用 OfficeKit 前缀(OfficeKitRequest/Result/Priority/Key),同步消费方、文档、升级指南与 catalog
- 处理 ds-review-bot 意见,并更新 unknown 断言基线

本 PR 的 snapshot 统一在这个提交里用 keyless refresh 重新生成,前 3 个提交中的 snapshot 不一定和那一步的代码对应。
This commit is contained in:
yudshj committed 2026-11-04 18:17:57 +08:00
1 parent 4a41d3ad1f
commit a220e017b5
160 files changed
+1853 -1654

No files matched your search

-1
View File
@@ -55,7 +55,6 @@ const KIND_TEMPLATES: Readonly<Record<string, string>> = {
* library; the check re-derives the entry shape so a stale entry fails loud.
*/
const PACKAGE_LIBRARIES: Readonly<Record<string, string>> = {
'packages/document/office-engine-resolver': 'Consumer-anchored Kit engine manifest resolver without plugin registration.',
'packages/util/file-drag': 'File naming and native transfer declarations without a plugin entry.',
'packages/experimental/browser-use-runtime': 'Provider-owned browser resource management and MCP integration helpers; no plugin entry.',
'packages/boot/app-boot': 'Boot library the app bins import; plain helper exports.',
+6 -6
View File
@@ -74,7 +74,7 @@ export const SERVICE_PAGE: Record<string, string> = {
agentPresets: 'core.md',
agents: 'core.md',
approval: 'approval.md',
officeToPdf: 'office-to-pdf.md',
officeKit: 'office-kit.md',
attachments: 'attachment.md',
shell: 'shell.md',
shellEnv: 'shell.md',
@@ -356,11 +356,11 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
CuaApplicationState: 'computer-use.md',
CuaSystemPermission: 'computer-use.md',
CuaSystemPermissionState: 'computer-use.md',
RenderedDocumentBytes: 'office-to-pdf.md',
OfficeToPdfRequest: 'office-to-pdf.md',
OfficeToPdfResult: 'office-to-pdf.md',
OfficeToPdfPriority: 'office-to-pdf.md',
OfficeToPdfGeneration: 'office-to-pdf.md',
RenderedDocumentBytes: 'office-kit.md',
OfficeKitRequest: 'office-kit.md',
OfficeKitResult: 'office-kit.md',
OfficeKitPriority: 'office-kit.md',
OfficeKitGeneration: 'office-kit.md',
CreatedShare: 'liveshare.md',
CreateShareRequest: 'liveshare.md',
OwnerIdentityRequest: 'liveshare.md',
+1 -1
View File
@@ -269,7 +269,7 @@ const SERVICE_ROLES: ServiceRole[] = [
note: 'The native provider owns application consent and cancellation; the optional Client page queries and changes those decisions through its Remote.',
},
{
key: 'officeToPdf', pkg: 'office-to-pdf', title: 'Office to PDF conversion',
key: 'officeKit', pkg: 'office-kit', title: 'Office to PDF conversion',
mode: 'core', consumers: ['client-ui-sidebar-documentpreview'],
note: 'Authorized Office bytes are converted on the Host using the declared native target engine, or Node WASM when no native target is declared.',
},
+2 -2
View File
@@ -347,7 +347,7 @@
"2e78263d16d54ccfd8d322bcdf1bf738bd8134e15c24063ece9a1d1b52f4ebd9": 1
},
"packages/bundle/web-app/tests/document-conversion.e2e.ts": {
"743a7488a765c578e607d08ba6bdcf6f2f2971f67b05a42d5097aad2458134a1": 1
"95057a87f4a7358284982d7c73febfe26aed9f37a4ceb5b8df724f2b6bc1084c": 1
},
"packages/bundle/web-app/tests/document-preview.spec.ts": {
"154da39139a0074bad3d13a624e5fa62d1f7ce19dc8b9c28a73af3263cd7f10e": 1
@@ -961,7 +961,7 @@
"packages/deliverables/workspace-changes/tests/loader-composition.spec.ts": {
"59c63f734e8bba862325f776e3fcbebd78a84cfb4161f8df41c216950d9bf351": 1
},
"packages/document/office-to-pdf/tests/queue.spec.ts": {
"packages/document/office-kit/tests/queue.spec.ts": {
"bbe31b89b81048bb47c7158e78670deec5f2973286f9abc591290a8fdd851cf1": 1
},
"packages/experimental/browser-use-runtime/src/index.ts": {
-1
View File
@@ -38,7 +38,6 @@ const CONFIGURATION_ONLY_DEV_DEPENDENCIES = {
const DUPLICATE_SAFE_PACKAGES: readonly string[] = [
'@deepseek-ai/dsh-brand',
'@deepseek-ai/dsh-lazy-require',
'@deepseek-ai/dsh-office-engine-resolver',
'@deepseek-ai/dsh-typert-protocol',
'@deepseek-ai/dsh-util-code-language',
'@deepseek-ai/dsh-util-crypto',
@@ -232,7 +232,6 @@ describe('package dependency scope', () => {
expect(PACKAGE_DEPENDENCY_POLICY.duplicateSafePackages).toEqual([
'@deepseek-ai/dsh-brand',
'@deepseek-ai/dsh-lazy-require',
'@deepseek-ai/dsh-office-engine-resolver',
'@deepseek-ai/dsh-typert-protocol',
'@deepseek-ai/dsh-util-code-language',
'@deepseek-ai/dsh-util-crypto',
@@ -85,8 +85,7 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly<Record<string, SentenceContract>> = {
'packages/browser-use/browser-use': { kind: 'none', reason: 'The registry only reserves a provider name; providers own browser tools and Session resources.' },
'packages/experimental/browser-use-runtime': { kind: 'indirect', reason: 'Browser providers call the library to own resources and expose upstream MCP tools.' },
'packages/computer-use/computer-use': { kind: 'none', reason: 'The registry only reserves provider names; providers own all model-facing tools and guidance.' },
'packages/document/office-engine-resolver': { kind: 'none', reason: 'Engine manifest resolution constructs no model input and registers no services.' },
'packages/document/office-to-pdf': { kind: 'none', reason: 'The provider returns PDF bytes without constructing model input.' },
'packages/document/office-kit': { kind: 'none', reason: 'The provider returns PDF bytes and Kit location results without constructing model input.' },
'packages/credentials/deepseek-account': { kind: 'none', reason: 'Account authorization registers no model context or tools; credentials affect HTTP authentication only.' },
'packages/credentials/deepseek-account-platform': { kind: 'none', reason: 'Account authorization registers no model context or tools; credentials affect HTTP authentication only.' },