mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-22 16:51:16 +00:00
* refactor(agents): privatize delegation tool factory * refactor(state): privatize approval migration helpers * refactor(ui): privatize approval event parsers * chore(deadcode): remove system-agent baseline growth
244 lines
16 KiB
JavaScript
244 lines
16 KiB
JavaScript
// Pre-existing unused exports awaiting deletion.
|
|
// New entries fail CI. After deleting dead code, run `pnpm deadcode:exports:update`.
|
|
// Do not add entries to avoid fixing new findings.
|
|
export const KNIP_UNUSED_EXPORT_BASELINE = [
|
|
"src/agents/agent-hooks/compaction-safeguard.ts: testing",
|
|
"src/agents/agent-tools.before-tool-call.ts: BeforeToolCallBlockedError",
|
|
"src/agents/agent-tools.before-tool-call.ts: testing",
|
|
"src/agents/apply-patch.ts: applyPatch",
|
|
"src/agents/auth-profiles/external-auth.ts: testing",
|
|
"src/agents/auth-profiles/oauth.ts: isRefreshTokenReusedError",
|
|
"src/agents/auth-profiles/oauth.ts: resetOAuthRefreshQueuesForTest",
|
|
"src/agents/auth-profiles/runtime-snapshots.ts: getRuntimeAuthProfileStoreCredentialMutationRevision",
|
|
"src/agents/auth-profiles/runtime-snapshots.ts: getRuntimeAuthProfileStoreStateMutationRevision",
|
|
"src/agents/auth-profiles/runtime-snapshots.ts: testing",
|
|
"src/agents/auth-profiles/store.ts: testing",
|
|
"src/agents/auth-profiles/usage.ts: testing",
|
|
"src/agents/bash-process-registry.ts: resetProcessRegistryForTests",
|
|
"src/agents/cli-auth-epoch.ts: resetCliAuthEpochTestDeps",
|
|
"src/agents/cli-auth-epoch.ts: setCliAuthEpochTestDeps",
|
|
"src/agents/cli-backends.ts: resolveCliBackendLiveTest",
|
|
"src/agents/cli-backends.ts: testing",
|
|
"src/agents/cli-credentials.ts: MiniMaxCliCredential (cliCredentials)",
|
|
"src/agents/cli-credentials.ts: readClaudeCliCredentials",
|
|
"src/agents/cli-credentials.ts: readCodexCliCredentials (cliCredentials)",
|
|
"src/agents/cli-credentials.ts: resetCliCredentialCachesForTest",
|
|
"src/agents/cli-runner/claude-live-session.ts: buildClaudeLiveArgs",
|
|
"src/agents/cli-runner/claude-live-session.ts: resetClaudeLiveSessionsForTest",
|
|
"src/agents/cli-runner/execute.ts: buildCliEnvAuthLog",
|
|
"src/agents/cli-runner/execute.ts: buildCliExecLogLine",
|
|
"src/agents/cli-runner/execute.ts: setCliRunnerExecuteTestDeps",
|
|
"src/agents/cli-runner/prepare.ts: setCliRunnerPrepareTestDeps",
|
|
"src/agents/cli-runner/prepare.ts: shouldSkipLocalCliCredentialEpoch",
|
|
"src/agents/code-mode-namespaces.ts: clearCodeModeNamespacesForTest",
|
|
"src/agents/code-mode-namespaces.ts: CodeModeNamespaceContext",
|
|
"src/agents/code-mode-namespaces.ts: CodeModeNamespaceRegistration",
|
|
"src/agents/code-mode-namespaces.ts: CodeModeNamespaceScope",
|
|
"src/agents/code-mode-namespaces.ts: CodeModeNamespaceToolCall",
|
|
"src/agents/code-mode-namespaces.ts: CodeModeNamespaceToolInputMapper",
|
|
"src/agents/code-mode-namespaces.ts: createCodeModeNamespaceTool",
|
|
"src/agents/code-mode-namespaces.ts: listCodeModeNamespaces",
|
|
"src/agents/code-mode-namespaces.ts: registerCodeModeNamespaceForPlugin",
|
|
"src/agents/code-mode-namespaces.ts: RegisteredCodeModeNamespace",
|
|
"src/agents/code-mode.ts: CodeModeConfig",
|
|
"src/agents/code-mode.ts: isCodeModeControlTool",
|
|
"src/agents/code-mode.ts: testing",
|
|
"src/agents/command/attempt-execution.helpers.ts: claudeCliSessionTranscriptPath",
|
|
"src/agents/command/attempt-execution.helpers.ts: formatClaudeCliFallbackPrelude",
|
|
"src/agents/compaction-planning-worker.ts: compactionPlanningWorkerTesting",
|
|
"src/agents/compaction-planning.worker.ts: runCompactionPlanningWorkerInput",
|
|
"src/agents/compaction.ts: buildCompactionSummarizationInstructions",
|
|
"src/agents/compaction.ts: summarizeWithFallback",
|
|
"src/agents/core-tool-factory-descriptors.ts: CORE_TOOL_FACTORY_DESCRIPTORS",
|
|
"src/agents/embedded-agent-runner/context-engine-maintenance.ts: createDeferredTurnMaintenanceAbortSignal",
|
|
"src/agents/embedded-agent-runner/context-engine-maintenance.ts: resetDeferredTurnMaintenanceStateForTest",
|
|
"src/agents/embedded-agent-runner/extra-params.ts: testing",
|
|
"src/agents/embedded-agent-runner/model-discovery-cache.ts: resetModelDiscoveryCacheForTest",
|
|
"src/agents/embedded-agent-runner/run.ts: testing",
|
|
"src/agents/embedded-agent-runner/run/attempt.session-lock.ts: resetEmbeddedAttemptSessionFileOwnersForTest",
|
|
"src/agents/embedded-agent-runner/runs.ts: testing",
|
|
"src/agents/embedded-agent-runner/session-manager-cache.ts: createSessionManagerCache",
|
|
"src/agents/embedded-agent-subscribe.handlers.messages.ts: buildAssistantStreamData",
|
|
"src/agents/embedded-agent-subscribe.handlers.messages.ts: recordPendingAssistantReplyDirectives",
|
|
"src/agents/embedded-agent-subscribe.handlers.messages.ts: resolveSilentReplyFallbackText",
|
|
"src/agents/embedded-agent-subscribe.tools.ts: isToolResultMediaTrusted",
|
|
"src/agents/fallback-skip-cache.ts: peekFallbackSkipBucketsForTest",
|
|
"src/agents/fallback-skip-cache.ts: resetFallbackSkipCacheForTest",
|
|
"src/agents/harness/lifecycle-hook-helpers.ts: clearAgentHarnessFinalizeRetryBudget",
|
|
"src/agents/live-auth-keys.ts: collectAnthropicApiKeys",
|
|
"src/agents/live-auth-keys.ts: isAnthropicBillingError",
|
|
"src/agents/mcp-ui-resource.ts: testing",
|
|
"src/agents/media-generation-task-status-shared.ts: resetRecentMediaGenerationDuplicateGuardsForTests",
|
|
"src/agents/model-fallback-observation.ts: resetModelFallbackDecisionLogCoalescingForTest",
|
|
"src/agents/model-fallback.ts: testing",
|
|
"src/agents/model-suppression.ts: clearModelSuppressionResolverCacheForTest",
|
|
"src/agents/models-config-state.ts: resetModelsJsonReadyCacheForTest",
|
|
"src/agents/models-config.plan.ts: planOpenClawModelsJsonWithDeps",
|
|
"src/agents/models-config.plan.ts: resolveProvidersForModelsJsonWithDeps",
|
|
"src/agents/models-config.providers.implicit.ts: resolvePluginMetadataProviderOwnersForTest",
|
|
"src/agents/models-config.providers.implicit.ts: resolveProviderDiscoveryFilterForTest",
|
|
"src/agents/models-config.providers.secret-helpers.ts: resolveAwsSdkApiKeyVarName",
|
|
"src/agents/models-config.ts: ensureModelsFileModeForModelsJson",
|
|
"src/agents/models-config.ts: resetModelsJsonReadyCacheForTest",
|
|
"src/agents/models-config.ts: writeModelsFileAtomicForModelsJson",
|
|
"src/agents/modes/interactive/theme/theme.ts: setTheme",
|
|
"src/agents/openai-completions-compat.ts: resolveOpenAICompletionsCompatDefaults",
|
|
"src/agents/openai-transport-stream.ts: testing",
|
|
"src/agents/run-wait.ts: testing",
|
|
"src/agents/session-model-auto-revert.ts: reconcileAgentPatchedSessionModel",
|
|
"src/agents/session-suspension.ts: testing",
|
|
"src/agents/session-write-lock.ts: resetSessionWriteLockStateForTest",
|
|
"src/agents/session-write-lock.ts: testing",
|
|
"src/agents/sessions/tools/bash.ts: resolveBashTimeoutMs",
|
|
"src/agents/shell-snapshot.ts: resetShellSnapshotCacheForTests",
|
|
"src/agents/shell-snapshot.ts: resolveShellSnapshotDir",
|
|
"src/agents/subagent-announce-delivery.ts: testing",
|
|
"src/agents/subagent-announce-output.ts: testing",
|
|
"src/agents/subagent-attachments.ts: decodeStrictBase64",
|
|
"src/agents/subagent-control.ts: testing",
|
|
"src/agents/subagent-registry-helpers.ts: resolveSubagentSessionStatus",
|
|
"src/agents/subagent-registry-maintenance.ts: listSessionMaintenanceProtectedSubagentSessionKeys",
|
|
"src/agents/subagent-registry-read.ts: getSubagentRunByChildSessionKey",
|
|
"src/agents/subagent-registry.store.ts: saveSubagentRegistryToDisk",
|
|
"src/agents/subagent-registry.ts: addSubagentRunForTests",
|
|
"src/agents/subagent-registry.ts: countPendingDescendantRunsExcludingRun",
|
|
"src/agents/subagent-registry.ts: finalizeInterruptedSubagentRun",
|
|
"src/agents/subagent-registry.ts: getSubagentSessionRuntimeMs",
|
|
"src/agents/subagent-registry.ts: getSubagentSessionStartedAt",
|
|
"src/agents/subagent-registry.ts: isSubagentSessionRunActive",
|
|
"src/agents/subagent-registry.ts: listSessionMaintenanceProtectedSubagentSessionKeys",
|
|
"src/agents/subagent-registry.ts: listSubagentRunsForRequester",
|
|
"src/agents/subagent-registry.ts: releaseSubagentRun",
|
|
"src/agents/subagent-registry.ts: resetSubagentRegistryForTests",
|
|
"src/agents/subagent-registry.ts: resolveRequesterForChildSession",
|
|
"src/agents/subagent-registry.ts: resolveSubagentSessionStatus",
|
|
"src/agents/subagent-registry.ts: shouldIgnorePostCompletionAnnounceForSession",
|
|
"src/agents/subagent-registry.ts: testing",
|
|
"src/agents/subagent-spawn.ts: testing",
|
|
"src/agents/system-prompt-config.ts: resolveAgentSystemPromptConfig",
|
|
"src/agents/tool-policy-pipeline.ts: resetToolPolicyWarningCacheForTest",
|
|
"src/agents/tool-search.ts: testing",
|
|
"src/agents/tool-search.ts: ToolSearchCatalogSession",
|
|
"src/agents/tools/agent-step.ts: testing",
|
|
"src/agents/tools/image-generate-tool.ts: resolveImageGenerationModelConfigForTool",
|
|
"src/agents/tools/image-tool.ts: resolveImageModelConfigForTool",
|
|
"src/agents/tools/image-tool.ts: testing",
|
|
"src/agents/tools/model-config.helpers.ts: hasDirectProviderApiKeyAuthForTool",
|
|
"src/agents/tools/sessions-resolution.ts: testing",
|
|
"src/agents/tools/sessions-send-tool.a2a.ts: testing",
|
|
"src/agents/tools/sessions-spawn-visible-admission.ts: VisibleChildReservation",
|
|
"src/agents/tools/video-generate-tool.ts: resolveVideoGenerationModelConfigForTool",
|
|
"src/agents/tools/web-fetch.ts: sanitizeWebFetchUrl",
|
|
"src/agents/utils/tools-manager.ts: testing",
|
|
"src/agents/workspace-templates.ts: resetWorkspaceTemplateDirCache",
|
|
"src/agents/worktrees/run-lease.ts: testing",
|
|
"src/auto-reply/reply/abort.ts: testing",
|
|
"src/auto-reply/reply/acp-reset-target.ts: testing",
|
|
"src/auto-reply/reply/agent-runner-context-recovery.ts: computeContextAwareReserveTokensFloor",
|
|
"src/auto-reply/reply/agent-runner-memory.ts: setAgentRunnerMemoryTestDeps",
|
|
"src/auto-reply/reply/agent-runner-session-reset.ts: setAgentRunnerSessionResetTestDeps",
|
|
"src/auto-reply/reply/commands-login.ts: testing",
|
|
"src/auto-reply/reply/dispatch-from-config.ts: testing",
|
|
"src/auto-reply/reply/queue/cleanup.ts: testing",
|
|
"src/auto-reply/reply/queue/enqueue.ts: resetRecentQueuedMessageIdDedupe",
|
|
"src/auto-reply/reply/reply-run-registry.ts: testing",
|
|
"src/auto-reply/reply/stage-sandbox-media.ts: testing",
|
|
"src/auto-reply/usage-bar/template.ts: clearUsageBarTemplateCacheForTest",
|
|
"src/cli/channel-options.ts: testing",
|
|
"src/cli/command-secret-gateway.ts: testing",
|
|
"src/cli/gateway-cli/run.ts: testing",
|
|
"src/cli/plugins-install-command.ts: loadConfigForInstall",
|
|
"src/cli/plugins-list-format.ts: formatPluginLine",
|
|
"src/cli/startup-metadata.ts: testing",
|
|
"src/cli/update-cli/update-command-plugins.ts: buildInvalidConfigPostCoreUpdateResult",
|
|
"src/cli/update-cli/update-command-plugins.ts: collectMissingPluginInstallPayloads",
|
|
"src/cli/update-cli/update-command-plugins.ts: resolvePostSyncPluginUpdateSkipIds",
|
|
"src/cli/update-cli/update-command-service.ts: formatPostUpdateGatewayRecoveryInstructions",
|
|
"src/cli/update-cli/update-command-service.ts: recoverInstalledLaunchAgentAfterUpdate",
|
|
"src/cli/update-cli/update-command-service.ts: recoverLaunchAgentAndRecheckGatewayHealth",
|
|
"src/cli/update-cli/update-command-service.ts: shouldUseLegacyProcessRestartAfterUpdate",
|
|
"src/commands/audit.ts: testApi",
|
|
"src/commands/backup-shared.ts: resolveBackupPlanFromPaths",
|
|
"src/commands/doctor-auth-oauth-sidecar.ts: testing",
|
|
"src/commands/doctor-auth.ts: legacyCodexProviderOverrideToHealthFinding",
|
|
"src/commands/doctor-heartbeat-main-session-repair.ts: moveHeartbeatMainSessionEntry",
|
|
"src/commands/doctor-heartbeat-main-session-repair.ts: resolveHeartbeatMainSessionRepairCandidate",
|
|
"src/commands/doctor-sandbox.ts: resolveSandboxScript",
|
|
"src/commands/doctor-session-snapshots.ts: resolveSessionSnapshotBundledSkillsDir",
|
|
"src/commands/doctor-session-snapshots.ts: scanSessionStoreForStaleRuntimeSnapshotPaths",
|
|
"src/commands/doctor-whatsapp-responsiveness.ts: listLocalTuiProcesses",
|
|
"src/commands/doctor-whatsapp-responsiveness.ts: terminateLocalTuiProcesses",
|
|
"src/commands/doctor/shared/codex-native-assets.ts: scanCodexNativeAssets",
|
|
"src/commands/doctor/shared/codex-route-warnings.ts: repairCodexSessionStoreRoutes",
|
|
"src/commands/doctor/shared/legacy-oauth-sidecar.ts: legacyOAuthSidecarInternalTestUtils",
|
|
"src/commands/doctor/shared/plugin-dependency-cleanup.ts: testing",
|
|
"src/commands/doctor/shared/stale-auth-order.ts: repairStaleConfiguredAuthOrders",
|
|
"src/commands/doctor/shared/stale-oauth-profile-shadows.ts: testing",
|
|
"src/commands/onboard-inference.ts: detectNativeCodexAppServer",
|
|
"src/commands/onboard-non-interactive/local.ts: resolveGatewayHealthProbeToken",
|
|
"src/commands/onboard-non-interactive/local.ts: resolveInstallDaemonGatewayHealthTiming",
|
|
"src/commands/onboard-skills.ts: testing",
|
|
"src/commands/onboarding-plugin-install.ts: testing",
|
|
"src/commands/sessions-tail.ts: setSessionsTailFollowIntervalMsForTests",
|
|
"src/commands/sessions.ts: testing",
|
|
"src/commands/status.command.ts: resolvePairingRecoveryContext",
|
|
"src/commitments/extraction.ts: validateCommitmentCandidates",
|
|
"src/commitments/runtime.ts: configureCommitmentExtractionRuntime",
|
|
"src/commitments/runtime.ts: drainCommitmentExtractionQueue",
|
|
"src/commitments/runtime.ts: resetCommitmentExtractionRuntimeForTests",
|
|
"src/commitments/store.ts: loadCommitmentStore",
|
|
"src/commitments/store.ts: saveCommitmentStore",
|
|
"src/cron/isolated-agent/delivery-dispatch.ts: getCompletedDirectCronDeliveriesCountForTests",
|
|
"src/cron/isolated-agent/delivery-dispatch.ts: resetCompletedDirectCronDeliveriesForTests",
|
|
"src/cron/schedule.ts: clearCronScheduleCacheForTest",
|
|
"src/cron/schedule.ts: getCronScheduleCacheMaxForTest",
|
|
"src/cron/schedule.ts: getCronScheduleCacheSizeForTest",
|
|
"src/cron/schedule.ts: hasCronInCacheForTest",
|
|
"src/cron/service/active-run-cancellation.ts: cancelActiveCronTaskRun",
|
|
"src/cron/service/active-run-cancellation.ts: resetActiveCronTaskRunsForTests",
|
|
"src/cron/service/timer.ts: executeJobCore",
|
|
"src/cron/service/timer.ts: onTimer",
|
|
"src/cron/session-reaper.ts: resetReaperThrottle",
|
|
"src/entry.compile-cache.ts: buildOpenClawCompileCacheRespawnPlan",
|
|
"src/entry.compile-cache.ts: isNodeVersionAffectedByCompileCacheDeadlock",
|
|
"src/entry.compile-cache.ts: isSourceCheckoutInstallRoot",
|
|
"src/entry.compile-cache.ts: resolveOpenClawCompileCacheDirectory",
|
|
"src/entry.compile-cache.ts: runOpenClawCompileCacheRespawnPlan",
|
|
"src/entry.compile-cache.ts: shouldEnableOpenClawCompileCache",
|
|
"src/flows/doctor-health-contributions.ts: createDoctorHealthContribution",
|
|
"src/flows/doctor-health-contributions.ts: resolveDoctorHealthContributions",
|
|
"src/logging/diagnostic-run-activity.ts: markDiagnosticModelStartedForTest",
|
|
"src/logging/diagnostic-run-activity.ts: markDiagnosticRunProgressForTest",
|
|
"src/logging/diagnostic-run-activity.ts: markDiagnosticToolStartedForTest",
|
|
"src/logging/redact-internal.ts: withFullContextToolPayloadRedaction",
|
|
"src/logging/secret-redaction-registry.ts: resetSecretRedactionRegistryForTest",
|
|
"src/node-host/invoke.ts: testing",
|
|
"src/plugin-state/plugin-state-store.sqlite.ts: probePluginStateStore",
|
|
"src/plugin-state/plugin-state-store.sqlite.ts: seedPluginStateDatabaseEntriesForTests",
|
|
"src/plugin-state/plugin-state-store.sqlite.ts: setMaxPluginStateEntriesPerPluginForTests",
|
|
"src/plugin-state/plugin-state-store.ts: clearPluginStateStoreForTests",
|
|
"src/sessions/session-lifecycle-admission.ts: runExclusiveSessionLifecycle",
|
|
"src/sessions/session-upstream-monitor.ts: runSessionUpstreamMonitorTick",
|
|
"src/sessions/user-turn-transcript.ts: persistUserTurnTranscript",
|
|
"src/skills/lifecycle/install.ts: testing",
|
|
"src/skills/lifecycle/upload-store.ts: createSkillUploadStore",
|
|
"src/skills/runtime/refresh.ts: resetSkillsRefreshForTest",
|
|
"src/skills/runtime/remote-skills.ts: resetRemoteNodeSkillsForTests",
|
|
"src/system-agent/agent-turn.ts: runSystemAgentTurnWithDeps",
|
|
"src/tasks/detached-task-runtime.ts: resetDetachedTaskLifecycleRuntimeForTests",
|
|
"src/tasks/detached-task-runtime.ts: setDetachedTaskLifecycleRuntime",
|
|
"src/tasks/generated-media-task-activity.ts: resetGeneratedMediaTaskActivityForTests",
|
|
"src/tasks/task-flow-registry.store.ts: configureTaskFlowRegistryRuntime",
|
|
"src/tasks/task-flow-registry.ts: createFlowRecord",
|
|
"src/tasks/task-flow-registry.ts: resetTaskFlowRegistryForTests",
|
|
"src/tasks/task-registry.ts: maybeDeliverTaskStateChangeUpdate",
|
|
"src/tasks/task-registry.ts: resetTaskRegistryControlRuntimeForTests",
|
|
"src/tasks/task-registry.ts: resetTaskRegistryDeliveryRuntimeForTests",
|
|
"src/tasks/task-registry.ts: resetTaskRegistryForTests",
|
|
"src/tasks/task-registry.ts: setTaskRegistryControlRuntimeForTests",
|
|
"src/tasks/task-registry.ts: setTaskRegistryDeliveryRuntimeForTests",
|
|
];
|
|
|
|
// Platform-variant findings. Allowed when present; never required.
|
|
export const KNIP_OPTIONAL_UNUSED_EXPORT_BASELINE = [];
|