From 045010bb780448f5e6d29151912e15caa4713797 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 18 Apr 2026 21:09:34 +0100 Subject: [PATCH] chore: trim unused wrapper exports --- src/agents/pi-project-settings.ts | 6 ----- src/agents/subagent-lifecycle-events.ts | 30 ++----------------------- src/cli/plugins-command-helpers.ts | 5 ----- src/commands/auth-token.ts | 4 ---- 4 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/agents/pi-project-settings.ts b/src/agents/pi-project-settings.ts index 07dedb583d2..bb7bd1e7676 100644 --- a/src/agents/pi-project-settings.ts +++ b/src/agents/pi-project-settings.ts @@ -9,14 +9,8 @@ import { applyPiCompactionSettingsFromConfig } from "./pi-settings.js"; export { buildEmbeddedPiSettingsSnapshot, - DEFAULT_EMBEDDED_PI_PROJECT_SETTINGS_POLICY, loadEnabledBundlePiSettingsSnapshot, resolveEmbeddedPiProjectSettingsPolicy, - SANITIZED_PROJECT_PI_KEYS, -} from "./pi-project-settings-snapshot.js"; -export type { - EmbeddedPiProjectSettingsPolicy, - PiSettingsSnapshot, } from "./pi-project-settings-snapshot.js"; export function createEmbeddedPiSettingsManager(params: { diff --git a/src/agents/subagent-lifecycle-events.ts b/src/agents/subagent-lifecycle-events.ts index ae4c4c2fa89..698120c2462 100644 --- a/src/agents/subagent-lifecycle-events.ts +++ b/src/agents/subagent-lifecycle-events.ts @@ -1,47 +1,21 @@ export const SUBAGENT_TARGET_KIND_SUBAGENT = "subagent" as const; -export const SUBAGENT_TARGET_KIND_ACP = "acp" as const; - -export type SubagentLifecycleTargetKind = - | typeof SUBAGENT_TARGET_KIND_SUBAGENT - | typeof SUBAGENT_TARGET_KIND_ACP; export const SUBAGENT_ENDED_REASON_COMPLETE = "subagent-complete" as const; export const SUBAGENT_ENDED_REASON_ERROR = "subagent-error" as const; export const SUBAGENT_ENDED_REASON_KILLED = "subagent-killed" as const; -export const SUBAGENT_ENDED_REASON_SESSION_RESET = "session-reset" as const; -export const SUBAGENT_ENDED_REASON_SESSION_DELETE = "session-delete" as const; export type SubagentLifecycleEndedReason = | typeof SUBAGENT_ENDED_REASON_COMPLETE | typeof SUBAGENT_ENDED_REASON_ERROR - | typeof SUBAGENT_ENDED_REASON_KILLED - | typeof SUBAGENT_ENDED_REASON_SESSION_RESET - | typeof SUBAGENT_ENDED_REASON_SESSION_DELETE; - -export type SubagentSessionLifecycleEndedReason = - | typeof SUBAGENT_ENDED_REASON_SESSION_RESET - | typeof SUBAGENT_ENDED_REASON_SESSION_DELETE; + | typeof SUBAGENT_ENDED_REASON_KILLED; export const SUBAGENT_ENDED_OUTCOME_OK = "ok" as const; export const SUBAGENT_ENDED_OUTCOME_ERROR = "error" as const; export const SUBAGENT_ENDED_OUTCOME_TIMEOUT = "timeout" as const; export const SUBAGENT_ENDED_OUTCOME_KILLED = "killed" as const; -export const SUBAGENT_ENDED_OUTCOME_RESET = "reset" as const; -export const SUBAGENT_ENDED_OUTCOME_DELETED = "deleted" as const; export type SubagentLifecycleEndedOutcome = | typeof SUBAGENT_ENDED_OUTCOME_OK | typeof SUBAGENT_ENDED_OUTCOME_ERROR | typeof SUBAGENT_ENDED_OUTCOME_TIMEOUT - | typeof SUBAGENT_ENDED_OUTCOME_KILLED - | typeof SUBAGENT_ENDED_OUTCOME_RESET - | typeof SUBAGENT_ENDED_OUTCOME_DELETED; - -export function resolveSubagentSessionEndedOutcome( - reason: SubagentSessionLifecycleEndedReason, -): SubagentLifecycleEndedOutcome { - if (reason === SUBAGENT_ENDED_REASON_SESSION_RESET) { - return SUBAGENT_ENDED_OUTCOME_RESET; - } - return SUBAGENT_ENDED_OUTCOME_DELETED; -} + | typeof SUBAGENT_ENDED_OUTCOME_KILLED; diff --git a/src/cli/plugins-command-helpers.ts b/src/cli/plugins-command-helpers.ts index 754e994aef3..99e9ed30e65 100644 --- a/src/cli/plugins-command-helpers.ts +++ b/src/cli/plugins-command-helpers.ts @@ -7,11 +7,6 @@ import { defaultRuntime } from "../runtime.js"; import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; import { theme } from "../terminal/theme.js"; -export { - extractInstalledNpmHookPackageName, - extractInstalledNpmPackageName, -} from "./plugins-install-records.js"; - type HookInternalEntryLike = Record & { enabled?: boolean }; export function resolveFileNpmSpecToLocalPath( diff --git a/src/commands/auth-token.ts b/src/commands/auth-token.ts index b371599b222..62334d2cdb9 100644 --- a/src/commands/auth-token.ts +++ b/src/commands/auth-token.ts @@ -1,8 +1,4 @@ export { - ANTHROPIC_SETUP_TOKEN_MIN_LENGTH, ANTHROPIC_SETUP_TOKEN_PREFIX, - buildTokenProfileId, - DEFAULT_TOKEN_PROFILE_NAME, - normalizeTokenProfileName, validateAnthropicSetupToken, } from "../plugins/provider-auth-token.js";