用途:这是 PAM 原生扩展打包流程的最后一步,把 /generate-ppmplugin-manifest 生成的 manifest.json 与各构建技能产出的二进制打包成单个 <name>.ppmplugin 文件,并验证包内内容正确。输出即为可交付、可上传的文件。
主要能力:打包前会把 manifest 中声明的平台与实际构建出的二进制进行核对(reconcile),避免包声明了并不包含的平台。读取 ppmplugin/staging/manifest.json,检查 entrypoints.android 与 entrypoints.ios,并确认对应产物存在:Android 为 ppmplugin/staging/android/<dex>,iOS 为 ppmplugin/staging/ios/<framework>.framework/(平铺 .framework,而非 .xcframework)。若声明了但未构建,会通过提问让用户选择先构建、去掉该平台或停止;若构建了但未声明,则提示可重新生成 manifest 或忽略。
必要用法:前置条件是 jar(随 JDK 提供,建议 JDK 17)。打包命令保持原样: macOS/Linux:mkdir -p ppmplugin,然后 ( cd ppmplugin/staging && jar cMf "../<name>.ppmplugin" manifest.json android ios ) Windows PowerShell:New-Item -ItemType Directory -Force ppmplugin | Out-Null,Push-Location ppmplugin\staging,jar cMf ..<name>.ppmplugin manifest.json android ios,Pop-Location 验证用 jar tf ppmplugin/<name>.ppmplugin。文件名不含版本,版本在 manifest 的 version 字段中。
限制:本技能不编写 manifest、不构建任何二进制、不上传到 Dataverse、不接入 canvas app(第三阶段,暂缓)。它会重新校验 manifest 规则,若失败则停止并不产出包。包内只应包含 manifest.json 与所声明平台的二进制;若混入构建目录、杂项文件或 .xcframework,会报错停止。已存在同名输出时不会静默覆盖,需询问确认。iOS 构建仅限 Mac。