mirror of
https://git.openapi.site/https://github.com/desirecore/agent-desirecore.git
synced 2026-12-05 20:09:59 +08:00
fix: 目录插件经固定发行物安装不启动候选,提交后待用户启用,发布 1.16.7 (#12)
承接主仓 desirecore/desirecore#6434(ADR-376 阶段 5): - plugin-contributions(中英)新增「目录插件:经固定发行物安装」:knowledge 带 appRelease 的插件走 AppAuthoring prepare_release → commit_release;不启动候选、 不调用 runtime_enroll、不登记为 Agent 的 MCP 服务;回执 activation: pending、 reason: plugin_enablement_required 表示已安装待启用;随后据实 record_verification (只核验到固定材料、逐文件摘要与客户端能力),再由用户在插件设置启用。这类安装没有 deployment.descriptor,材料由宿主从受管 release 目录读取。描述材料与 PATCH 登记 一节限定为不带 appRelease 的目录条目与非目录包。 - agent-led-installation(中英)固定发行物一节加插件例外,验证并登记一节注明插件不用 PATCH。 - SKILL.md 1.7.1 → 1.7.2;agent.json 1.16.6 → 1.16.7;requiredClientVersion 不变 (旧客户端对插件提交仍报 application_runtime_contract_missing 时按指引停止并提示更新)。
This commit is contained in:
6 files changed
+40
-16
No files matched your search
@@ -6,19 +6,30 @@ Plugins add host capabilities; applications own business workspaces and may also
|
||||
|
||||
## Confirm target and client support
|
||||
|
||||
Use the v2 Plan, exact instance resolution and actual resource claims. For fresh catalog installations, read knowledge.productKind/type/extension/descriptorRequired. The writer rereads the exact catalog source/product before recording; request-body knownProduct is not authority. If these fields are unavailable for a declared extension, investigate client support instead of submitting the old default-application example. Unsupported artifact, descriptor or settings contracts require a client update; never drop fields, read tokens or edit the ledger to bypass rejection.
|
||||
Use the v2 Plan, exact instance resolution and actual resource claims. For fresh catalog installations, read knowledge.productKind/type/extension/descriptorRequired and appRelease. The writer rereads the exact catalog source/product before recording; request-body knownProduct is not authority. If these fields are unavailable for a declared extension, investigate client support instead of submitting the old default-application example. Unsupported artifact, descriptor or settings contracts require a client update; never drop fields, read tokens or edit the ledger to bypass rejection.
|
||||
|
||||
Use fixed catalog products or authorized user materials. Non-catalog packages use sourceId=user-managed and id=target.softwareId. Changing a source label cannot claim official publication. Identify source, product, installation, device and host rather than matching display names.
|
||||
|
||||
## Catalog plugins installed from a fixed release
|
||||
|
||||
When catalog knowledge carries appRelease (every entry the distribution generator produces for a plugin does), install through AppAuthoring `prepare_release` → `commit_release` as described under "Fixed releases" in the [general v2 flow](agent-led-installation.md), not through the deployment.descriptor and generic observation PATCH of the next section. When the materialized definition has `productKind: plugin`, the flow differs from ordinary native applications:
|
||||
|
||||
- Do not start a candidate process, do not call `runtime_enroll`, and do not register the plugin service as an Agent MCP server. A plugin has no candidate to enroll: the host starts and manages its resident service from the verified runtime descriptor in the package after the user enables it. Commit right after a successful `prepare_release`.
|
||||
- A commit receipt with `activation: pending` and `reason: plugin_enablement_required` means installed and awaiting enablement, not failure; do not call `runtime_read` or `runtime_start`. If the client still answers a plugin commit with `application_runtime_contract_missing`, it does not support this path yet: stop and explain that the client needs an update, without falling back to candidate enrollment or the generic observation PATCH.
|
||||
- Then call `record_verification` truthfully. Before enablement only the fixed material, per-file digests and client capability can be verified: write verified only when those checks pass, state this scope in scope, and do not claim the function works. The coordinator attaches contributions only for installations verified as verified; without a verified record, plugin settings report the installation as unverified and attach no contributions.
|
||||
- Then ask the user to enable the plugin in plugin settings (the settings UI uses `PATCH /api/installed-entries/<installationId>/extension-settings` described below; submit through that API only when the user explicitly asks the Agent to enable it). After enabling, rely on plugin settings and the related feature page for its state; the pre-enablement verification record does not show that the function was verified.
|
||||
|
||||
Such installations have no `deployment.descriptor`. The host reads material from this user's managed release directory after verifying ownership, the manifest and every file digest; package references are read with their digests relative to the materialized definition file, and the resident service's installation root is that release directory. Do not obtain a resourceRef, write a separate AppDefinition or record through PATCH to add a descriptor.
|
||||
|
||||
## Prepare actual descriptor material
|
||||
|
||||
Save AppDefinition JSON in the actual installation directory with sourceId/id/name/version/productKind/entrypoints/placementPolicy and extension. Plugins need a real contribution and may have empty entrypoints. Uses-only applications may have empty contributes but retain a valid principal entrypoint. Contribution, configuration Schema, service descriptor and Skill references use package-relative paths and actual SHA-256 digests, never unverified inline model declarations.
|
||||
This section applies to catalog entries without appRelease and to non-catalog packages. Save AppDefinition JSON in the actual installation directory with sourceId/id/name/version/productKind/entrypoints/placementPolicy and extension. Plugins need a real contribution and may have empty entrypoints. Uses-only applications may have empty contributes but retain a valid principal entrypoint. Contribution, configuration Schema, service descriptor and Skill references use package-relative paths and actual SHA-256 digests, never unverified inline model declarations.
|
||||
|
||||
Resolve the descriptor using GET /api/files/resolve-reference?agentId=<current-agent>&path=<URL-encoded-absolute-path> and hash its raw bytes. Submit deployment.descriptor={fileRef: resourceRef, sha256: actual digest}, actual type/version/resources/materials/data locations and maintenance notes. Descriptor and observed versions must agree; never substitute a catalog version for unknown deployed facts.
|
||||
|
||||
Fresh catalog contribution installations retain knowledge.type, the principal category and extension relationships. Missing descriptors, discarded extensions, plugin-to-application substitution or changed delivery types are rejected. Repair recording material without repeating software side effects. Declarative packages use artifact with runtime.kind=declarative and no fictitious ports/processes. Service plugins retain real native-app/docker-app deployments and reference existing governed connection/tool identities; installation grants no execution authority.
|
||||
|
||||
Verify the agreed consumer capability and record through PATCH /api/installed-entries/instances/<installationId>. Non-catalog extensions also need descriptors. Installation, enablement and current health remain separate facts; prose, model claims and responding ports cannot replace actual consumer checks.
|
||||
Verify the agreed consumer capability and record through PATCH /api/installed-entries/instances/<installationId> (except plugins installed from a fixed release; see the previous section). Non-catalog extensions also need descriptors. Installation, enablement and current health remain separate facts; prose, model claims and responding ports cannot replace actual consumer checks.
|
||||
|
||||
## Settings, dependencies and enablement
|
||||
|
||||
@@ -49,8 +60,8 @@ On 409, GET and reconcile the snapshot the user is viewing; never simply replace
|
||||
|
||||
## Updates, removal and natural-language customization
|
||||
|
||||
Updates/reinstallation, including same-version replacement, reverify the descriptor, package material and digests through the existing writer. File edits never hot-replace formal active versions. Enlarged authority needs review and configuration must satisfy the new Schema; failures do not imply automatic rollback.
|
||||
Updates/reinstallation, including same-version replacement, reverify the descriptor, package material and digests through the existing writer. Plugins installed from a fixed release repeat `prepare_release` → `commit_release` for the new appRelease, again without a candidate process. File edits never hot-replace formal active versions. Enlarged authority needs review and configuration must satisfy the new Schema; failures do not imply automatic rollback.
|
||||
|
||||
Before removal, identify disablement, shared references and actual process/material scope. Preserve user data by default. Record absent only after verifying the exact removal; removed descriptor files do not prevent retaining existing snapshots for removal or exact committed retries. Existing instances remain maintainable from recorded facts when the catalog is offline.
|
||||
|
||||
Persist descriptor locations/digests, settings entrypoints, tool/service references, verification and shared-data preservation rules in maintenance notes. Generate declarative contributions in supported session-scoped development previews; exiting releases temporary bindings. Only explicit save-and-use creates durable material through the same installation/settings owners. Generation or preview is not installation/enablement and does not authorize sharing or publication.
|
||||
Persist descriptor locations/digests (the release directory and releaseDigest for release installations), settings entrypoints, tool/service references, verification and shared-data preservation rules in maintenance notes. Generate declarative contributions in supported session-scoped development previews; exiting releases temporary bindings. Only explicit save-and-use creates durable material through the same installation/settings owners. Generation or preview is not installation/enablement and does not authorize sharing or publication.
|
||||
Reference in new issue
Block a user