mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-13 06:03:39 -06:00
6192673da4
* refactor(plugin-sdk): delete the heavy runtime-doctor barrel
Nothing may pull the state-db/kysely graph through a doctor barrel anymore.
The barrel's remaining heavy exports move to two narrow private-local
subpaths, each with a single purpose:
- doctor-repair-runtime: install-path diagnosis, plugin config removal, and
state-database schema detect/repair (matrix doctor, voice-call lazy import)
- plugin-state-store-runtime: the sync keyed-store factory. It stays out of
plugin-state-runtime because hot channel entrypoints import that at module
load and opening a store pulls the state-database graph.
Doctor closures also stop pulling ssrf-runtime (fetch-guard + gateway net)
for two legacy private-network helpers that live in the lighter ssrf-policy
subpath: mattermost, nextcloud-talk, tlon, matrix.
The closure guard now forbids the two new heavy subpaths instead of the
deleted barrel, so the invariant keeps being enforced where it still applies.
* perf(doctor): keep heavy graphs out of every doctor closure
Doctor enumeration cold-loads each declaring plugin's contract closure, so
one heavy import in a closure is paid by the whole sweep. Four barrels were
still dragging unrelated graphs in for trivial helpers; each is repaired at
the leaf rather than by caching downstream:
- Legacy private-network config migration moves to a config leaf. It only
reshapes records, but lived beside the SSRF runtime (DNS, proxy, logging),
costing mattermost ~2.7s. ssrf-policy re-exports it, surface unchanged.
- Streaming config readers move to a leaf. They read two config keys, but
streaming.ts also formats tool aggregates, pulling tool-display/logging/
acp-core; that cost slack ~2.3s.
- signal took the channel-secret barrel for isRecord; the canonical plugin
record guard is string-coerce-runtime (root AGENTS.md).
- llm-task took the provider-model barrel for parseModelRef, now a narrow
model-ref-parse subpath.
Full doctor enumeration of all 42 declaring plugins, built mode:
legacy config rules 6668ms -> 1265ms, state migrations 184ms -> 127ms.
No plugin remains an outlier; the slowest is now ~380ms against a ~200ms floor.
Public export surfaces of every touched SDK subpath are byte-identical
(verified by diffing built module exports before/after); the API baseline
hashes move only because re-exported declarations emit differently.
The closure guard gains rules for each repaired barrel so the invariant
holds for future closures.
* fix(release): exclude new private-local declarations from the published package
Same pack-path rule as c41da3759f: private-local subpaths ship without d.ts.
* fix(doctor): repair the closure guard violations that break main
The landed guard fails on main: three closures import heavy barrels for one
symbol each. Two more surfaced once the guard learned about the provider-model
barrel. Each gets a narrow subpath at the leaf:
- telegram sent-message-cache + state-migrations took the session-store barrel
(session accessor + state-db) for resolveStorePath -> session-store-paths
- discord thread-bindings.state took the channel-outbound barrel (reply
pipeline + channel registry) for one identity write -> outbound-echo-runtime
- discord model-picker took the provider-model barrel for normalizeProviderId,
which model-ref-parse now exposes beside parseModelRef
The guard also stops walking artifacts of plugins whose manifest declares no
doctor surface. Such a declaration gates the artifact off every enumeration
path exactly as resolvePluginDoctorContracts does, so its closure cost is never
paid; anthropic ("doctorContract": {}) was being held to a cost it cannot
incur. Absent declarations still load eagerly and stay enforced.
Side effect worth naming: discord's built doctor contract now loads again.
On main both discord and telegram fail to require in packaged builds (an
ESM-only transitive dep) and silently lose their repairs; this restores
discord and takes enumerated legacy config rules from 87 to 99. Telegram's
built artifact still pulls execa through dist chunking - a build-level defect
with a different owner, filed as follow-up.
337 lines
7.9 KiB
JSON
337 lines
7.9 KiB
JSON
[
|
|
"core",
|
|
"provider-setup",
|
|
"sandbox",
|
|
"routing",
|
|
"runtime",
|
|
"health",
|
|
"doctor-repair-runtime",
|
|
"model-ref-parse",
|
|
"outbound-echo-runtime",
|
|
"session-store-paths",
|
|
"plugin-state-store-runtime",
|
|
"runtime-doctor-migrations",
|
|
"runtime-env",
|
|
"proxy-capture",
|
|
"setup",
|
|
"setup-runtime",
|
|
"channel-setup",
|
|
"channel-streaming",
|
|
"channel-streaming-config",
|
|
"setup-tools",
|
|
"archive",
|
|
"root-walk",
|
|
"secret-file",
|
|
"approval-auth-runtime",
|
|
"approval-client-runtime",
|
|
"approval-delivery-runtime",
|
|
"approval-gateway-runtime",
|
|
"approval-reference-runtime",
|
|
"approval-handler-adapter-runtime",
|
|
"approval-handler-runtime",
|
|
"channel-runtime-context",
|
|
"approval-native-runtime",
|
|
"approval-reaction-runtime",
|
|
"approval-reply-runtime",
|
|
"approval-runtime",
|
|
"question-gateway-runtime",
|
|
"config-runtime",
|
|
"config-contracts",
|
|
"plugin-config-runtime",
|
|
"config-mutation",
|
|
"cron-store-runtime",
|
|
"json-schema-runtime",
|
|
"json-unsafe-integers",
|
|
"reply-runtime",
|
|
"reply-dispatch-runtime",
|
|
"reply-reference",
|
|
"reply-chunking",
|
|
"reply-payload",
|
|
"reply-payload-testing",
|
|
"agent-media-payload",
|
|
"inbound-reply-dispatch",
|
|
"inbound-envelope",
|
|
"inbound-event-delivery",
|
|
"channel-reply-pipeline",
|
|
"interactive-runtime",
|
|
"outbound-media",
|
|
"pair-loop-guard-runtime",
|
|
"poll-runtime",
|
|
"async-lock-runtime",
|
|
"channel-activity-runtime",
|
|
"concurrency-runtime",
|
|
"dedupe-runtime",
|
|
"delivery-queue-runtime",
|
|
"file-access-runtime",
|
|
"heartbeat-runtime",
|
|
"expect-runtime",
|
|
"number-runtime",
|
|
"secure-random-runtime",
|
|
"system-event-runtime",
|
|
"transport-ready-runtime",
|
|
"exec-approvals-runtime",
|
|
"infra-runtime",
|
|
"runtime-config-snapshot",
|
|
"runtime-group-policy",
|
|
"model-session-runtime",
|
|
"talk-config-runtime",
|
|
"ssrf-policy",
|
|
"ssrf-runtime",
|
|
"ssrf-runtime-internal",
|
|
"media-runtime",
|
|
"media-local-roots",
|
|
"media-store",
|
|
"media-mime",
|
|
"embedding-providers",
|
|
"media-generation-runtime",
|
|
"conversation-binding-runtime",
|
|
"conversation-runtime",
|
|
"thread-bindings-runtime",
|
|
"thread-bindings-session-runtime",
|
|
"text-runtime",
|
|
"text-chunking",
|
|
"agent-scope-runtime",
|
|
"agent-runtime",
|
|
"simple-completion-runtime",
|
|
"speech-core",
|
|
"speech-settings",
|
|
"tts-runtime",
|
|
"plugin-runtime",
|
|
"channel-secret-basic-runtime",
|
|
"channel-secret-runtime",
|
|
"channel-secret-tts-runtime",
|
|
"secret-ref-runtime",
|
|
"secret-file-runtime",
|
|
"security-runtime",
|
|
"gateway-method-runtime",
|
|
"gateway-runtime",
|
|
"cli-argv",
|
|
"cli-runtime",
|
|
"cli-backend",
|
|
"codex-mcp-projection",
|
|
"codex-session-transcript-runtime",
|
|
"agent-harness-task-runtime",
|
|
"agent-harness",
|
|
"agent-harness-exec-review-runtime",
|
|
"agent-harness-runtime",
|
|
"agent-harness-tool-runtime",
|
|
"hook-runtime",
|
|
"html-entity-runtime",
|
|
"host-runtime",
|
|
"types",
|
|
"process-runtime",
|
|
"windows-spawn",
|
|
"acp-runtime",
|
|
"acp-runtime-backend",
|
|
"acp-binding-runtime",
|
|
"acp-binding-resolve-runtime",
|
|
"lazy-runtime",
|
|
"agent-runtime-test-contracts",
|
|
"channel-target-testing",
|
|
"channel-test-helpers",
|
|
"plugin-test-api",
|
|
"plugin-test-contracts",
|
|
"plugin-test-runtime",
|
|
"provider-http-test-mocks",
|
|
"provider-test-contracts",
|
|
"test-env",
|
|
"test-fixtures",
|
|
"test-live",
|
|
"test-live-auth",
|
|
"test-media-generation",
|
|
"test-media-understanding",
|
|
"test-node-mocks",
|
|
"test-state",
|
|
"temp-path",
|
|
"time-runtime",
|
|
"logging-core",
|
|
"migration",
|
|
"migration-runtime",
|
|
"plugin-state-runtime",
|
|
"plugin-state-test-runtime",
|
|
"markdown-table-runtime",
|
|
"account-helpers",
|
|
"account-core",
|
|
"account-id",
|
|
"account-resolution",
|
|
"account-resolution-runtime",
|
|
"agent-config-primitives",
|
|
"access-groups",
|
|
"allow-from",
|
|
"allowlist-config-edit",
|
|
"browser-config",
|
|
"boolean-param",
|
|
"channel-contract-testing",
|
|
"channel-dm-policy",
|
|
"dangerous-name-runtime",
|
|
"command-auth",
|
|
"command-auth-native",
|
|
"command-primitives-runtime",
|
|
"command-status",
|
|
"command-status-runtime",
|
|
"command-detection",
|
|
"command-surface",
|
|
"collection-runtime",
|
|
"direct-dm-guard-policy",
|
|
"discord",
|
|
"matrix",
|
|
"device-bootstrap",
|
|
"diagnostic-runtime",
|
|
"error-runtime",
|
|
"extension-shared",
|
|
"channel-config-helpers",
|
|
"channel-config-writes",
|
|
"channel-config-primitives",
|
|
"channel-config-schema",
|
|
"bundled-channel-config-schema",
|
|
"chat-channel-ids",
|
|
"channel-actions",
|
|
"channel-plugin-common",
|
|
"channel-core",
|
|
"channel-entry-contract",
|
|
"channel-contract",
|
|
"channel-feedback",
|
|
"channel-inbound",
|
|
"channel-inbound-debounce",
|
|
"channel-logging",
|
|
"channel-mention-gating",
|
|
"channel-lifecycle",
|
|
"channel-ingress-runtime",
|
|
"channel-message",
|
|
"channel-outbound",
|
|
"channel-pairing",
|
|
"channel-policy",
|
|
"channel-send-result",
|
|
"channel-route",
|
|
"channel-targets",
|
|
"context-visibility-runtime",
|
|
"file-lock",
|
|
"fetch-runtime",
|
|
"runtime-fetch",
|
|
"inline-image-data-url-runtime",
|
|
"node-host",
|
|
"response-limit-runtime",
|
|
"session-binding-runtime",
|
|
"session-catalog",
|
|
"session-catalog-runtime",
|
|
"session-discussion",
|
|
"session-key-runtime",
|
|
"session-store-runtime",
|
|
"session-transcript-runtime",
|
|
"sqlite-runtime",
|
|
"sqlite-runtime-testing",
|
|
"session-transcript-hit",
|
|
"session-visibility",
|
|
"ssrf-dispatcher",
|
|
"string-coerce-runtime",
|
|
"group-activation",
|
|
"group-access",
|
|
"global-singleton",
|
|
"directory-config-runtime",
|
|
"directory-runtime",
|
|
"image-generation",
|
|
"image-generation-runtime",
|
|
"image-generation-core",
|
|
"music-generation",
|
|
"video-generation",
|
|
"video-generation-runtime",
|
|
"video-generation-core",
|
|
"reply-history",
|
|
"realtime-transcription",
|
|
"realtime-bootstrap-context",
|
|
"realtime-voice-audio-queue",
|
|
"realtime-voice-activation",
|
|
"realtime-voice",
|
|
"meeting-runtime",
|
|
"transcripts",
|
|
"media-understanding",
|
|
"media-understanding-runtime",
|
|
"messaging-targets",
|
|
"request-url",
|
|
"runtime-store",
|
|
"json-store",
|
|
"persistent-dedupe",
|
|
"ingress-effect-once",
|
|
"keyed-async-queue",
|
|
"qa-runner-runtime",
|
|
"memory-core-host-embedding-registry",
|
|
"memory-core-host-engine-embeddings",
|
|
"memory-core-host-engine-curated",
|
|
"memory-core-host-engine-foundation",
|
|
"memory-core-host-engine-fs",
|
|
"memory-core-host-engine-qmd",
|
|
"memory-core-host-engine-schema",
|
|
"memory-core-host-engine-storage",
|
|
"memory-core-host-secret",
|
|
"memory-core-host-status",
|
|
"memory-core-host-runtime-cli",
|
|
"memory-core-host-runtime-core",
|
|
"memory-core-host-runtime-files",
|
|
"memory-host-core",
|
|
"memory-host-events",
|
|
"memory-host-markdown",
|
|
"memory-host-search",
|
|
"message-tool-delivery-hints",
|
|
"models-provider-runtime",
|
|
"skill-commands-runtime",
|
|
"native-command-config-runtime",
|
|
"native-command-registry",
|
|
"provider-auth",
|
|
"provider-oauth-runtime",
|
|
"provider-auth-runtime",
|
|
"provider-auth-login-flow-runtime",
|
|
"provider-auth-api-key",
|
|
"provider-auth-result",
|
|
"provider-selection-runtime",
|
|
"plugin-entry",
|
|
"provider-catalog-live-runtime",
|
|
"provider-catalog-runtime",
|
|
"provider-catalog-shared",
|
|
"provider-entry",
|
|
"provider-env-vars",
|
|
"provider-http",
|
|
"provider-model-types",
|
|
"provider-model-shared",
|
|
"provider-onboard",
|
|
"provider-stream-family",
|
|
"provider-stream-shared",
|
|
"provider-transport-runtime",
|
|
"provider-stream",
|
|
"provider-tools",
|
|
"provider-usage",
|
|
"document-extractor",
|
|
"web-content-extractor",
|
|
"provider-web-fetch-contract",
|
|
"provider-web-fetch",
|
|
"provider-web-search-config-contract",
|
|
"provider-web-search-contract",
|
|
"provider-web-search",
|
|
"retry-runtime",
|
|
"run-command",
|
|
"param-readers",
|
|
"secret-input",
|
|
"secret-input-runtime",
|
|
"channel-status",
|
|
"status-helpers",
|
|
"speech",
|
|
"string-normalization-runtime",
|
|
"state-paths",
|
|
"target-resolver-runtime",
|
|
"telegram-account",
|
|
"text-autolink-runtime",
|
|
"text-utility-runtime",
|
|
"widget-html",
|
|
"tool-plugin",
|
|
"tool-payload",
|
|
"tool-results",
|
|
"tool-send",
|
|
"webhook-ingress",
|
|
"webhook-targets",
|
|
"webhook-request-guards",
|
|
"web-media",
|
|
"zod",
|
|
"agent-core",
|
|
"agent-sessions",
|
|
"llm"
|
|
]
|