Files
AgentCompany/src/main/connector-helpers.ts
T
ZacharyZhang-NY 06a3ba603e refactor(connectors): remove adapter module references from services
Drops every `definition.module.*` call and legacy id hardcode (claude_local,
codex_local, gemini_local, claude_compat_*) from the connector services.
Health checks now evaluate stored credentials against the declarative auth
descriptor, model policy reads provider models via pi-ai, matching keys off
provider ids, and hire-hook logs activity without invoking an adapter hook.
Introduces a local normalizeCommandValue helper to replace the deleted
@agentcompany/adapter-utils/server-utils import.
2026-04-17 02:20:56 -04:00

10 lines
337 B
TypeScript

/**
* Normalise a CLI command value read from the connectors table or a user form.
*
* Collapses surrounding whitespace so CLI dispatch does not fork an empty
* argument or pass leading/trailing spaces to spawn().
*/
export function normalizeCommandValue(value: string | null | undefined): string {
return (value ?? "").trim();
}