Skip to content

refactor(runtime): deslop SDK, skills, and node host - #164058

Merged
steipete merged 7 commits into
mainfrom
deslop/l337-simplify-sdk-skills-nodehost-20261002
Oct 3, 2026
Merged

steipete merged 7 commits into
mainfrom
deslop/l337-simplify-sdk-skills-nodehost-20261002

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The SDK, skill lifecycle, and node host carried duplicated internal plumbing and unused paths that made existing behavior harder to follow.

User Impact

Current config, persisted data, protocol, CLI output, prompts, and SDK exports/signatures stay unchanged. The approved pre-July 2026 retirement removes the June QA-runner runtime-api fallback; current runners use qa-runner-api. The .clawdhub retirement landed independently on main and is excluded from this batch; archive fingerprint exclusions remain unchanged.

Why This Change Was Made

BELOW-1000: this batch removes 857 net production lines landed (590 added / 1,447 deleted), without moving production code outside the monorepo. The complete coverage log below records all 169 production files over 200 lines, within an inventory of 713 production files. The reduction is 378 lines in SDK internals, 326 in skills, and 153 in node-host.

  • SDK account adapters share the scoped CRUD owner; the unused intermediary adapter is gone.
  • Provider catalog pagination resolves URL/cursor fallback in one place. Selection closes over its existing config; replay hooks and Windows launch results avoid forwarding layers.
  • Hosted-media cleanup uses its existing deferred-delete state; approval routing and allowlist mutations avoid repeated projection or one-use wrappers.
  • Memory exports share finalization while retaining inode checks, ordering, and directory durability.
  • Skill installation handles prerequisite and command outcomes directly. Discovery, provenance, scanner caching, and snapshot assembly drop redundant wrappers or state.
  • Workshop removes review forwarding modules and redundant typed parameter projections. Its worker, mutation-authority boundaries, and live Doctor sidecar importer remain intact.
  • Node execution derives internal phase types and owns its invariant policy defaults. Configuration has one non-mutating reader, socket waits use Node's shared primitive, and unused progress options and response buffering are removed.
  • QA facade availability checks keep their existing error classifications directly at the catch boundary.

Evidence

Linux validation used one reused remote lease, with pinned repository Node/pnpm and frozen dependencies.

  • Focused subsystem proof: 89 files, 1,555 passing tests, 2 platform skips; six Vitest shards in 931.26s including preparation, --maxWorkers=1.
  • After the type corrections: four affected files, 136 passing tests in 91.62s.
  • Reviewed rebased source at 1742a1a0453cbe32b2ad009dbaa2650d1f71a124: runtime build passed in 69.7s; plugin contracts passed 48 files / 1,132 tests, and bundled-entry/lifecycle tests passed 2 files / 19 tests. That combined selection took 243.03s including preparation.
  • Both cycle checks report zero cycles. Core production types, all 27 core test-type groups, extension production/test types, SDK exports/surface budget, ratchets, boundaries, and all three unused-export scans passed on the reviewed pre-rebase source. The rebase removed independently landed legacy-reader overlap without conflicts.
  • Independent review has no accepted actionable findings. Live Doctor migration, lazy loading, authority boundaries, and SDK-reachable session declarations remain intact.

Full core lint passed with zero warnings/errors (403.9s). Native-schema, database ownership, media-download, runtime-sidecar, webhook, and pairing guards all passed at 1742a1a0453cbe32b2ad009dbaa2650d1f71a124; the subsequent change restores three SDK session files exactly to the base.

Final verification at eb41aeb4fe3eda8ac9877cd32117c81893ae4035: both cycle checks pass. The canonical plugin-sdk:api:diff --base 341fc112e1e83ea74aa55c7c71033760bd043741 --head eb41aeb4fe3eda8ac9877cd32117c81893ae4035 --require-acknowledgement reports no Plugin SDK API changes, without an acknowledgement or baseline edit. The initial parallel declaration render exhausted the Linux host's memory; sequential rendering completed successfully with the same canonical tool.

Final rerun: 53 files / 1,164 tests passed (1,132 plugin contracts and 32 session-store cases), four shards in 204.61s with --maxWorkers=1. Core production types passed again on this exact head. The tracked remote checkout remained clean.

Hosted CI at eb41aeb4fe3e passed every selected job except checks-node-changed-compact-small-8: the linked-plugin integration test still expected the retired June fallback (run 37099791967). The test-only correction at c780106cca88391502081cd843143b2504399aca requires the dedicated QA surface and retains the current-surface success case. Its assertion demonstrably fails with the old fallback restored. Both QA runner files pass all 16 tests in 30.72s (node scripts/run-vitest.mjs src/plugin-sdk/qa-runner-runtime.integration.test.ts src/plugin-sdk/qa-runner-runtime.test.ts --maxWorkers=1); both cycle checks remain zero and focused lint passes. All production bytes match the API-verified eb41aeb4fe3e head. No inherited-red exception is used.

Hosted CI run 37101309737 passed on exact head c780106cca88391502081cd843143b2504399aca. Squash merge f420c1d8ff5fb223eb4f536da86a314af651c65f is verified on main. The landed diff excludes six production lines independently removed while CI ran; the final reduction above is measured from the merge commit and its parent.

Complete subsystem coverage (169 production files over 200 lines)

l337 production coverage

Complete baseline coverage for the SDK internals, skills, and node-host sweep. Every production file over 200 lines is listed below, sorted by size. Public SDK declarations, current authority/lifecycle boundaries, and July 2026 or newer migration contracts were retained. Test/support/generated files are excluded.

Base lines Production file Outcome
1136 src/node-host/invoke-system-run.ts READ: Replaced duplicated parse/policy result DTOs with types inferred from their owner functions; caller-invariant defaults now belong to exec-policy.
773 src/plugin-sdk/approval-native-helpers.ts READ: Consolidated approval-kind route enumeration and repeated request projections; public routing/auth normalizers and fallback contracts remain.
769 src/plugin-sdk/core.ts READ: Retain public exports and adapter contracts; route precedence, recovery checks, lazy schema reads, and registration modes have distinct behavior.
764 src/skills/security/scanner.ts READ: Inlined the single-caller cache lookup/validation adapter into the scan owner; preserved stat identity, byte-limit invalidation, bounded caching, and skip/failure behavior. Rules and filesystem bounds retained.
747 src/node-host/node-worker-launch-store.kernel.ts READ: Removed redundant constructor assignment. Kept transaction admission, stale-owner fencing, schema facts, process/container identity and turn settlement.
747 src/skills/runtime/refresh.ts READ: retain subscription scope reconciliation, asynchronous retirement joins, startup coverage, and filesystem-capacity fallback; these implement documented watcher lifecycle contracts.
732 src/node-host/invoke.ts READ: Dispatcher retains per-command error and serialization behavior; recent #163868 already removed redundant execution plumbing.
731 src/plugin-sdk/approval-reaction-runtime.ts READ: Reaction rendering, persisted version admission, lookup fallbacks and callback settlement are distinct live contracts; no safe API-neutral deletion remains.
728 src/node-host/node-worker-workspace.ts READ: Retain snapshot sequencing, live acquisition protection, managed directory admission and serialized replacements are independent safety contracts.
727 src/node-host/node-worker-supervisor.ts READ: Turn admission, cancel-versus-settlement ordering, idle reuse and recovery ownership cannot share a simpler lifecycle without changing behavior.
711 src/plugin-sdk/provider-stream-shared.ts READ: removed the one-use thinking predicate and unified Anthropic tool-use detection and Qwen payload construction. Retained public wrappers and plain-text-tool event ordering/promotion contracts.
711 src/skills/lifecycle/install.ts READ: removed single-use uv/Go prerequisite wrappers, Go apt candidate DTO/adapter chain, execution-result wrapper, and npm environment forwarding helpers; retained command order, readiness and output policy.
707 src/skills/loading/skill-root-discovery.ts READ: inline single-use escaped-path projection, remove redundant allowed-root result wrapper, and derive the invariant SKILL.md candidate path inside its owner. Preserve traversal budgets and containment diagnostics.
692 src/plugin-sdk/qa-runner-runtime.ts READ: Removed retired June runtime-api fallback and one-use error classifier; current runner authority and metadata validation stay intact.
690 src/node-host/runtime.ts READ: Invocation generations, abort fences, duplicate IDs, disconnect cleanup and update-idle admission each guard distinct races.
685 src/node-host/node-worker-transfer-client.ts READ: Download staging, attachments, prepared overlays, Git checkpoints and upload snapshots have distinct verification/rollback contracts.
680 src/node-host/node-worker-child-lifecycle.ts READ: Child, container, retained turn and uncertain-extinction paths retain separate authoritative owners and settlement ordering.
679 src/plugin-sdk/provider-auth-login-flow-runtime.ts READ: authority must be checked after awaits and before side effects; login/model-access records have different settlement and expiry ownership. No sound additional simplification found without changing public flow contracts.
674 src/plugin-sdk/agent-harness-runtime.ts READ: Retain public contracts, current capability migration windows and async lazy imports; most volume is required public exports.
653 src/plugin-sdk/provider-onboard.ts READ: preset entry points are public SDK; default-model, full-catalog and connection-only merge policies differ intentionally. Existing normalization preserves authored credential omission, aliases, model identity and fallback order.
653 src/plugin-sdk/session-transcript-runtime.ts READ: Retain typed public transcript operations and idempotency/mirror correlation; cold-storage restoration and write assertion boundaries are distinct.
652 src/node-host/mcp.ts READ: Catalog refresh and reconnect queues protect different work; timeout, publication bounds and HTTP session-expiry behavior remain necessary.
635 src/plugin-sdk/api-baseline-declaration-closure.ts READ: Retain compiler dependency traversal, ambient side effects, recall fallback, and per-root cycle cache; deleting these weakens API change detection.
624 src/skills/runtime/remote.ts READ: retain pairing-generation/connection fencing, coalescing, and success/backoff caches; these prevent stale remote facts from reaching persistence or eligibility.
617 src/plugin-sdk/channel-entry-contract.ts READ: Removed one-use source-loader wrapper; retained the typed loader parameter, guarded loading, and native/source fallback.
617 src/skills/loading/workspace-skill-loader.ts READ: retain separate local/host preparation and source caches; source ordering, host tagging, Library admission, and binary retry boundaries are distinct contracts.
611 src/plugin-sdk/persistent-dedupe.ts READ: Retain generation fences, namespace queue ordering, claim custody, compare-and-apply retry, and published legacy migration helpers.
607 src/skills/lifecycle/clawhub-install-core.ts READ: normalize expected archive integrity once and carry the value; removed overload ladder and assertion wrapper; use typed archive-install result directly.
605 src/plugin-sdk/outbound-media.ts READ: Removed redundant deletingEntries set (a synchronous subset of deferredDeletes) and shared repeated rejection-capacity predicate; retained leases, cleanup retries and TTL semantics.
584 src/skills/workshop/apply-transition.ts READ: apply, rollback, stale/quarantine transitions each hold distinct filesystem/authority recovery contracts; dependency injection breaks a real service-query cycle.
583 src/node-host/runner.ts READ: Pairing credentials, endpoint candidates, launcher-ready activation and shutdown ordering are externally observable contracts.
579 src/plugin-sdk/reply-payload.ts READ: Removed an unreachable empty-text return after the earlier empty-content guard; retained distinct media-loop empty-entry and finalizer timing semantics.
568 src/plugin-sdk/provider-entry.ts READ: manifest/custom/live/static catalog branches represent supported public contracts, and lazy discovery imports must remain deferred. No unneeded internal policy layer found.
547 src/skills/workshop/store.ts READ: retained the live Doctor import RPC after tracked-file caller verification; simplified exact typed input projections while preserving deep capture, authority retention, and distinct bundle/lock contracts.
528 src/skills/lifecycle/clawhub-status.ts READ: status and verification have distinct trust/provenance checks and error contracts; raw lock records still require normalization.
525 src/plugin-sdk/provider-catalog-live-runtime.ts READ: reuse the already-materialized provider fallback for the ID-only live result, removing a second config-construction helper path. Keep strict/advisory outcomes, anonymous retry and credential/cache ownership.
517 src/plugin-sdk/runtime-doctor-migrations.ts READ: Retain public migration policy options and source-retention checks; current data migrations are not pre-July shapes.
516 src/plugin-sdk/provider-tools.ts READ: simplify nullable string-union construction and inline the one-use pattern-property predicate. Shorten repetitive internal schema commentary while retaining constraint-merging rationale. Public normalization and diagnostics APIs remain identical.
500 src/plugin-sdk/channel-config-helpers.ts READ: Removed intermediary CRUD callback adapter and derived hybrid CRUD from the scoped owner with two default-account overrides; explicitly retain allowTopLevel:false for hybrid base writes.
495 src/plugin-sdk/api-baseline.ts READ: Retain source/emitted declaration pairing, compiler input sealing and deterministic signature rendering.
491 src/skills/lifecycle/clawhub-store.ts READ: Inlined two single-use metadata writers. The March-era .clawdhub reader retirement landed independently on main and is excluded from this diff; current diagnostics, validation, publication and rollback authority remain.
486 src/plugin-sdk/api-diff.ts READ: Retain cross-process artifact admission, stable digest ordering and bounded report output; no unused policy branch found.
484 src/plugin-sdk/provider-catalog-live-normalize.internal.ts READ: remove the duplicate exact-model lookup from template matching; its sole caller already returns exact matches before the unknown-model gate. Retain conservative metadata parsing and endpoint-origin validation.
482 src/plugin-sdk/memory-host-core.ts READ: Unified update/finalize marker publication, collapsed indistinguishable orphan states, and removed duplicate artifact bookkeeping; kept inode and durability fences.
481 src/node-host/node-worker-container-engine.ts READ: Docker and Podman differ in daemon pinning and metadata; shared command runner already owns common execution and diagnostics.
480 src/node-host/connection.ts READ: Coalescing retries retain latest desired publication across A-B-A updates, reconnects and uncertain acknowledgments; protocol compatibility remains post-July.
479 src/plugin-sdk/migration-runtime.ts READ: Retain backup journals, exclusive-create recovery and fs-safe admission; overwrite and archive flows have distinct safety contracts.
476 src/node-host/node-worker-bundle-installer.ts READ: Removed allocation/stringification of an unused error-response body while retaining its drain, byte bound and exact diagnostic.
476 src/skills/runtime/resources.ts READ: retain explicit selection checks, Library pin checks, private materialization lock, and host-specific reads; filesystem read paths and catalog provenance cannot be merged.
469 src/plugin-sdk/approval-delivery-helpers.ts READ: Routed and flat capability factories expose distinct public contracts; input projections preserve exact object shapes and channel-owned authorization.
463 src/skills/library/service.ts READ: No safe deletion: distinct list/read/save/mutate boundaries preserve live authority, revision pinning, policy scanning, publication, and transaction ownership.
459 src/plugin-sdk/qa-runtime.ts READ: Inlined single-use missing-runtime predicate; retained health deadlines, response cleanup and isolated-store teardown ordering.
459 src/plugin-sdk/status-helpers.ts READ: Sparse runtime status projection and explicit null defaults are public inferred return shapes; replacing with generic record machinery would weaken the API.
457 src/skills/library/bundle.ts READ: No safe deletion: portable path, bounded archive/tree reads, hash integrity, immutable publication, concurrent publisher handling, and directory durability are separate contracts. Shared directory sync helper differs in accepted error policy, so retained local implementation.
456 src/plugin-sdk/allowlist-config-edit.ts READ: Inlined one-use nested-object construction into its sole mutation owner; retained legacy public paths and inherited-entry preservation.
441 src/skills/discovery/status.ts READ: Removed duplicate empty-list guards before filtering/preference selection, which already return an empty install list. Distinct local/remote inventory and eligibility assembly retained.
439 src/plugin-sdk/provider-catalog-live-acquisition.internal.ts READ: collapse next-URL, cursor and incomplete-page helpers into one resolver. Parse the record/current URL once; retain field precedence, same-origin URL policy, cursor fallback and explicit incompleteness.
433 src/node-host/node-worker-workspace-processes.ts READ: Foreground and persistent processes share the native owner while retained released execution transport remains a named compatibility contract.
427 src/plugin-sdk/windows-spawn.ts READ: unify JS, resolved CMD/BAT and EXE direct-launch construction; retain shim validation, filesystem admission and explicit shell-fallback policy.
423 src/plugin-sdk/provider-model-shared.ts READ: install the existing Google replay functions directly instead of transparent wrappers. Retain legacy sync and current async hooks and all public family choices.
419 src/plugin-sdk/channel-policy.ts READ: Policy adapters and warning text are public SDK contracts; common DM/group owners are already used.
419 src/skills/lifecycle/workspace-skill-write.ts READ: prepare/apply/restore separation preserves SKILL.md activation ordering, exact-byte rollback and root identity; no sound owner reduction.
412 src/skills/runtime/workspace-worker.ts READ: retain concrete operation dispatch and separate publication/removal/watch lifetimes; generic dispatch would erase native request types and obscure different authorization handshakes.
411 src/skills/workshop/service.ts READ: revision, rejection and quarantine differ in authority/scan/target requirements; retained current locks and lifecycle dispatch.
410 src/plugin-sdk/session-store-runtime.ts READ: Retained unchanged after canonical SDK comparison proved the internal module declarations are reachable through public exports; consolidation would change the preserved SDK surface.
409 src/plugin-sdk/migration.ts READ: Retain public config-patch/redaction APIs and conflict checks before and inside mutation; all external values need admission.
409 src/plugin-sdk/secret-ref-runtime.ts READ: Retain exact public setup output and platform quoting; private file ownership, trusted roots and credential mapping are meaningful security boundaries.
399 src/skills/lifecycle/upload-store.ts READ: queue/worker/install-owner/heartbeat layers each enforce concurrent upload and live lease boundaries; retained.
398 src/plugin-sdk/session-visibility.ts READ: Retain scoped provider replacement fences and linear wildcard matcher; synchronous and asynchronous grant routes differ in live authority.
397 src/plugin-sdk/qa-channel-protocol.ts READ: Retain public bus/wire types, versioned target grammar and bounded redaction; bytes and descriptions remain contracts.
395 src/node-host/node-worker-workspace-quiescence.ts READ: Watchdog custody, nonce validation and queued renewal/release must outlive cancelled observers; Windows intentionally uses another transport.
384 src/skills/loading/plugin-skills.ts READ: replace a private one-field publisher option bag with its directory parameter; preserve default-directory cache identity and generated-link cleanup.
381 src/plugin-sdk/webhook-request-guards.ts READ: Pre-body admission, async close settlement, idempotent release and exact HTTP error mapping each retain live contracts.
374 src/plugin-sdk/session-visibility-internal.ts READ: Retain one canonical visibility policy owner and distinct denial evidence/presentation; no redundant authority branch found.
370 src/skills/library/store.ts READ: No safe deletion: actor/role resolution, ownership, revision reads, and write checks differ; metadata reads deliberately avoid large file manifests. Schema/admission decisions remain with existing owner.
369 src/skills/workshop/service-evaluation.ts READ: evaluator normalization validates plugin-controlled data; snapshots are deliberately revalidated after awaited evaluator execution.
368 src/skills/workshop/service-propose.ts READ: create/update already share one pending proposal producer; support-file provenance and expected-content binding are necessary.
357 src/plugin-sdk/channel-ingress-runtime.ts READ: Released adapters preserve plugin-instance authority; fan-in claim adoption, rollback and cancellation ordering have independent failure semantics.
354 src/node-host/node-worker-supervisor-recovery.ts READ: Different native cleanup certificates and live authority govern direct groups, owned anchors, Linux subreapers and containers.
352 src/node-host/node-worker-workspace-identity.ts READ: Filesystem, protocol and persisted-row checks operate at separate trust boundaries; path and identity helpers have real callers.
352 src/plugin-sdk/provider-catalog-shared.ts READ: cache consumers, removable waiters, last-consumer cancellation and completion-based TTL are separate retained lifecycle contracts. Config-row filtering and streaming capability projection have distinct owners.
351 src/plugin-sdk/provider-auth-claude-compat.ts READ: explicitly shipped compatibility through v2026.10; credential scopes, prompt intent and fingerprint-based cache invalidation are intentional. No removals authorized inside that compatibility window.
347 src/skills/loading/workspace-skill-sync.runtime.ts READ: retain source/context fingerprints, manifests, scoped queue, and writable-directory cleanup; these protect shared sandbox reuse and immutable Library copies.
342 src/skills/library/selection.ts READ: No safe deletion: sync load and async worker preparation share materialization/cache already; admission rechecks and persisted pins have intentionally different authority.
333 src/node-host/plugin-node-host.ts READ: Plugin registry scopes, command availability, cleanup retries and live exec authority are distinct lifecycle contracts.
329 src/plugin-sdk/provider-auth-runtime.ts READ: hardened callback owner plus retained legacy permissive origin behavior; runtime module candidates support built/source placement. No change made to auth resolution or public loopback behavior.
326 src/skills/runtime/refresh-state.ts READ: retain separate discovery/resource/content versions and scope-aware reconciliation; one counter would change observable refresh behavior.
323 src/node-host/invoke-agent-cli-claude-params.ts READ: Narrow flag/env/request allowlists preserve the remote execution boundary and caller-visible validation diagnostics.
323 src/skills/lifecycle/clawhub-uninstall.ts READ: staged rename identity, live authorization after awaits and rollback sequencing are necessary contracts; retained.
322 src/plugin-sdk/api-baseline-declaration-print.ts READ: Retain compiler-backed type/signature rendering and stripping implementations; AST variants have different factory contracts.
322 src/skills/lifecycle/install-download.ts READ: SSRF release, stream byte ceilings, SHA checking, pinned destination and staging publication are distinct boundaries; retained.
321 src/plugin-sdk/channel-inbound.ts READ: Mostly published aliases; remaining wrappers adapt deprecated context or overload contracts and cannot be removed without API baseline changes.
310 src/plugin-sdk/webhook-targets.ts READ: Registration teardown, normalized/canonical route lookup and sequential synchronous/async unique matching preserve independent observable contracts.
309 src/skills/workshop/experience-review.ts READ: absorbed single-caller review runner, removed unused generic admission/proposal defaults, kept model locking, drain signals, capacity owner and admission cleanup.
308 src/plugin-sdk/channel-outbound.ts READ: Mostly public exports; async wrappers enforce lazy-loading and undispatched error classification; July 2026 compat is explicitly documented.
308 src/skills/lifecycle/clawhub.ts READ: facade owns package lease and request normalization; core owns downloaded installation; remote owner adapters have real callers.
307 src/node-host/config.ts READ: Removed two duplicate reader wrappers, migrated status to the canonical non-mutating reader, and inlined single-use legacy path forwarding helpers.
307 src/skills/lifecycle/upload-store.kernel.ts READ: transaction-local metadata rereads, expiry and admission gates preserve authority across worker calls; retained.
306 src/skills/loading/session.ts READ: unify symlink entry classification for root-file and child discovery, find the sole SKILL.md directly, and inline one-use source-options forwarding. Preserve warnings, precedence, and ignored-file behavior.
303 src/node-host/auto-update-install.ts READ: Private runtime retention, registry integrity, fenced installer and activation preflight are necessary update/rollback contracts.
302 src/plugin-sdk/facade-loader.ts READ: Retain live plugin owner resolution, Proxy reflection invariants and boundary-specific hardlink policy.
302 src/plugin-sdk/file-lock.ts READ: Retain lock custody and exact cleanup identity; canonical fs-safe identity helper differs on Windows zero inode and cannot replace this comparator.
299 src/node-host/node-worker-supervisor-commands.ts READ: Existing command descriptors already share dispatch/error mapping; special branches implement distinct private wire contracts.
298 src/skills/lifecycle/archive-install.ts READ: policy/hook caller and local/remote filesystem owner split is intentional; retained.
298 src/skills/runtime/refresh-watch-registry.ts READ: retain per-owner maps and shared-target publication validation; callbacks can reenter and replace later subscribers.
297 src/node-host/node-stream-transport.ts READ: Replaced duplicate socket/WebSocket connection promises with node:events once; retained splice ownership, metadata ordering and backpressure.
296 src/node-host/node-worker-capacity.ts READ: Durable admission, local idle reclamation and bounded observer waits must remain independently fenced.
293 src/node-host/node-worker-transfer-http.ts READ: Removed impossible host-change recheck after cloning a URL and only assigning its protocol/path/search/hash; TLS and credential checks remain.
290 src/skills/loading/skill-root-loader.ts READ: inline one-use canonical record adaptation and use direct record projections; preserve source provenance and winner/collision order.
289 src/skills/lifecycle/source-install.ts READ: inlined one-use Git environment adapter and path-install forwarding layer into the source entry point.
287 src/node-host/invoke-agent-cli-claude.ts READ: Bounded UTF-8 progress, terminal-result rescue and artifact cleanup after descendant extinction protect separate behaviors.
286 src/plugin-sdk/control-ui.ts READ: Public browser-only type contract and identity declaration helper; API changes prohibited.
286 src/skills/lifecycle/workspace-types.ts READ: common local/remote lifecycle and wire result contracts are consumed outside this directory; retained.
282 src/node-host/node-worker-turn-store.kernel.ts READ: Removed redundant constructor assignment. Kept physical-owner matching, immutable outcomes and bounded turn retention.
282 src/skills/runtime/refresh-watch-targets.ts READ: retain separate configured/root/symlink bounds and shared-versus-execution targets; these enforce bounded discovery while admitting only trusted roots.
279 src/node-host/node-worker-prepared-workspace.ts READ: Registration, one-session binding, source/overlay verification and tombstone retirement are distinct transitions.
279 src/plugin-sdk/provider-oauth-runtime.ts READ: public OAuth interfaces and cancellation/expiry helpers; callback parsing forms and caller-owned abort semantics must remain. No sound internal reduction found.
274 src/plugin-sdk/feature-plugin.ts READ: One canonical invocation path already validates tool/session-action/CLI inputs and results with distinct surfaces; public contract retained.
274 src/skills/runtime/remote-skills.ts READ: retain native remote frontmatter admission and deterministic collision renaming; output guidance and node identity are user-visible.
274 src/skills/workshop/experience-review-scheduler.ts READ: generation fencing protects replaced/cleared timers and awaited activity checks; retry delay and quiet-time handling are documented lifecycle behavior.
273 src/plugin-sdk/channel-replay-guard.ts READ: Per-claim ownership, joined writes before rollback and distinct inflight aggregation are necessary concurrency contracts.
273 src/plugin-sdk/pair-loop-guard-runtime.ts READ: Retain public knobs, nonmonotonic-clock handling, event identity and cooldown pruning; no redundant state found.
273 src/plugin-sdk/plugin-entry.ts READ: Public export surface and lazy config-schema getter; retained required modes and compatibility metadata.
266 src/skills/discovery/chat-commands.ts READ: Folded the one-caller dedupe layer into the command finalizer, preserving first-wins selection and English-name sorting. Kept two-pass workspace resolution because async consumers must capture the workspace inventory before yielding.
266 src/skills/runtime/session-snapshot.ts READ: execute the shared rebuild once before choosing full replacement versus hydration, removing duplicated promise branching. Preserve cancellation/waiter and source-version fencing.
265 src/node-host/invoke-system-run-allowlist.ts READ: POSIX safe-bin reconstruction and Windows command-wrapper execution differ; kept authorization plan and path binding checks.
265 src/plugin-sdk/extension-shared.ts READ: Public generic helpers and stable fallback/output semantics; direct owners already reused.
265 src/plugin-sdk/facade-resolution-shared.ts READ: Retain explicit runtime owner precedence, ambiguity rejection and source/dist fallback under cold-load boundaries.
262 src/plugin-sdk/tool-plugin.ts READ: Retain public inferred metadata, separate execute/factory definitions and captured tool arrays; private factory preserves generic typing.
259 src/plugin-sdk/provider-selection-runtime.ts READ: replace the private three-generic parameter shuttle with a local candidate resolver that closes over the existing owner. Preserve explicit/automatic selection, alias precedence and failure projection.
259 src/skills/workshop/reconcile-transition.ts READ: retained recovery classification and byte/hash validation because persisted rollback data and partially changed filesystem state are untrusted.
257 src/plugin-sdk/channel-config-ui-hints.ts READ: User-visible strings and ordering are already consolidated into focused shared groups; changing descriptor representation adds indirection.
255 src/node-host/claude-skill-session.ts READ: Invocation-owned MCP proxy enforces exact pending calls, resource visibility and cleanup; no general library access is exposed.
255 src/plugin-sdk/channel-route.ts READ: Exact vs conversation equality and compact vs JSON keys preserve distinct public semantics; normalizers already use canonical owners.
255 src/skills/library/import.ts READ: No safe deletion: source and ZIP imports converge on publishDirectory/save; upload byte bounds and current identity checks are required. Retained historical metadata exclusion because current immutable bundles can contain those files.
253 src/skills/workshop/store-sqlite-event.ts READ: bounded replay and retained payload formats serve persisted event history; no safe deletion without changing data compatibility.
251 src/plugin-sdk/realtime-voice.ts READ: Required plugin-facing contract and runtime barrel; no internal implementation to remove without changing API.
250 src/skills/discovery/chat-command-invocation.ts READ: No safe deletion: explicit references, leading slash commands, bundle templates, escaped references, allowlist diagnostics, and prompt-byte budgets are observably distinct flows.
249 src/node-host/node-worker-prepared-workspace-store.kernel.ts READ: Row identity checks, one-time registration/binding and mutation tombstones guard durable authority.
245 src/node-host/node-worker-launch-observation.ts READ: Retained JSON normalization: stringify/parse preserves existing treatment of overflowed JSON numbers before strict frame validation.
245 src/plugin-sdk/webhook-memory-guards.ts READ: One bounded timed map already owns pruning; limiter windows and counter TTL need different update semantics.
245 src/skills/workshop/service-query.ts READ: listing, inspection and target-collision reconciliation intentionally separate metadata availability from draft/support-file integrity.
244 src/node-host/auto-update.ts READ: Policy and activation checks occur after separate awaits and idle acquisition; removing them would weaken live update authority.
243 src/skills/workshop/tool-policy-diagnostic.ts READ: diagnostic uses canonical final tool-policy owner; retained different profile/deny/path remediation outputs.
242 src/skills/runtime/tool-dispatch.ts READ: retain alignment with normal tool policy, sender/group/subagent/sandbox boundaries, and creator allowlist mutation; broader consolidation belongs to the tool-policy owner outside this scope.
241 src/skills/lifecycle/upload-store.sqlite.ts READ: typed query primitives and lease expiry/recovery have independent kernel/worker callers; retained.
240 src/plugin-sdk/memory-host-event-export.ts READ: Retain exclusive-create ownership, inode/content checks and directory sync sequence; each check covers a distinct race.
238 src/skills/runtime/env-overrides.ts READ: retain reference-counted injection and two public entry forms; reducing them through a synthetic snapshot would add indirection and risk sanitization or cleanup semantics.
237 src/skills/discovery/command-specs.ts READ: No safe deletion: shared assembly already owns sync/async and bundle/native command flows. Reserved-name claims, fixed-length collision handling, and dispatch metadata retain documented behavior.
235 src/node-host/desktop-stream-command.ts READ: Replaced conditional spreads with direct optional forwarding into its private stream owner; RFB authentication and port validation unchanged.
230 src/plugin-sdk/session-catalog-paging.ts READ: Retain parameter/cursor/byte bounds and existing UTF-16 behavior; shared Buffer truncation differs for unmatched surrogates.
230 src/skills/workshop/store.worker.ts READ: retained the live Doctor import handler, worker write admission and lease revalidation.
226 src/skills/workshop/store-record.ts READ: persisted shape validation has explicit bounds and provenance checks, not redundant runtime typing.
224 src/plugin-sdk/agent-harness-completion.ts READ: Retain custody, current requester checks and persisted delivery reconciliation through awaited operations.
223 src/node-host/auto-update-compatibility.ts READ: Published candidate schema/runtime validation and copied-database inspection are required no-migration update gates.
222 src/plugin-sdk/ssrf-policy.ts READ: Retain public legacy aliases plus URL policy normalization and DNS pinning; current config contract cannot be narrowed here.
222 src/skills/workshop/proposal-bundle.ts READ: bundle reads have required symlink/hardlink/traversal/case-sensitive contracts; no safe simplification.
219 src/plugin-sdk/facade-runtime.ts READ: Retain shared native/async module memo and managed instance wrappers; lazy activation boundary is intentional.
219 src/skills/loading/config.ts READ: retain typed-config guards where arbitrary skill names can address inherited object properties, and keep binary-eligibility sampling separate from final filtering.
217 src/node-host/invoke-system-run-plan.ts READ: Approval-bound cwd/executable/script snapshots and ordinary cwd normalization serve different contracts.
215 src/node-host/node-worker-launch-transport.ts READ: Direct-worker process groups retain released v2026.9.4 support; native lineage and containers use their own custody owners.
213 src/plugin-sdk/facade-activation-check.runtime.ts READ: Retain source-config and active runtime distinctions; fallback loading must not grant disabled plugins access.
213 src/plugin-sdk/provider-stream.ts READ: family routing owns distinct provider wrapper composition, lazy fast-mode evaluation and observable wrapper order. Public family choices and recently repaired service-tier handling retained.
212 src/node-host/pty-command.ts READ: Resume cwd fallback and fresh-start required cwd differ; protocol parsing, native PTY lifecycle and output backpressure remain necessary.
212 src/skills/workshop/proposal-draft.ts READ: existing shared producer already small; local UTF-8 truncation preserves unmatched surrogate bytes differently from generic buffer truncation, so retained.
209 src/plugin-sdk/approval-client-helpers.ts READ: Public profile factory options carry live delivery and target-matching behavior; common filter and normalization owners already imported.
208 src/plugin-sdk/channel-lifecycle.core.ts READ: Recent retirement/scheduling commit reviewed; tracked run start, abort cleanup and close-before-abort ordering are live lifecycle requirements.
208 src/skills/workshop/types.ts READ: protocol aliases preserve canonical public shapes; additional fields represent actual runtime authority or persisted facts.
201 src/plugin-sdk/approval-auth-helpers.ts READ: Implicit same-chat marker, empty-list normalizer skip and explicit wildcard authorization have security semantics; retain intact.

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: c780106cca88391502081cd843143b2504399aca
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/node-host/exec-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/node-host/plugin-exec-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/skills/security/scan-evidence.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/skills/security/scanner.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: XL labels Oct 3, 2026
@steipete
steipete enabled auto-merge (squash) October 3, 2026 05:28
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 2:00 AM ET / 06:00 UTC (Revision 2).

ClawSweeper review

What this changes

The branch simplifies shared plugin helpers, skill installation and loading, and node execution plumbing, while retiring the legacy QA runner loading fallback.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains useful work with no concrete introduced defect identified. The previous generic migration blocker is unsupported by the pinned diff; the QA compatibility cutoff is explicitly accepted in the maintainer-authored description.

Priority: P3
Reviewed head: c780106cca88391502081cd843143b2504399aca

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent maintenance with substantial reported validation and no actionable introduced defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from external-contributor runtime proof. Reported tests supplement source review; the diff preserves existing authority boundaries and stored formats, so neither an authority-proof exception nor a data migration gate is triggered.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from external-contributor runtime proof. Reported tests supplement source review; the diff preserves existing authority boundaries and stored formats, so neither an authority-proof exception nor a data migration gate is triggered.
Evidence reviewed 8 items Pinned introduction and review continuity: Reviewed the merge-base-to-head introduction, rather than endpoint drift. The change after the previous reviewed head modifies only the linked-plugin QA integration test; production remains identical to eb41aeb. The supplied test merge is stale and was not used to infer removal of main-only behavior.
Accepted QA compatibility retirement: The captured PR description explicitly identifies the pre-July QA runtime-api fallback retirement as approved. The supplied security-guard comment verifies steipete’s repository admin authority. Runtime-api-only installed runners will stop loading; the documented replacement is qa-runner-api.ts. This accepted cutoff is retained as compatibility context, not reopened as a decision.
Current main and release still contain the fallback: Fetched main still uses the legacy loading fallback. Independently inspected the same fallback in the supplied latest release commit for v2026.9.8 through GitHub’s contents API. The retirement is therefore distinct branch work, rather than already implemented behavior.
Findings None None.
Security None None.

How this fits together

Plugin helpers connect integrations to OpenClaw’s configuration, providers, and delivery services. Skill lifecycle and node-host code prepare installed capabilities and execute work through existing storage and approval owners.

flowchart TD
  A[Plugin and skill inputs] --> B[Shared plugin helpers]
  A --> C[Skill lifecycle]
  C --> D[Canonical state and files]
  B --> E[Provider and delivery services]
  F[Node execution requests] --> G[Approval and execution policy]
  G --> H[Node execution and results]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -863, Tests -54, Docs -1, Other -1. Total -919 across 67 files.

View PR surface stats
Area Files Added Removed Net
Source 57 582 1445 -863
Tests 7 33 87 -54
Docs 2 4 5 -1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 2 -1
Total 67 620 1539 -919

Review metrics

Metric Value Why it matters
QA compatibility cutoff 1 legacy loading fallback retired Installed runners exposing only runtime-api must adopt the dedicated QA surface under the accepted retirement.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugin-sdk/doctor-migration-plan-adapter.ts, unknown-data-model-change: src/plugin-sdk/memory-host-core.ts, vector/embedding metadata: src/plugin-sdk/memory-host-core.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep shared owners and existing state contracts intact, with the accepted QA surface cutoff documented for plugin authors.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a refactor, and no concrete introduced failure was established by source review.

Is this the best way to solve the issue?

Yes: the diff consolidates existing owners while preserving their contracts; the deliberate QA cutoff has explicit maintainer acceptance and focused loader coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c7c937abfea2.

Labels

Label changes:

  • add P3: This is internal maintenance without a reported urgent user-facing failure.
  • add merge-risk: 🚨 compatibility: Legacy runtime-api-only QA plugins stop loading; the maintainer-authored description explicitly accepts this cutoff.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from external-contributor runtime proof. Reported tests supplement source review; the diff preserves existing authority boundaries and stored formats, so neither an authority-proof exception nor a data migration gate is triggered.

Label justifications:

  • P3: This is internal maintenance without a reported urgent user-facing failure.
  • merge-risk: 🚨 compatibility: Legacy runtime-api-only QA plugins stop loading; the maintainer-authored description explicitly accepts this cutoff.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from external-contributor runtime proof. Reported tests supplement source review; the diff preserves existing authority boundaries and stored formats, so neither an authority-proof exception nor a data migration gate is triggered.

Evidence

What I checked:

  • Pinned introduction and review continuity: Reviewed the merge-base-to-head introduction, rather than endpoint drift. The change after the previous reviewed head modifies only the linked-plugin QA integration test; production remains identical to eb41aeb. The supplied test merge is stale and was not used to infer removal of main-only behavior. (src/plugin-sdk/qa-runner-runtime.integration.test.ts:143, c780106cca88)
  • Accepted QA compatibility retirement: The captured PR description explicitly identifies the pre-July QA runtime-api fallback retirement as approved. The supplied security-guard comment verifies steipete’s repository admin authority. Runtime-api-only installed runners will stop loading; the documented replacement is qa-runner-api.ts. This accepted cutoff is retained as compatibility context, not reopened as a decision. (src/plugin-sdk/qa-runner-runtime.ts:588, c780106cca88)
  • Current main and release still contain the fallback: Fetched main still uses the legacy loading fallback. Independently inspected the same fallback in the supplied latest release commit for v2026.9.8 through GitHub’s contents API. The retirement is therefore distinct branch work, rather than already implemented behavior. (src/plugin-sdk/qa-runner-runtime.ts, fc23bc864e45)
  • Existing-state contracts are preserved: Node configuration retains its existing row format, normalization, and non-mutating worker read. Memory export schemaVersion 3, inode checks, pending/current markers, and directory synchronization remain intact. Workshop worker dispatch, persisted-record validation, and the Doctor importer are unchanged. The diff does not materially change a stored data model, so the earlier generic migration-proof requirement does not apply. (src/plugin-sdk/memory-host-core.ts:117, c780106cca88)
  • Security invariants survive consolidation: Execution defaults move to their existing policy owner without changing deny, approval-required, or allowlist decisions. Hosted-media deletion still records revocation before awaiting storage work; the removed deleting set was redundant with deferredDeletes. Workshop still retains mutation authority and source revocation checks. No material expansion or transfer of authority was identified. (src/plugin-sdk/outbound-media.ts:240, c780106cca88)
  • QA regression coverage and reported validation: Read both QA runner test files: the linked-plugin integration exercises the real loader with a legacy-only package and retains the dedicated-surface success case. The captured description reports 16 passing tests in 30.72 seconds at the exact head and canonical SDK API comparison with no declaration changes at the production-identical parent. These are contributor-reported checks; this review did not execute tests. (src/plugin-sdk/qa-runner-runtime.integration.test.ts:194, c780106cca88)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-03T05:29:59.086Z sha eb41aeb :: blocked before merge. :: none

@steipete
steipete disabled auto-merge October 3, 2026 05:41
@steipete
steipete enabled auto-merge (squash) October 3, 2026 05:56
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@steipete
steipete merged commit f420c1d into main Oct 3, 2026
167 of 168 checks passed
@steipete
steipete deleted the deslop/l337-simplify-sdk-skills-nodehost-20261002 branch October 3, 2026 06:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
Simplify internal SDK account operations, provider catalog handling, replay forwarding, hosted-media cleanup, memory export finalization. Remove single-use skill installation, discovery, and workshop forwarding layers, plus duplicated node-host execution types and invariant options.

Preserve current configuration, data, protocol, CLI, prompt, and public SDK contracts. Retain the live Doctor proposal migration and lazy/authority boundaries. Retire only the approved June QA-runner fallback; the legacy ClawHub reader removal already landed independently.

Remove 863 net production lines across the coherent subsystem batch. Complete coverage records all 169 production files above 200 lines. Retain focused runtime, plugin-contract, type, cycle, and SDK-surface proof in the PR evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant