From ef7ae4c6db15dfa1361325ba7accfcfa8f891b34 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Mon, 16 Mar 2026 00:25:45 +0000 Subject: [PATCH] Docs: refresh extension host foundation layout --- ...capability-catalog-and-arbitration-spec.md | 92 ++++++++--------- ...claw-extension-contribution-schema-spec.md | 92 ++++++++--------- ...law-extension-host-implementation-guide.md | 96 +++++++++--------- ...ension-host-lifecycle-and-security-spec.md | 90 ++++++++--------- .../openclaw-kernel-event-pipeline-spec.md | 36 +++---- ...w-kernel-extension-host-transition-plan.md | 98 +++++++++---------- 6 files changed, 252 insertions(+), 252 deletions(-) diff --git a/docs/.internal/extension-host-migration/openclaw-capability-catalog-and-arbitration-spec.md b/docs/.internal/extension-host-migration/openclaw-capability-catalog-and-arbitration-spec.md index d22d81b9d2c..ac3bb8a23fa 100644 --- a/docs/.internal/extension-host-migration/openclaw-capability-catalog-and-arbitration-spec.md +++ b/docs/.internal/extension-host-migration/openclaw-capability-catalog-and-arbitration-spec.md @@ -35,53 +35,53 @@ What has been implemented: - channel catalog package metadata parsing now routes through host-owned schema helpers - host-owned resolved-extension records now carry the static metadata needed for install, onboarding, and lightweight operator UX - config doc baseline generation now uses the same host-owned resolved-extension metadata path -- plugin SDK alias resolution now routes through `src/extension-host/loader-compat.ts` -- loader alias-wired module loader creation now routes through `src/extension-host/loader-module-loader.ts` -- loader cache key construction and registry cache control now route through `src/extension-host/loader-cache.ts` -- loader lazy runtime proxy creation now routes through `src/extension-host/loader-runtime-proxy.ts` -- loader provenance helpers now route through `src/extension-host/loader-provenance.ts` -- loader duplicate-order and record/error policy now route through `src/extension-host/loader-policy.ts` -- loader discovery policy outcomes now route through `src/extension-host/loader-discovery-policy.ts` -- loader initial candidate planning and record creation now route through `src/extension-host/loader-records.ts` -- loader entry-path opening and module import now route through `src/extension-host/loader-import.ts` -- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/loader-runtime.ts` -- loader post-import planning and `register(...)` execution now route through `src/extension-host/loader-register.ts` -- loader per-candidate orchestration now routes through `src/extension-host/loader-flow.ts` -- loader top-level load orchestration now routes through `src/extension-host/loader-orchestrator.ts` -- loader host process state now routes through `src/extension-host/loader-host-state.ts` -- loader preflight and cache-hit setup now routes through `src/extension-host/loader-preflight.ts` -- loader post-preflight pipeline composition now routes through `src/extension-host/loader-pipeline.ts` -- loader execution setup composition now routes through `src/extension-host/loader-execution.ts` -- loader discovery and manifest bootstrap now routes through `src/extension-host/loader-bootstrap.ts` -- loader mutable activation state now routes through `src/extension-host/loader-session.ts` -- loader session run and finalization composition now routes through `src/extension-host/loader-run.ts` -- loader activation policy outcomes now route through `src/extension-host/loader-activation-policy.ts` -- loader record-state transitions now route through `src/extension-host/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values -- loader finalization policy results now route through `src/extension-host/loader-finalization-policy.ts` -- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/loader-finalize.ts` +- plugin SDK alias resolution now routes through `src/extension-host/compat/loader-compat.ts` +- loader alias-wired module loader creation now routes through `src/extension-host/activation/loader-module-loader.ts` +- loader cache key construction and registry cache control now route through `src/extension-host/activation/loader-cache.ts` +- loader lazy runtime proxy creation now routes through `src/extension-host/activation/loader-runtime-proxy.ts` +- loader provenance helpers now route through `src/extension-host/policy/loader-provenance.ts` +- loader duplicate-order and record/error policy now route through `src/extension-host/policy/loader-policy.ts` +- loader discovery policy outcomes now route through `src/extension-host/policy/loader-discovery-policy.ts` +- loader initial candidate planning and record creation now route through `src/extension-host/activation/loader-records.ts` +- loader entry-path opening and module import now route through `src/extension-host/activation/loader-import.ts` +- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/activation/loader-runtime.ts` +- loader post-import planning and `register(...)` execution now route through `src/extension-host/activation/loader-register.ts` +- loader per-candidate orchestration now routes through `src/extension-host/activation/loader-flow.ts` +- loader top-level load orchestration now routes through `src/extension-host/activation/loader-orchestrator.ts` +- loader host process state now routes through `src/extension-host/activation/loader-host-state.ts` +- loader preflight and cache-hit setup now routes through `src/extension-host/activation/loader-preflight.ts` +- loader post-preflight pipeline composition now routes through `src/extension-host/activation/loader-pipeline.ts` +- loader execution setup composition now routes through `src/extension-host/activation/loader-execution.ts` +- loader discovery and manifest bootstrap now routes through `src/extension-host/activation/loader-bootstrap.ts` +- loader mutable activation state now routes through `src/extension-host/activation/loader-session.ts` +- loader session run and finalization composition now routes through `src/extension-host/activation/loader-run.ts` +- loader activation policy outcomes now route through `src/extension-host/policy/loader-activation-policy.ts` +- loader record-state transitions now route through `src/extension-host/activation/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values +- loader finalization policy results now route through `src/extension-host/policy/loader-finalization-policy.ts` +- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/activation/loader-finalize.ts` - channel, provider, gateway-method, tool, CLI, service, command, context-engine, and hook registration normalization now has a host-owned helper boundary for future catalog migration -- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/registry-writes.ts` ahead of broader catalog-backed registry ownership -- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/hook-compat.ts` ahead of broader catalog-backed registry ownership -- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/plugin-api.ts` ahead of broader catalog-backed registry ownership -- compatibility plugin-registry facade ownership now routes through `src/extension-host/plugin-registry.ts` ahead of broader catalog-backed registry ownership -- compatibility plugin-registry policy now routes through `src/extension-host/plugin-registry-compat.ts` ahead of broader catalog-backed registry ownership -- compatibility plugin-registry registration actions now route through `src/extension-host/plugin-registry-registrations.ts` ahead of broader catalog-backed registry ownership -- host-owned runtime registry accessors now route through `src/extension-host/runtime-registry.ts` ahead of broader catalog-backed registry ownership, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views -- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now route through `src/extension-host/command-runtime.ts` ahead of broader catalog-backed ownership -- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/service-lifecycle.ts` ahead of broader catalog-backed lifecycle ownership -- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/cli-lifecycle.ts` ahead of broader catalog-backed CLI ownership -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/gateway-methods.ts` ahead of broader catalog-backed gateway ownership -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/tool-runtime.ts` ahead of broader catalog-backed tool ownership -- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/provider-runtime.ts` ahead of broader catalog-backed provider ownership -- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/provider-discovery.ts` ahead of broader catalog-backed provider-discovery ownership -- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/provider-auth.ts` ahead of broader catalog-backed provider-auth ownership -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/provider-wizard.ts` ahead of broader catalog-backed provider-setup ownership -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/provider-auth-flow.ts` ahead of broader catalog-backed provider-setup ownership -- provider post-selection hook lookup and invocation now route through `src/extension-host/provider-model-selection.ts` ahead of broader catalog-backed provider-setup ownership +- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/contributions/registry-writes.ts` ahead of broader catalog-backed registry ownership +- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/compat/hook-compat.ts` ahead of broader catalog-backed registry ownership +- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/compat/plugin-api.ts` ahead of broader catalog-backed registry ownership +- compatibility plugin-registry facade ownership now routes through `src/extension-host/compat/plugin-registry.ts` ahead of broader catalog-backed registry ownership +- compatibility plugin-registry policy now routes through `src/extension-host/compat/plugin-registry-compat.ts` ahead of broader catalog-backed registry ownership +- compatibility plugin-registry registration actions now route through `src/extension-host/compat/plugin-registry-registrations.ts` ahead of broader catalog-backed registry ownership +- host-owned runtime registry accessors now route through `src/extension-host/contributions/runtime-registry.ts` ahead of broader catalog-backed registry ownership, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views +- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now route through `src/extension-host/contributions/command-runtime.ts` ahead of broader catalog-backed ownership +- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/contributions/service-lifecycle.ts` ahead of broader catalog-backed lifecycle ownership +- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/contributions/cli-lifecycle.ts` ahead of broader catalog-backed CLI ownership +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/contributions/gateway-methods.ts` ahead of broader catalog-backed gateway ownership +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/contributions/tool-runtime.ts` ahead of broader catalog-backed tool ownership +- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/contributions/provider-runtime.ts` ahead of broader catalog-backed provider ownership +- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/contributions/provider-discovery.ts` ahead of broader catalog-backed provider-discovery ownership +- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/contributions/provider-auth.ts` ahead of broader catalog-backed provider-auth ownership +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/contributions/provider-wizard.ts` ahead of broader catalog-backed provider-setup ownership +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/contributions/provider-auth-flow.ts` ahead of broader catalog-backed provider-setup ownership +- provider post-selection hook lookup and invocation now route through `src/extension-host/contributions/provider-model-selection.ts` ahead of broader catalog-backed provider-setup ownership How it has been implemented: -- by moving package metadata parsing behind `src/extension-host/schema.ts` +- by moving package metadata parsing behind `src/extension-host/manifests/schema.ts` - by keeping the existing catalog behavior intact while shifting metadata ownership into normalized host-owned records - by reusing the resolved-extension registry for static operator/documentation surfaces instead of creating separate metadata caches - by beginning runtime registration migration with host-owned normalization helpers before attempting full canonical catalog publication @@ -97,7 +97,7 @@ How it has been implemented: - by extracting post-preflight execution setup and session-run composition into a host-owned loader-pipeline helper before catalog publication work - by extracting runtime creation, registry creation, bootstrap setup, module-loader creation, and session creation into a host-owned loader-execution helper before catalog publication work - by moving mutable activation state into a host-owned loader session before catalog publication work -- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation +- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/policy/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation - by turning open-allowlist discovery warnings into explicit host-owned discovery-policy results before catalog publication work - by moving duplicate precedence, config enablement, and early memory-slot gating into explicit host-owned activation-policy outcomes before catalog publication work - by turning provenance-based untracked-extension warnings and final memory-slot warnings into explicit host-owned finalization-policy results before catalog publication work @@ -119,7 +119,7 @@ How it has been implemented: - by extracting provider-id normalization into `src/agents/provider-id.ts` so provider-only host seams do not inherit the heavier agent and browser dependency graph from `src/agents/model-selection.ts` - by extracting model-ref parsing into `src/agents/model-ref.ts` and Google model-id normalization into `src/agents/google-model-id.ts` so provider auth and setup seams can be tested without pulling the heavier provider-loader and browser dependency graph - by introducing host-owned runtime-registry accessors for low-risk runtime consumers first, then moving channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service storage into that host-owned state while keeping mirrored legacy compatibility arrays and handler maps before broader catalog publication or arbitration work -- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing into `src/extension-host/command-runtime.ts` before broader catalog publication or arbitration work +- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing into `src/extension-host/contributions/command-runtime.ts` before broader catalog publication or arbitration work What remains pending: @@ -482,7 +482,7 @@ Control commands are not agent tools. Examples today: -- `src/extension-host/command-runtime.ts:1` +- `src/extension-host/contributions/command-runtime.ts:1` - `extensions/phone-control/index.ts:330` They belong only in operator catalogs and control surfaces. diff --git a/docs/.internal/extension-host-migration/openclaw-extension-contribution-schema-spec.md b/docs/.internal/extension-host-migration/openclaw-extension-contribution-schema-spec.md index 719a39e0aee..dc8cce2429c 100644 --- a/docs/.internal/extension-host-migration/openclaw-extension-contribution-schema-spec.md +++ b/docs/.internal/extension-host-migration/openclaw-extension-contribution-schema-spec.md @@ -32,56 +32,56 @@ Current status against this spec: What has been implemented: - an initial Phase 0 cutover inventory now exists in `src/extension-host/cutover-inventory.md` -- `ResolvedExtension`, `ResolvedContribution`, and `ContributionPolicy` now exist in `src/extension-host/schema.ts` +- `ResolvedExtension`, `ResolvedContribution`, and `ContributionPolicy` now exist in `src/extension-host/manifests/schema.ts` - a legacy-to-normalized adapter now builds `ResolvedExtension` records from current plugin manifests and package metadata - package metadata parsing for discovery, install, and channel catalog paths now routes through host-owned schema helpers - manifest-registry records now carry a normalized `resolvedExtension` - a host-owned resolved-extension registry now exists for static consumers - config doc baseline generation now reads bundled extension metadata through the resolved-extension registry -- the first runtime registration normalization helpers now exist in `src/extension-host/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook writes -- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/registry-writes.ts` -- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/hook-compat.ts` -- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/plugin-api.ts` -- compatibility plugin-registry facade ownership now routes through `src/extension-host/plugin-registry.ts` -- compatibility plugin-registry policy now routes through `src/extension-host/plugin-registry-compat.ts` -- compatibility plugin-registry registration actions now route through `src/extension-host/plugin-registry-registrations.ts` -- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/service-lifecycle.ts` -- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/cli-lifecycle.ts` -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/gateway-methods.ts` -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/tool-runtime.ts` -- plugin provider projection from registry entries into runtime provider objects now route through `src/extension-host/provider-runtime.ts` +- the first runtime registration normalization helpers now exist in `src/extension-host/contributions/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook writes +- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/contributions/registry-writes.ts` +- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/compat/hook-compat.ts` +- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/compat/plugin-api.ts` +- compatibility plugin-registry facade ownership now routes through `src/extension-host/compat/plugin-registry.ts` +- compatibility plugin-registry policy now routes through `src/extension-host/compat/plugin-registry-compat.ts` +- compatibility plugin-registry registration actions now route through `src/extension-host/compat/plugin-registry-registrations.ts` +- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/contributions/service-lifecycle.ts` +- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/contributions/cli-lifecycle.ts` +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/contributions/gateway-methods.ts` +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/contributions/tool-runtime.ts` +- plugin provider projection from registry entries into runtime provider objects now route through `src/extension-host/contributions/provider-runtime.ts` - channel registrations now also keep host-owned runtime-registry storage with mirrored legacy compatibility views, and channel readers now consume the same host-owned boundary - provider, tool, and command registrations now also keep host-owned runtime-registry storage with mirrored legacy compatibility views -- plugin command registration, matching, execution, listing, and native command-spec projection now route through `src/extension-host/command-runtime.ts` while `src/plugins/commands.ts` remains the compatibility facade -- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/provider-discovery.ts` -- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/provider-auth.ts` -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/provider-wizard.ts` -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/provider-auth-flow.ts` -- provider post-selection hook lookup and invocation now route through `src/extension-host/provider-model-selection.ts` -- plugin SDK alias resolution now routes through `src/extension-host/loader-compat.ts` -- loader alias-wired module loader creation now routes through `src/extension-host/loader-module-loader.ts` -- loader cache key construction and registry cache control now route through `src/extension-host/loader-cache.ts` -- loader lazy runtime proxy creation now routes through `src/extension-host/loader-runtime-proxy.ts` -- loader provenance helpers now route through `src/extension-host/loader-provenance.ts` -- loader duplicate-order and record/error policy now route through `src/extension-host/loader-policy.ts` -- loader discovery policy outcomes now route through `src/extension-host/loader-discovery-policy.ts` -- loader initial candidate planning and record creation now route through `src/extension-host/loader-records.ts` -- loader entry-path opening and module import now route through `src/extension-host/loader-import.ts` -- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/loader-runtime.ts` -- loader post-import planning and `register(...)` execution now route through `src/extension-host/loader-register.ts` -- loader per-candidate orchestration now routes through `src/extension-host/loader-flow.ts` -- loader top-level load orchestration now routes through `src/extension-host/loader-orchestrator.ts` -- loader host process state now routes through `src/extension-host/loader-host-state.ts` -- loader preflight and cache-hit setup now routes through `src/extension-host/loader-preflight.ts` -- loader post-preflight pipeline composition now routes through `src/extension-host/loader-pipeline.ts` -- loader execution setup composition now routes through `src/extension-host/loader-execution.ts` -- loader discovery and manifest bootstrap now routes through `src/extension-host/loader-bootstrap.ts` -- loader mutable activation state now routes through `src/extension-host/loader-session.ts` -- loader session run and finalization composition now routes through `src/extension-host/loader-run.ts` -- loader activation policy outcomes now route through `src/extension-host/loader-activation-policy.ts` -- loader record-state transitions now route through `src/extension-host/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values -- loader finalization policy results now route through `src/extension-host/loader-finalization-policy.ts` -- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/loader-finalize.ts` +- plugin command registration, matching, execution, listing, and native command-spec projection now route through `src/extension-host/contributions/command-runtime.ts` while `src/plugins/commands.ts` remains the compatibility facade +- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/contributions/provider-discovery.ts` +- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/contributions/provider-auth.ts` +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/contributions/provider-wizard.ts` +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/contributions/provider-auth-flow.ts` +- provider post-selection hook lookup and invocation now route through `src/extension-host/contributions/provider-model-selection.ts` +- plugin SDK alias resolution now routes through `src/extension-host/compat/loader-compat.ts` +- loader alias-wired module loader creation now routes through `src/extension-host/activation/loader-module-loader.ts` +- loader cache key construction and registry cache control now route through `src/extension-host/activation/loader-cache.ts` +- loader lazy runtime proxy creation now routes through `src/extension-host/activation/loader-runtime-proxy.ts` +- loader provenance helpers now route through `src/extension-host/policy/loader-provenance.ts` +- loader duplicate-order and record/error policy now route through `src/extension-host/policy/loader-policy.ts` +- loader discovery policy outcomes now route through `src/extension-host/policy/loader-discovery-policy.ts` +- loader initial candidate planning and record creation now route through `src/extension-host/activation/loader-records.ts` +- loader entry-path opening and module import now route through `src/extension-host/activation/loader-import.ts` +- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/activation/loader-runtime.ts` +- loader post-import planning and `register(...)` execution now route through `src/extension-host/activation/loader-register.ts` +- loader per-candidate orchestration now routes through `src/extension-host/activation/loader-flow.ts` +- loader top-level load orchestration now routes through `src/extension-host/activation/loader-orchestrator.ts` +- loader host process state now routes through `src/extension-host/activation/loader-host-state.ts` +- loader preflight and cache-hit setup now routes through `src/extension-host/activation/loader-preflight.ts` +- loader post-preflight pipeline composition now routes through `src/extension-host/activation/loader-pipeline.ts` +- loader execution setup composition now routes through `src/extension-host/activation/loader-execution.ts` +- loader discovery and manifest bootstrap now routes through `src/extension-host/activation/loader-bootstrap.ts` +- loader mutable activation state now routes through `src/extension-host/activation/loader-session.ts` +- loader session run and finalization composition now routes through `src/extension-host/activation/loader-run.ts` +- loader activation policy outcomes now route through `src/extension-host/policy/loader-activation-policy.ts` +- loader record-state transitions now route through `src/extension-host/activation/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values +- loader finalization policy results now route through `src/extension-host/policy/loader-finalization-policy.ts` +- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/activation/loader-finalize.ts` How it has been implemented: @@ -102,7 +102,7 @@ How it has been implemented: - by extracting post-preflight execution setup and session-run composition into a host-owned loader-pipeline helper before broadening the schema-driven host lifecycle model - by extracting runtime creation, registry creation, bootstrap setup, module-loader creation, and session creation into a host-owned loader-execution helper before broadening the schema-driven host lifecycle model - by moving mutable activation state into a host-owned loader session before broadening the schema-driven host lifecycle model -- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation +- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/policy/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation - by turning open-allowlist discovery warnings into explicit host-owned discovery-policy results before broadening the schema-driven host lifecycle model - by moving duplicate precedence, config enablement, and early memory-slot gating into explicit host-owned activation-policy outcomes before broadening the schema-driven host lifecycle model - by turning provenance-based untracked-extension warnings and final memory-slot warnings into explicit host-owned finalization-policy results before broadening the schema-driven host lifecycle model @@ -499,7 +499,7 @@ Represents operator-facing commands that bypass the agent. Examples today: - `extensions/phone-control/index.ts:330` -- current plugin command registrations routed through `src/extension-host/command-runtime.ts:1` with `src/plugins/commands.ts:1` kept as the compatibility facade +- current plugin command registrations routed through `src/extension-host/contributions/command-runtime.ts:1` with `src/plugins/commands.ts:1` kept as the compatibility facade Required descriptor metadata: @@ -514,7 +514,7 @@ Behavior rule: - if a command does not accept arguments and arguments are supplied, the host should treat that invocation as a non-match and allow normal built-in or agent handling to continue -This preserves current behavior in `src/extension-host/command-runtime.ts:127`. +This preserves current behavior in `src/extension-host/contributions/command-runtime.ts:127`. These are not agent tools. diff --git a/docs/.internal/extension-host-migration/openclaw-extension-host-implementation-guide.md b/docs/.internal/extension-host-migration/openclaw-extension-host-implementation-guide.md index 03159829ac4..97d493c48ba 100644 --- a/docs/.internal/extension-host-migration/openclaw-extension-host-implementation-guide.md +++ b/docs/.internal/extension-host-migration/openclaw-extension-host-implementation-guide.md @@ -52,56 +52,56 @@ Current status against this guide: What has been implemented so far: - a new `src/extension-host/*` boundary now exists in code -- active runtime registry ownership moved into `src/extension-host/active-registry.ts` +- active runtime registry ownership moved into `src/extension-host/static/active-registry.ts` - `src/plugins/runtime.ts` now acts as a compatibility facade over the host-owned active registry - registry activation now routes through `src/extension-host/activation.ts` -- initial source-of-truth types landed in `src/extension-host/schema.ts`, including `ResolvedExtension`, `ResolvedContribution`, and `ContributionPolicy` +- initial source-of-truth types landed in `src/extension-host/manifests/schema.ts`, including `ResolvedExtension`, `ResolvedContribution`, and `ContributionPolicy` - static manifest and package metadata are now normalized through host-owned helpers rather than being interpreted only inside plugin-era modules - `src/plugins/manifest-registry.ts` now carries a normalized `resolvedExtension` alongside the legacy flat manifest record -- `src/extension-host/resolved-registry.ts` now exposes a host-owned resolved-extension registry view +- `src/extension-host/manifests/resolved-registry.ts` now exposes a host-owned resolved-extension registry view - an initial Phase 0 inventory now exists in `src/extension-host/cutover-inventory.md` -- plugin SDK alias resolution now routes through `src/extension-host/loader-compat.ts` -- loader alias-wired module loader creation now routes through `src/extension-host/loader-module-loader.ts` -- loader cache key construction and registry cache control now route through `src/extension-host/loader-cache.ts` -- loader lazy runtime proxy creation now routes through `src/extension-host/loader-runtime-proxy.ts` -- loader provenance helpers now route through `src/extension-host/loader-provenance.ts` -- loader duplicate-order and record/error policy now route through `src/extension-host/loader-policy.ts` -- loader discovery policy outcomes now route through `src/extension-host/loader-discovery-policy.ts` -- loader initial candidate planning and record creation now route through `src/extension-host/loader-records.ts` -- loader entry-path opening and module import now route through `src/extension-host/loader-import.ts` -- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/loader-runtime.ts` -- loader post-import planning and `register(...)` execution now route through `src/extension-host/loader-register.ts` -- loader per-candidate orchestration now routes through `src/extension-host/loader-flow.ts` -- loader top-level load orchestration now routes through `src/extension-host/loader-orchestrator.ts` -- loader host process state now routes through `src/extension-host/loader-host-state.ts` -- loader preflight and cache-hit setup now routes through `src/extension-host/loader-preflight.ts` -- loader post-preflight pipeline composition now routes through `src/extension-host/loader-pipeline.ts` -- loader execution setup composition now routes through `src/extension-host/loader-execution.ts` -- loader discovery and manifest bootstrap now routes through `src/extension-host/loader-bootstrap.ts` -- loader mutable activation state now routes through `src/extension-host/loader-session.ts` -- loader session run and finalization composition now routes through `src/extension-host/loader-run.ts` -- loader activation policy outcomes now route through `src/extension-host/loader-activation-policy.ts` -- loader record-state transitions now route through `src/extension-host/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values -- loader finalization policy results now route through `src/extension-host/loader-finalization-policy.ts` -- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/loader-finalize.ts` -- runtime registration normalization has started in `src/extension-host/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registrations -- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/registry-writes.ts` -- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/hook-compat.ts` -- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/plugin-api.ts` -- compatibility plugin-registry facade ownership now routes through `src/extension-host/plugin-registry.ts` -- compatibility plugin-registry policy now routes through `src/extension-host/plugin-registry-compat.ts` -- compatibility plugin-registry registration actions now route through `src/extension-host/plugin-registry-registrations.ts` -- host-owned runtime registry accessors now route through `src/extension-host/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views -- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/service-lifecycle.ts` -- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/cli-lifecycle.ts` -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/gateway-methods.ts` -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/tool-runtime.ts` -- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/provider-runtime.ts` -- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/provider-discovery.ts` -- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/provider-auth.ts` -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/provider-wizard.ts` -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/provider-auth-flow.ts` -- provider post-selection hook lookup and invocation now route through `src/extension-host/provider-model-selection.ts` +- plugin SDK alias resolution now routes through `src/extension-host/compat/loader-compat.ts` +- loader alias-wired module loader creation now routes through `src/extension-host/activation/loader-module-loader.ts` +- loader cache key construction and registry cache control now route through `src/extension-host/activation/loader-cache.ts` +- loader lazy runtime proxy creation now routes through `src/extension-host/activation/loader-runtime-proxy.ts` +- loader provenance helpers now route through `src/extension-host/policy/loader-provenance.ts` +- loader duplicate-order and record/error policy now route through `src/extension-host/policy/loader-policy.ts` +- loader discovery policy outcomes now route through `src/extension-host/policy/loader-discovery-policy.ts` +- loader initial candidate planning and record creation now route through `src/extension-host/activation/loader-records.ts` +- loader entry-path opening and module import now route through `src/extension-host/activation/loader-import.ts` +- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/activation/loader-runtime.ts` +- loader post-import planning and `register(...)` execution now route through `src/extension-host/activation/loader-register.ts` +- loader per-candidate orchestration now routes through `src/extension-host/activation/loader-flow.ts` +- loader top-level load orchestration now routes through `src/extension-host/activation/loader-orchestrator.ts` +- loader host process state now routes through `src/extension-host/activation/loader-host-state.ts` +- loader preflight and cache-hit setup now routes through `src/extension-host/activation/loader-preflight.ts` +- loader post-preflight pipeline composition now routes through `src/extension-host/activation/loader-pipeline.ts` +- loader execution setup composition now routes through `src/extension-host/activation/loader-execution.ts` +- loader discovery and manifest bootstrap now routes through `src/extension-host/activation/loader-bootstrap.ts` +- loader mutable activation state now routes through `src/extension-host/activation/loader-session.ts` +- loader session run and finalization composition now routes through `src/extension-host/activation/loader-run.ts` +- loader activation policy outcomes now route through `src/extension-host/policy/loader-activation-policy.ts` +- loader record-state transitions now route through `src/extension-host/activation/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values +- loader finalization policy results now route through `src/extension-host/policy/loader-finalization-policy.ts` +- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/activation/loader-finalize.ts` +- runtime registration normalization has started in `src/extension-host/contributions/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registrations +- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/contributions/registry-writes.ts` +- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/compat/hook-compat.ts` +- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/compat/plugin-api.ts` +- compatibility plugin-registry facade ownership now routes through `src/extension-host/compat/plugin-registry.ts` +- compatibility plugin-registry policy now routes through `src/extension-host/compat/plugin-registry-compat.ts` +- compatibility plugin-registry registration actions now route through `src/extension-host/compat/plugin-registry-registrations.ts` +- host-owned runtime registry accessors now route through `src/extension-host/contributions/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views +- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/contributions/service-lifecycle.ts` +- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/contributions/cli-lifecycle.ts` +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/contributions/gateway-methods.ts` +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/contributions/tool-runtime.ts` +- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/contributions/provider-runtime.ts` +- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/contributions/provider-discovery.ts` +- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/contributions/provider-auth.ts` +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/contributions/provider-wizard.ts` +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/contributions/provider-auth-flow.ts` +- provider post-selection hook lookup and invocation now route through `src/extension-host/contributions/provider-model-selection.ts` - several static and lookup consumers now read through the host boundary or resolved-extension model: - channel registry and dock lookups - message-channel normalization @@ -121,7 +121,7 @@ What has been implemented so far: - command runtime entry detection - gateway method aggregation - gateway plugin HTTP route matching -- plugin command execution and command-status listing now read through `src/extension-host/command-runtime.ts` instead of the legacy `src/plugins/commands.ts` implementation +- plugin command execution and command-status listing now read through `src/extension-host/contributions/command-runtime.ts` instead of the legacy `src/plugins/commands.ts` implementation - the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now also keep host-owned runtime-registry storage with mirrored legacy compatibility arrays and handler maps - `src/cli/plugin-registry.ts` now treats any pre-seeded runtime entry surface as already loaded, not just plugins, channels, or tools @@ -133,7 +133,7 @@ How it has been done: - by converting one static consumer at a time so each call site can move without forcing a loader rewrite - by extracting low-risk runtime registration helpers next and letting `src/plugins/registry.ts` delegate to them as a compatibility facade - by starting actual low-risk runtime write ownership next for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations while keeping lifecycle semantics in legacy owners where that behavior still lives -- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing behind `src/extension-host/command-runtime.ts` while keeping `src/plugins/commands.ts` as the compatibility facade +- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing behind `src/extension-host/contributions/command-runtime.ts` while keeping `src/plugins/commands.ts` as the compatibility facade - by starting loader and lifecycle migration with compatibility helpers for activation and SDK alias resolution before changing discovery or policy behavior - by moving cache-key construction, cache reads, cache writes, and cache clearing behind host-owned helpers before changing activation-state ownership - by extracting lazy runtime proxy creation and alias-wired Jiti module-loader creation into host-owned helpers before broader bootstrap or lifecycle ownership changes @@ -155,7 +155,7 @@ How it has been done: - by extracting post-preflight execution setup and session-run composition into a host-owned loader-pipeline helper before shrinking the remaining orchestrator surface - by extracting runtime creation, registry creation, bootstrap setup, module-loader creation, and session creation into a host-owned loader-execution helper before shrinking the remaining orchestrator surface - by moving mutable activation state such as seen-id tracking, memory-slot selection, and finalization inputs into a host-owned loader session instead of leaving them in top-level loader variables -- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation +- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/policy/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation - by turning open-allowlist discovery warnings into explicit host-owned discovery-policy results before the orchestrator logs them - by moving duplicate precedence, config enablement, and early memory-slot gating into explicit host-owned activation-policy outcomes instead of leaving them inline in the loader flow - by turning provenance-based untracked-extension warnings and final memory-slot warnings into explicit host-owned finalization-policy results before the finalizer applies them diff --git a/docs/.internal/extension-host-migration/openclaw-extension-host-lifecycle-and-security-spec.md b/docs/.internal/extension-host-migration/openclaw-extension-host-lifecycle-and-security-spec.md index 7dbf4c400f6..1ff2d719c0b 100644 --- a/docs/.internal/extension-host-migration/openclaw-extension-host-lifecycle-and-security-spec.md +++ b/docs/.internal/extension-host-migration/openclaw-extension-host-lifecycle-and-security-spec.md @@ -37,52 +37,52 @@ What has been implemented: - registry activation now routes through `src/extension-host/activation.ts` - a host-owned resolved-extension registry exists for static consumers - static config-baseline generation now reads bundled extension metadata through the host-owned resolved-extension registry -- channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registration normalization now delegates through `src/extension-host/runtime-registrations.ts` -- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now delegate through `src/extension-host/registry-writes.ts` -- legacy internal-hook bridging and typed prompt-injection compatibility policy now delegate through `src/extension-host/hook-compat.ts` -- compatibility `OpenClawPluginApi` composition and logger shaping now delegate through `src/extension-host/plugin-api.ts` -- compatibility plugin-registry facade ownership now delegates through `src/extension-host/plugin-registry.ts` -- compatibility plugin-registry policy now delegates through `src/extension-host/plugin-registry-compat.ts` -- compatibility plugin-registry registration actions now delegate through `src/extension-host/plugin-registry-registrations.ts` -- host-owned runtime registry accessors now delegate through `src/extension-host/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views -- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now delegate through `src/extension-host/command-runtime.ts` -- service startup, stop ordering, service-context creation, and failure logging now delegate through `src/extension-host/service-lifecycle.ts` -- CLI duplicate detection, registrar invocation, and async failure logging now delegate through `src/extension-host/cli-lifecycle.ts` -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now delegate through `src/extension-host/gateway-methods.ts` -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now delegate through `src/extension-host/tool-runtime.ts` -- plugin provider projection from registry entries into runtime provider objects now delegates through `src/extension-host/provider-runtime.ts` -- plugin provider discovery filtering, order grouping, and result normalization now delegate through `src/extension-host/provider-discovery.ts` -- provider matching, auth-method selection, config-patch merging, and default-model application now delegate through `src/extension-host/provider-auth.ts` -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now delegate through `src/extension-host/provider-wizard.ts` -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now delegate through `src/extension-host/provider-auth-flow.ts` -- provider post-selection hook lookup and invocation now delegate through `src/extension-host/provider-model-selection.ts` -- loader alias-wired module loader creation now routes through `src/extension-host/loader-module-loader.ts` -- loader cache key construction and registry cache control now route through `src/extension-host/loader-cache.ts` -- loader lazy runtime proxy creation now routes through `src/extension-host/loader-runtime-proxy.ts` -- loader provenance helpers now route through `src/extension-host/loader-provenance.ts` -- loader duplicate-order and record/error policy now route through `src/extension-host/loader-policy.ts` -- loader discovery policy outcomes now route through `src/extension-host/loader-discovery-policy.ts` -- loader initial candidate planning and record creation now route through `src/extension-host/loader-records.ts` -- loader entry-path opening and module import now route through `src/extension-host/loader-import.ts` -- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/loader-runtime.ts` -- loader post-import planning and `register(...)` execution now route through `src/extension-host/loader-register.ts` -- loader per-candidate orchestration now routes through `src/extension-host/loader-flow.ts` -- loader top-level load orchestration now routes through `src/extension-host/loader-orchestrator.ts` -- loader host process state now routes through `src/extension-host/loader-host-state.ts` -- loader preflight and cache-hit setup now routes through `src/extension-host/loader-preflight.ts` -- loader post-preflight pipeline composition now routes through `src/extension-host/loader-pipeline.ts` -- loader execution setup composition now routes through `src/extension-host/loader-execution.ts` -- loader discovery and manifest bootstrap now routes through `src/extension-host/loader-bootstrap.ts` -- loader mutable activation state now routes through `src/extension-host/loader-session.ts` -- loader session run and finalization composition now routes through `src/extension-host/loader-run.ts` -- loader activation policy outcomes now route through `src/extension-host/loader-activation-policy.ts` -- loader record-state transitions now route through `src/extension-host/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values -- loader finalization policy results now route through `src/extension-host/loader-finalization-policy.ts` -- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/loader-finalize.ts` +- channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registration normalization now delegates through `src/extension-host/contributions/runtime-registrations.ts` +- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now delegate through `src/extension-host/contributions/registry-writes.ts` +- legacy internal-hook bridging and typed prompt-injection compatibility policy now delegate through `src/extension-host/compat/hook-compat.ts` +- compatibility `OpenClawPluginApi` composition and logger shaping now delegate through `src/extension-host/compat/plugin-api.ts` +- compatibility plugin-registry facade ownership now delegates through `src/extension-host/compat/plugin-registry.ts` +- compatibility plugin-registry policy now delegates through `src/extension-host/compat/plugin-registry-compat.ts` +- compatibility plugin-registry registration actions now delegate through `src/extension-host/compat/plugin-registry-registrations.ts` +- host-owned runtime registry accessors now delegate through `src/extension-host/contributions/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views +- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now delegate through `src/extension-host/contributions/command-runtime.ts` +- service startup, stop ordering, service-context creation, and failure logging now delegate through `src/extension-host/contributions/service-lifecycle.ts` +- CLI duplicate detection, registrar invocation, and async failure logging now delegate through `src/extension-host/contributions/cli-lifecycle.ts` +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now delegate through `src/extension-host/contributions/gateway-methods.ts` +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now delegate through `src/extension-host/contributions/tool-runtime.ts` +- plugin provider projection from registry entries into runtime provider objects now delegates through `src/extension-host/contributions/provider-runtime.ts` +- plugin provider discovery filtering, order grouping, and result normalization now delegate through `src/extension-host/contributions/provider-discovery.ts` +- provider matching, auth-method selection, config-patch merging, and default-model application now delegate through `src/extension-host/contributions/provider-auth.ts` +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now delegate through `src/extension-host/contributions/provider-wizard.ts` +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now delegate through `src/extension-host/contributions/provider-auth-flow.ts` +- provider post-selection hook lookup and invocation now delegate through `src/extension-host/contributions/provider-model-selection.ts` +- loader alias-wired module loader creation now routes through `src/extension-host/activation/loader-module-loader.ts` +- loader cache key construction and registry cache control now route through `src/extension-host/activation/loader-cache.ts` +- loader lazy runtime proxy creation now routes through `src/extension-host/activation/loader-runtime-proxy.ts` +- loader provenance helpers now route through `src/extension-host/policy/loader-provenance.ts` +- loader duplicate-order and record/error policy now route through `src/extension-host/policy/loader-policy.ts` +- loader discovery policy outcomes now route through `src/extension-host/policy/loader-discovery-policy.ts` +- loader initial candidate planning and record creation now route through `src/extension-host/activation/loader-records.ts` +- loader entry-path opening and module import now route through `src/extension-host/activation/loader-import.ts` +- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/activation/loader-runtime.ts` +- loader post-import planning and `register(...)` execution now route through `src/extension-host/activation/loader-register.ts` +- loader per-candidate orchestration now routes through `src/extension-host/activation/loader-flow.ts` +- loader top-level load orchestration now routes through `src/extension-host/activation/loader-orchestrator.ts` +- loader host process state now routes through `src/extension-host/activation/loader-host-state.ts` +- loader preflight and cache-hit setup now routes through `src/extension-host/activation/loader-preflight.ts` +- loader post-preflight pipeline composition now routes through `src/extension-host/activation/loader-pipeline.ts` +- loader execution setup composition now routes through `src/extension-host/activation/loader-execution.ts` +- loader discovery and manifest bootstrap now routes through `src/extension-host/activation/loader-bootstrap.ts` +- loader mutable activation state now routes through `src/extension-host/activation/loader-session.ts` +- loader session run and finalization composition now routes through `src/extension-host/activation/loader-run.ts` +- loader activation policy outcomes now route through `src/extension-host/policy/loader-activation-policy.ts` +- loader record-state transitions now route through `src/extension-host/activation/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values +- loader finalization policy results now route through `src/extension-host/policy/loader-finalization-policy.ts` +- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/activation/loader-finalize.ts` How it has been implemented: -- by extracting `src/extension-host/active-registry.ts` and making `src/plugins/runtime.ts` delegate to it +- by extracting `src/extension-host/static/active-registry.ts` and making `src/plugins/runtime.ts` delegate to it - by leaving lifecycle behavior unchanged for now and only moving ownership of the shared registry boundary - by moving low-risk readers first, such as channel lookup, dock lookup, message-channel lookup, and default HTTP route registry access - by extending that same host-owned boundary into static consumers instead of introducing separate one-off metadata loaders @@ -111,7 +111,7 @@ How it has been implemented: - by adding explicit compatibility `lifecycleState` mapping on loader-owned plugin records before enforcing the loader lifecycle state machine - by promoting successfully registered plugins to `ready` during host-owned finalization while leaving broader activation-state semantics for later phases - by moving mutable activation state such as seen-id tracking, memory-slot selection, and finalization inputs into a host-owned loader session before broader activation-state semantics move -- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation +- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/policy/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation - by turning open-allowlist discovery warnings into explicit host-owned discovery-policy results before the orchestrator logs them - by moving duplicate precedence, config enablement, and early memory-slot gating into explicit host-owned activation-policy outcomes before broader policy semantics move - by turning provenance-based untracked-extension warnings and final memory-slot warnings into explicit host-owned finalization-policy results before the finalizer applies them @@ -133,7 +133,7 @@ How it has been implemented: - by extracting provider-id normalization into `src/agents/provider-id.ts` so provider-only host seams do not inherit the heavier agent and browser dependency graph from `src/agents/model-selection.ts` - by extracting model-ref parsing into `src/agents/model-ref.ts` and Google model-id normalization into `src/agents/google-model-id.ts` so provider auth and setup seams can be tested without pulling the heavier provider-loader and browser dependency graph - by introducing host-owned runtime-registry accessors for channel, provider, tool, service, CLI, command, gateway-method, and HTTP-route consumers first, then moving channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service storage into that host-owned state while keeping mirrored legacy compatibility arrays and handler maps -- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing into `src/extension-host/command-runtime.ts` while keeping the legacy command module as a compatibility facade +- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing into `src/extension-host/contributions/command-runtime.ts` while keeping the legacy command module as a compatibility facade - by tightening the CLI pre-load fast path to treat any host-known runtime entry surface as already loaded rather than only plugins, channels, or tools What is still pending from this spec: diff --git a/docs/.internal/extension-host-migration/openclaw-kernel-event-pipeline-spec.md b/docs/.internal/extension-host-migration/openclaw-kernel-event-pipeline-spec.md index 39ec0cf6813..cddb4669d09 100644 --- a/docs/.internal/extension-host-migration/openclaw-kernel-event-pipeline-spec.md +++ b/docs/.internal/extension-host-migration/openclaw-kernel-event-pipeline-spec.md @@ -59,24 +59,24 @@ Relevant prerequisite work that has landed: - loader record-state transitions now have a host-owned helper boundary and enforced loader lifecycle state machine, while still preserving compatibility `PluginRecord.status` values - loader finalization policy outcomes now have a host-owned helper boundary - loader final cache, readiness promotion, and activation finalization now has a host-owned helper boundary -- low-risk channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook compatibility writes now have a host-owned helper boundary in `src/extension-host/registry-writes.ts` -- legacy internal-hook bridging and typed prompt-injection compatibility policy now have a host-owned helper boundary in `src/extension-host/hook-compat.ts` -- compatibility `OpenClawPluginApi` composition and logger shaping now have a host-owned helper boundary in `src/extension-host/plugin-api.ts` -- compatibility plugin-registry facade ownership now has a host-owned helper boundary in `src/extension-host/plugin-registry.ts` -- compatibility plugin-registry policy now has a host-owned helper boundary in `src/extension-host/plugin-registry-compat.ts` -- compatibility plugin-registry registration actions now have a host-owned helper boundary in `src/extension-host/plugin-registry-registrations.ts` -- host-owned runtime registry accessors now have a host-owned helper boundary in `src/extension-host/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views -- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now have a host-owned helper boundary in `src/extension-host/command-runtime.ts` -- service startup, stop ordering, service-context creation, and failure logging now have a host-owned helper boundary in `src/extension-host/service-lifecycle.ts` -- CLI duplicate detection, registrar invocation, and async failure logging now have a host-owned helper boundary in `src/extension-host/cli-lifecycle.ts` -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now have a host-owned helper boundary in `src/extension-host/gateway-methods.ts` -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now have a host-owned helper boundary in `src/extension-host/tool-runtime.ts` -- plugin provider projection from registry entries into runtime provider objects now have a host-owned helper boundary in `src/extension-host/provider-runtime.ts` -- plugin provider discovery filtering, order grouping, and result normalization now have a host-owned helper boundary in `src/extension-host/provider-discovery.ts` -- provider matching, auth-method selection, config-patch merging, and default-model application now have a host-owned helper boundary in `src/extension-host/provider-auth.ts` -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now have a host-owned helper boundary in `src/extension-host/provider-wizard.ts` -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now have a host-owned helper boundary in `src/extension-host/provider-auth-flow.ts` -- provider post-selection hook lookup and invocation now have a host-owned helper boundary in `src/extension-host/provider-model-selection.ts` +- low-risk channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook compatibility writes now have a host-owned helper boundary in `src/extension-host/contributions/registry-writes.ts` +- legacy internal-hook bridging and typed prompt-injection compatibility policy now have a host-owned helper boundary in `src/extension-host/compat/hook-compat.ts` +- compatibility `OpenClawPluginApi` composition and logger shaping now have a host-owned helper boundary in `src/extension-host/compat/plugin-api.ts` +- compatibility plugin-registry facade ownership now has a host-owned helper boundary in `src/extension-host/compat/plugin-registry.ts` +- compatibility plugin-registry policy now has a host-owned helper boundary in `src/extension-host/compat/plugin-registry-compat.ts` +- compatibility plugin-registry registration actions now have a host-owned helper boundary in `src/extension-host/compat/plugin-registry-registrations.ts` +- host-owned runtime registry accessors now have a host-owned helper boundary in `src/extension-host/contributions/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views +- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now have a host-owned helper boundary in `src/extension-host/contributions/command-runtime.ts` +- service startup, stop ordering, service-context creation, and failure logging now have a host-owned helper boundary in `src/extension-host/contributions/service-lifecycle.ts` +- CLI duplicate detection, registrar invocation, and async failure logging now have a host-owned helper boundary in `src/extension-host/contributions/cli-lifecycle.ts` +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now have a host-owned helper boundary in `src/extension-host/contributions/gateway-methods.ts` +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now have a host-owned helper boundary in `src/extension-host/contributions/tool-runtime.ts` +- plugin provider projection from registry entries into runtime provider objects now have a host-owned helper boundary in `src/extension-host/contributions/provider-runtime.ts` +- plugin provider discovery filtering, order grouping, and result normalization now have a host-owned helper boundary in `src/extension-host/contributions/provider-discovery.ts` +- provider matching, auth-method selection, config-patch merging, and default-model application now have a host-owned helper boundary in `src/extension-host/contributions/provider-auth.ts` +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now have a host-owned helper boundary in `src/extension-host/contributions/provider-wizard.ts` +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now have a host-owned helper boundary in `src/extension-host/contributions/provider-auth-flow.ts` +- provider post-selection hook lookup and invocation now have a host-owned helper boundary in `src/extension-host/contributions/provider-model-selection.ts` Why this matters for this spec: diff --git a/docs/.internal/extension-host-migration/openclaw-kernel-extension-host-transition-plan.md b/docs/.internal/extension-host-migration/openclaw-kernel-extension-host-transition-plan.md index c3efdfa197b..309894e4b54 100644 --- a/docs/.internal/extension-host-migration/openclaw-kernel-extension-host-transition-plan.md +++ b/docs/.internal/extension-host-migration/openclaw-kernel-extension-host-transition-plan.md @@ -45,49 +45,49 @@ What has landed: - plugin manifest records now carry a normalized `resolvedExtension` - a host-owned resolved-extension registry view now exists for static consumers - an initial Phase 0 cutover inventory now exists in `src/extension-host/cutover-inventory.md` -- plugin SDK alias resolution now routes through `src/extension-host/loader-compat.ts` -- loader alias-wired module loader creation now routes through `src/extension-host/loader-module-loader.ts` -- loader cache key construction and registry cache control now route through `src/extension-host/loader-cache.ts` -- loader lazy runtime proxy creation now routes through `src/extension-host/loader-runtime-proxy.ts` -- loader provenance helpers now route through `src/extension-host/loader-provenance.ts` -- loader duplicate-order and record/error policy now route through `src/extension-host/loader-policy.ts` -- loader discovery policy outcomes now route through `src/extension-host/loader-discovery-policy.ts` -- loader initial candidate planning and record creation now route through `src/extension-host/loader-records.ts` -- loader entry-path opening and module import now route through `src/extension-host/loader-import.ts` -- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/loader-runtime.ts` -- loader post-import planning and `register(...)` execution now route through `src/extension-host/loader-register.ts` -- loader per-candidate orchestration now routes through `src/extension-host/loader-flow.ts` -- loader top-level load orchestration now routes through `src/extension-host/loader-orchestrator.ts` -- loader host process state now routes through `src/extension-host/loader-host-state.ts` -- loader preflight and cache-hit setup now routes through `src/extension-host/loader-preflight.ts` -- loader post-preflight pipeline composition now routes through `src/extension-host/loader-pipeline.ts` -- loader execution setup composition now routes through `src/extension-host/loader-execution.ts` -- loader discovery and manifest bootstrap now routes through `src/extension-host/loader-bootstrap.ts` -- loader mutable activation state now routes through `src/extension-host/loader-session.ts` -- loader session run and finalization composition now routes through `src/extension-host/loader-run.ts` -- loader activation policy outcomes now route through `src/extension-host/loader-activation-policy.ts` -- loader record-state transitions now route through `src/extension-host/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values -- loader finalization policy results now route through `src/extension-host/loader-finalization-policy.ts` -- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/loader-finalize.ts` -- runtime registration normalization has started in `src/extension-host/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registrations -- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/registry-writes.ts` -- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/hook-compat.ts` -- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/plugin-api.ts` -- compatibility plugin-registry facade ownership now routes through `src/extension-host/plugin-registry.ts` -- compatibility plugin-registry policy now routes through `src/extension-host/plugin-registry-compat.ts` -- compatibility plugin-registry registration actions now route through `src/extension-host/plugin-registry-registrations.ts` -- host-owned runtime registry accessors now route through `src/extension-host/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views -- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now route through `src/extension-host/command-runtime.ts` -- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/service-lifecycle.ts` -- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/cli-lifecycle.ts` -- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/gateway-methods.ts` -- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/tool-runtime.ts` -- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/provider-runtime.ts` -- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/provider-discovery.ts` -- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/provider-auth.ts` -- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/provider-wizard.ts` -- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/provider-auth-flow.ts` -- provider post-selection hook lookup and invocation now route through `src/extension-host/provider-model-selection.ts` +- plugin SDK alias resolution now routes through `src/extension-host/compat/loader-compat.ts` +- loader alias-wired module loader creation now routes through `src/extension-host/activation/loader-module-loader.ts` +- loader cache key construction and registry cache control now route through `src/extension-host/activation/loader-cache.ts` +- loader lazy runtime proxy creation now routes through `src/extension-host/activation/loader-runtime-proxy.ts` +- loader provenance helpers now route through `src/extension-host/policy/loader-provenance.ts` +- loader duplicate-order and record/error policy now route through `src/extension-host/policy/loader-policy.ts` +- loader discovery policy outcomes now route through `src/extension-host/policy/loader-discovery-policy.ts` +- loader initial candidate planning and record creation now route through `src/extension-host/activation/loader-records.ts` +- loader entry-path opening and module import now route through `src/extension-host/activation/loader-import.ts` +- loader module-export resolution, config validation, and memory-slot load decisions now route through `src/extension-host/activation/loader-runtime.ts` +- loader post-import planning and `register(...)` execution now route through `src/extension-host/activation/loader-register.ts` +- loader per-candidate orchestration now routes through `src/extension-host/activation/loader-flow.ts` +- loader top-level load orchestration now routes through `src/extension-host/activation/loader-orchestrator.ts` +- loader host process state now routes through `src/extension-host/activation/loader-host-state.ts` +- loader preflight and cache-hit setup now routes through `src/extension-host/activation/loader-preflight.ts` +- loader post-preflight pipeline composition now routes through `src/extension-host/activation/loader-pipeline.ts` +- loader execution setup composition now routes through `src/extension-host/activation/loader-execution.ts` +- loader discovery and manifest bootstrap now routes through `src/extension-host/activation/loader-bootstrap.ts` +- loader mutable activation state now routes through `src/extension-host/activation/loader-session.ts` +- loader session run and finalization composition now routes through `src/extension-host/activation/loader-run.ts` +- loader activation policy outcomes now route through `src/extension-host/policy/loader-activation-policy.ts` +- loader record-state transitions now route through `src/extension-host/activation/loader-state.ts`, which now enforces an explicit loader lifecycle state machine while preserving compatibility `PluginRecord.status` values +- loader finalization policy results now route through `src/extension-host/policy/loader-finalization-policy.ts` +- loader final cache, readiness promotion, and activation finalization now routes through `src/extension-host/activation/loader-finalize.ts` +- runtime registration normalization has started in `src/extension-host/contributions/runtime-registrations.ts` for channel, provider, HTTP-route, gateway-method, tool, CLI, service, command, context-engine, and hook registrations +- low-risk runtime compatibility writes for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations now route through `src/extension-host/contributions/registry-writes.ts` +- legacy internal-hook bridging and typed prompt-injection compatibility policy now route through `src/extension-host/compat/hook-compat.ts` +- compatibility `OpenClawPluginApi` composition and logger shaping now route through `src/extension-host/compat/plugin-api.ts` +- compatibility plugin-registry facade ownership now routes through `src/extension-host/compat/plugin-registry.ts` +- compatibility plugin-registry policy now routes through `src/extension-host/compat/plugin-registry-compat.ts` +- compatibility plugin-registry registration actions now route through `src/extension-host/compat/plugin-registry-registrations.ts` +- host-owned runtime registry accessors now route through `src/extension-host/contributions/runtime-registry.ts`, and the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now keep host-owned storage there with mirrored legacy compatibility views +- plugin command registration, matching, execution, listing, native command-spec projection, and loader reload clearing now route through `src/extension-host/contributions/command-runtime.ts` +- service startup, stop ordering, service-context creation, and failure logging now route through `src/extension-host/contributions/service-lifecycle.ts` +- CLI duplicate detection, registrar invocation, and async failure logging now route through `src/extension-host/contributions/cli-lifecycle.ts` +- gateway method-id aggregation, plugin diagnostic shaping, and extra-handler composition now route through `src/extension-host/contributions/gateway-methods.ts` +- plugin tool resolution, conflict handling, optional-tool gating, and plugin-tool metadata tracking now route through `src/extension-host/contributions/tool-runtime.ts` +- plugin provider projection from registry entries into runtime provider objects now routes through `src/extension-host/contributions/provider-runtime.ts` +- plugin provider discovery filtering, order grouping, and result normalization now route through `src/extension-host/contributions/provider-discovery.ts` +- provider matching, auth-method selection, config-patch merging, and default-model application now route through `src/extension-host/contributions/provider-auth.ts` +- provider onboarding option building, model-picker entry building, and provider-method choice resolution now route through `src/extension-host/contributions/provider-wizard.ts` +- loaded-provider auth application, plugin-enable gating, auth-method execution, and post-auth default-model handling now route through `src/extension-host/contributions/provider-auth-flow.ts` +- provider post-selection hook lookup and invocation now route through `src/extension-host/contributions/provider-model-selection.ts` - several existing consumers now read host-owned normalized data instead of plugin-era manifest or runtime state directly: - channel and dock lookup surfaces - message-channel normalization @@ -107,7 +107,7 @@ What has landed: - command runtime entry detection - gateway method aggregation - gateway plugin HTTP route matching -- plugin command execution and command-status listing now read through `src/extension-host/command-runtime.ts` instead of the legacy `src/plugins/commands.ts` implementation +- plugin command execution and command-status listing now read through `src/extension-host/contributions/command-runtime.ts` instead of the legacy `src/plugins/commands.ts` implementation - the channel, provider, tool, command, HTTP-route, gateway-method, CLI, and service slices now also keep host-owned runtime-registry storage with mirrored legacy compatibility arrays and handler maps - `src/cli/plugin-registry.ts` now treats any pre-seeded runtime entry surface as already loaded, not just plugins, channels, or tools @@ -120,7 +120,7 @@ How it was done: - by migrating static consumers one by one onto resolved-extension data instead of forcing a single cutover - by moving the first low-risk runtime writes behind host-owned helpers while keeping `src/plugins/registry.ts` as the compatibility call surface - by starting actual low-risk runtime write ownership for channel, provider, gateway-method, HTTP-route, tool, CLI, service, command, context-engine, and hook registrations once normalization helpers were already in place, while keeping lifecycle semantics in legacy owners where they still apply -- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing behind `src/extension-host/command-runtime.ts` while keeping `src/plugins/commands.ts` as the compatibility facade +- by moving plugin command duplicate enforcement, registration, matching, execution, listing, native command-spec projection, and loader reload clearing behind `src/extension-host/contributions/command-runtime.ts` while keeping `src/plugins/commands.ts` as the compatibility facade - by moving the first loader-owned compatibility pieces behind host-owned helpers before changing discovery, enablement, or policy flow - by moving cache-key construction, cache reads, cache writes, and cache clearing behind host-owned helpers before changing activation-state ownership - by extracting lazy runtime proxy creation and alias-wired Jiti module-loader creation into host-owned helpers before broader bootstrap or lifecycle ownership changes @@ -142,7 +142,7 @@ How it was done: - by extracting post-preflight execution setup and session-run composition into a host-owned loader-pipeline helper before shrinking the remaining orchestrator surface - by extracting runtime creation, registry creation, bootstrap setup, module-loader creation, and session creation into a host-owned loader-execution helper before shrinking the remaining orchestrator surface - by moving mutable activation state such as seen-id tracking, memory-slot selection, and finalization inputs into a host-owned loader session instead of leaving them in top-level loader variables -- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation +- by extracting shared provenance path matching and install-rule evaluation into `src/extension-host/policy/loader-provenance.ts` so activation and finalization policy seams reuse one host-owned implementation - by turning open-allowlist discovery warnings into explicit host-owned discovery-policy results before the orchestrator logs them - by moving duplicate precedence, config enablement, and early memory-slot gating into explicit host-owned activation-policy outcomes instead of leaving them inline in the loader flow - by turning provenance-based untracked-extension warnings and final memory-slot warnings into explicit host-owned finalization-policy results before the finalizer applies them @@ -837,8 +837,8 @@ This preserves the distinction that already exists on `main` between plugin CLI Parity rule: -- `capability.control-command` must preserve `acceptsArgs` matching behavior from `src/extension-host/command-runtime.ts:127` -- it must also preserve provider-specific native command names used by native command menus in `src/extension-host/command-runtime.ts:218` +- `capability.control-command` must preserve `acceptsArgs` matching behavior from `src/extension-host/contributions/command-runtime.ts:127` +- it must also preserve provider-specific native command names used by native command menus in `src/extension-host/contributions/command-runtime.ts:218` ## 1k. Provider integration and auth ownership @@ -1408,7 +1408,7 @@ Exit criteria: Current implementation status: - partially implemented -- the anti-corruption boundary now exists in code through `src/extension-host/active-registry.ts` +- the anti-corruption boundary now exists in code through `src/extension-host/static/active-registry.ts` - several central readers now go through that boundary - the initial cutover inventory now exists in `src/extension-host/cutover-inventory.md` and is being updated as surfaces move, but the phase is still incomplete because loader orchestration, lifecycle ownership, and later compatibility phases have not moved yet